{
  "info": {
    "name": "Callisto Games Operator API v1",
    "description": "Every request is signed by the collection pre-request script. Set key_id and secret in the Sandbox environment.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "const secret = pm.variables.get('secret');",
          "const keyId = pm.variables.get('key_id');",
          "const ts = Math.floor(Date.now() / 1000).toString();",
          "const body = pm.request.body && pm.request.body.raw ? pm.variables.replaceIn(pm.request.body.raw) : '';",
          "const url = pm.request.url.clone();",
          "url.update(pm.variables.replaceIn(url.toString()));",
          "const payload = body !== '' ? body : pm.request.method + ' ' + url.getPathWithQuery();",
          "const signature = CryptoJS.HmacSHA256(ts + '.' + payload, secret).toString(CryptoJS.enc.Hex);",
          "if (body !== '') pm.request.body.raw = body;",
          "pm.request.headers.upsert({ key: 'X-Agg-Key-Id', value: keyId });",
          "pm.request.headers.upsert({ key: 'X-Agg-Timestamp', value: ts });",
          "pm.request.headers.upsert({ key: 'X-Agg-Signature', value: signature });"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "game_id",
      "value": ""
    },
    {
      "key": "id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Getting started",
      "item": [
        {
          "name": "GET /v1/ping",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/ping",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "ping"
              ]
            },
            "description": "Verify signing and clock"
          }
        },
        {
          "name": "POST /v1/debug/signature",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/debug/signature",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "debug",
                "signature"
              ]
            },
            "description": "Sandbox only: check a signature step by step (not signed)",
            "auth": {
              "type": "noauth"
            }
          }
        }
      ]
    },
    {
      "name": "Catalogue",
      "item": [
        {
          "name": "GET /v1/games",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/games?limit=50",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "games"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": "Games you may offer, paged by cursor"
          }
        },
        {
          "name": "GET /v1/providers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/providers",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "providers"
              ]
            },
            "description": "Providers behind the games, whole list"
          }
        },
        {
          "name": "GET /v1/images/{id}",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/images/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "images",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "An image by id (not signed)",
            "auth": {
              "type": "noauth"
            }
          }
        },
        {
          "name": "GET /v1/rates",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/rates",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "rates"
              ]
            },
            "description": "Your revenue-share percent per provider and band"
          }
        },
        {
          "name": "GET /v1/live-tables",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/live-tables",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "live-tables"
              ]
            },
            "description": "Live Casino tables on your games as they stand now, limits in one currency"
          }
        }
      ]
    },
    {
      "name": "Wallet integration",
      "item": [
        {
          "name": "POST /v1/test/wallet-validation",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/test/wallet-validation",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "test",
                "wallet-validation"
              ]
            },
            "description": "Sandbox only: run the wallet test suite against your wallet"
          }
        },
        {
          "name": "GET /v1/test/wallet-validation/{id}",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/test/wallet-validation/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "test",
                "wallet-validation",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "Sandbox only: a run and every case so far"
          }
        }
      ]
    },
    {
      "name": "Sessions",
      "item": [
        {
          "name": "POST /v1/sessions",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"player_id\": \"p-1\",\n  \"currency\": \"EUR\",\n  \"game_id\": \"{{game_id}}\",\n  \"locale\": \"en\",\n  \"lobby_url\": \"https://casino.example/lobby\",\n  \"player_ip\": \"203.0.113.9\",\n  \"player_device\": \"desktop\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/v1/sessions",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "sessions"
              ]
            },
            "description": "Open a game for a player"
          }
        },
        {
          "name": "POST /v1/games/{id}/demo",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"locale\": \"en\",\n  \"player_ip\": \"203.0.113.9\",\n  \"player_device\": \"desktop\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/v1/games/:id/demo",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "games",
                ":id",
                "demo"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "Fun play without a player or wallet"
          }
        },
        {
          "name": "POST /v1/sessions/{id}/close",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/sessions/:id/close",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "sessions",
                ":id",
                "close"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "End a session"
          }
        }
      ]
    },
    {
      "name": "Promotions",
      "item": [
        {
          "name": "POST /v1/free-spins",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"player_id\": \"p-1\",\n  \"currency\": \"EUR\",\n  \"game_ids\": [\n    \"{{game_id}}\"\n  ],\n  \"quantity\": 10,\n  \"bet_amount\": \"0.20\",\n  \"valid_until\": \"2026-12-31T00:00:00Z\",\n  \"reference\": \"promo-{{$timestamp}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/v1/free-spins",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "free-spins"
              ]
            },
            "description": "Grant free spins; idempotent on reference"
          }
        },
        {
          "name": "GET /v1/free-spins",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/free-spins?reference=promo-7",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "free-spins"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "promo-7"
                }
              ]
            },
            "description": "Find a grant by your reference"
          }
        },
        {
          "name": "GET /v1/free-spins/bet-options",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/free-spins/bet-options?game_id={{game_id}}&currency=EUR",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "free-spins",
                "bet-options"
              ],
              "query": [
                {
                  "key": "game_id",
                  "value": "{{game_id}}"
                },
                {
                  "key": "currency",
                  "value": "EUR"
                }
              ]
            },
            "description": "Stakes the game provider accepts for a grant"
          }
        },
        {
          "name": "GET /v1/free-spins/{id}",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/free-spins/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "free-spins",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "Read a grant"
          }
        },
        {
          "name": "POST /v1/free-spins/{id}/cancel",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/free-spins/:id/cancel",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "free-spins",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "Withdraw a grant still playable; idempotent"
          }
        },
        {
          "name": "POST /v1/bonus-campaigns",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/bonus-campaigns",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "bonus-campaigns"
              ]
            },
            "description": "Place a bonus campaign for your players; idempotent on reference"
          }
        },
        {
          "name": "GET /v1/bonus-campaigns",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/bonus-campaigns",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "bonus-campaigns"
              ]
            },
            "description": "Find a campaign by your reference, or list the campaigns of one player"
          }
        },
        {
          "name": "GET /v1/bonus-campaigns/options",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/bonus-campaigns/options",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "bonus-campaigns",
                "options"
              ]
            },
            "description": "Campaign types and triggers the game provider of a game takes"
          }
        },
        {
          "name": "GET /v1/bonus-campaigns/{id}",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/bonus-campaigns/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "bonus-campaigns",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "Read a campaign"
          }
        },
        {
          "name": "GET /v1/jackpots",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/jackpots",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "jackpots"
              ]
            },
            "description": "Progressive jackpots open on your games"
          }
        },
        {
          "name": "GET /v1/jackpots/winners",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/jackpots/winners",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "jackpots",
                "winners"
              ]
            },
            "description": "Jackpots your players won lately, newest first"
          }
        }
      ]
    },
    {
      "name": "Reconciliation",
      "item": [
        {
          "name": "GET /v1/transactions/{id}",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/transactions/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "transactions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "One movement as our books hold it"
          }
        },
        {
          "name": "GET /v1/rounds/{id}",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/rounds/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "rounds",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{id}}"
                }
              ]
            },
            "description": "Every movement of one round, oldest first"
          }
        }
      ]
    }
  ]
}