{
  "openapi": "3.0.1",
  "info": {
    "title": "Game Platform Integration",
    "description": "This API is called by the Yolted ‘Game System’ to verify and settle bets.\r\n                    <br><br>\r\n                    This is a transparent integration with ‘buy-in’ functionality. The ‘buy-in’ functionality is ‘on’ by default when playing BLITZ. It is highly recommended that you support this functionality at your casino to reduce the number of transactions made to increase BLITZ usage. \r\n                    <br><br>\r\nMetaData is provided to allow you to calculate bonus or loyalty points\r\n                    <br><br>\r\n                  \r\nIMPORTANT! DebitCredit, Debit, and Credit must be implemented to minimize the number of calls made. \r\n <br><br>\r\nFor example, a game shall send DebitCredit requests until a feature is won by a player, whereby it will send separate Debit and Credit requests. This is to prevent the result of a game round that has a chance to win big being viewed in the operator’s balance before the game has reflected the result.\r\n <br><br>\r\n                    If you have any questions feel free to contact us.\r\n                    ",
    "version": "v1"
  },
  "paths": {
    "/api/dragon/startgame": {
      "post": {
        "tags": [
          "Seamless"
        ],
        "summary": "Login/Authenticate player.",
        "description": "This is triggered when a player starts a game and integrating system should validate the token and return with needed player information.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartGameRequest"
              },
              "example": {"token":"ASENSITIVESHORTLIVEDTOKENPASSEDTHROUGHGAMELAUNCH","context":"acontext","ip":"233.233.233.233","language":"en_GB","gameId":"firstgame","channel":1,"key":"ASUPERSECRETAPIKEY"}
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartGameRequest"
              },
              "example": {"token":"ASENSITIVESHORTLIVEDTOKENPASSEDTHROUGHGAMELAUNCH","context":"acontext","ip":"233.233.233.233","language":"en_GB","gameId":"firstgame","channel":1,"key":"ASUPERSECRETAPIKEY"}
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartGameRequest"
              },
              "example": {"token":"ASENSITIVESHORTLIVEDTOKENPASSEDTHROUGHGAMELAUNCH","context":"acontext","ip":"233.233.233.233","language":"en_GB","gameId":"firstgame","channel":1,"key":"ASUPERSECRETAPIKEY"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StartGameResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartGameResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartGameResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/dragon/balance": {
      "post": {
        "tags": [
          "Seamless"
        ],
        "summary": "Get the players current balance.",
        "description": "Can be triggered for multiple reasons when the game system needs to refresh the players balance. \r\nExample is if the player runs out of balance, his account is credited and we can update without him having to reload the game.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BalanceRequest"
              },
              "example": {"externalPlayerId":"playersIdInyoursystem","key":"ASUPERSECRETAPIKEY"}
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BalanceRequest"
              },
              "example": {"externalPlayerId":"playersIdInyoursystem","key":"ASUPERSECRETAPIKEY"}
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BalanceRequest"
              },
              "example": {"externalPlayerId":"playersIdInyoursystem","key":"ASUPERSECRETAPIKEY"}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/dragon/debit": {
      "post": {
        "tags": [
          "Seamless"
        ],
        "summary": "Debits the players account.",
        "description": "<br>Debits/reserve the bet made by the player. Done when starting a game round or triggering a buy in to an account (see BLITZ buy in accounts).\r\n<br>Make sure to develop support for multiple Credit calls on a round id since some games might use this. Relevant for gamble/collect features etc.\r\n<br>For promotion/free game rounds the freeGameOfferId parameter will have a value, this will be null if not linked to a promotion. Note that Amount will also be 0 during promotion rounds.\r\n<br>WARNING! its very important that the integrating system validate the amount! Game system may send a request for debit that is higher than its last known balance",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DebitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DebitResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebitResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebitResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/dragon/credit": {
      "post": {
        "tags": [
          "Seamless"
        ],
        "summary": "Credit players Account",
        "description": "Credit player after a round, includes the round result. It will send credit with amount 0 to signal that there was no win on the round.\r\nonly a single Credit call is made per round.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreditRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/dragon/cancelround": {
      "post": {
        "tags": [
          "Seamless"
        ],
        "summary": "Cancel a Round request.",
        "description": "Cancel a Round. Refund all the bets (debits) made on the player for this round.\r\n\r\nThis occur if there was an error during the round or if the integrating system did not respond properly on the original request.\r\n\r\nNote, if no rounds are found, or they are already cancelled you should still respond OK for it to be properly resolved.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelRoundRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelRoundRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelRoundRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CancelRoundResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelRoundResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelRoundResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/dragon/reward": {
      "post": {
        "tags": [
          "Seamless"
        ],
        "summary": "Reward a player an arbitrary reward",
        "description": "OPTIONAL: only used generic reward system where arbitrary rewards can be given to players.\r\n\r\nThis is triggered by loyalty games or promotional features where generic/mystery rewards that is not part of the regular Payout.\r\nThese rewards can be defined in configuration of each game and can be mapped to the reward trigger id.\r\n\r\nCommon use cases, loyalty game payouts, mystery prices (t-shirts, caps, etc),  etc.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RewardRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RewardResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/dragon/debitcredit": {
      "post": {
        "tags": [
          "Seamless"
        ],
        "summary": "Debit and Credit in single request.",
        "description": "Designed to minimize the amount requests for games that do not depend on any user actions. Note that the round is played before this request is sent\r\nbut no result is shown before it has returned an ok.\r\n\r\n<br>IMPORTANT! WARNING!\r\nYou have to validate that the debitAmount is greater or equal to the players balance before adding any Credit and return insufficient balance.\r\nif not. This to ensure that the players is not able to bet for money he does not have.\r\nNot Doing so will create a scenario where the player can in effect bet for free.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitCreditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitCreditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DebitCreditRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DebitCreditResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebitCreditResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebitCreditResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BalanceRequest": {
        "required": [
          "externalPlayerId",
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key that should be validated by the operator to ensure that only our game system is allowed to make calls.\r\nCan and should be combined with IP white listing.\r\n\r\n<br>NOTE! this is the same value that is also sent as an Http Header, \"Authorization: Basic KEY\""
          },
          "externalPlayerId": {
            "minLength": 1,
            "type": "string",
            "description": "Players ID in the operators system"
          }
        },
        "additionalProperties": false,
        "description": "Balance Request"
      },
      "BalanceResponse": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IntegrationResponseCode"
          },
          "message": {
            "type": "string",
            "description": "Message, null if ok.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "description": "Balance",
            "format": "double"
          },
          "bonusBalance": {
            "type": "number",
            "description": "Bonus balance",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Players balance in the operators system"
      },
      "CancelRoundRequest": {
        "required": [
          "externalPlayerId",
          "key",
          "roundId"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key that should be validated by the operator to ensure that only our game system is allowed to make calls.\r\nCan and should be combined with IP white listing.\r\n\r\n<br>NOTE! this is the same value that is also sent as an Http Header, \"Authorization: Basic KEY\""
          },
          "externalPlayerId": {
            "minLength": 1,
            "type": "string",
            "description": "The player id the integrating system has provided for the player"
          },
          "roundId": {
            "type": "integer",
            "description": "RoundId where all transactions on should be rolled back.",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "Cancel a round by rolling back all transactions with that round id"
      },
      "CancelRoundResponse": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IntegrationResponseCode"
          },
          "message": {
            "type": "string",
            "description": "Message, null if ok.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "empty response means ok."
      },
      "Channel": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "The different channels that the games can be launched on. This controls certain behavior and placement of game elements as well as the UI of the game.<p>Possible values:</p>\n<ul>\n<li><b>0</b>: Desktop channel</li>\n<li><b>1</b>: Mobile Channel. Also includes Tablets.</li>\n<li><b>2</b>: Terminal/Cabinett channel, for landbased gaming.</li>\n<li><b>3</b>: Mini games channel, as a sidebet game etc.</li>\n</ul>\n",
        "format": "int32"
      },
      "CreditRequest": {
        "required": [
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key that should be validated by the operator to ensure that only our game system is allowed to make calls.\r\nCan and should be combined with IP white listing.\r\n\r\n<br>NOTE! this is the same value that is also sent as an Http Header, \"Authorization: Basic KEY\""
          },
          "transactionId": {
            "type": "integer",
            "format": "int64"
          },
          "nrOfRounds": {
            "type": "integer",
            "description": "Nr of rounds played",
            "format": "int32"
          },
          "roundId": {
            "type": "integer",
            "description": "Round the transaction was made for.",
            "format": "int64",
            "nullable": true
          },
          "externalPlayerId": {
            "type": "string",
            "description": "Players ID in the operators system",
            "nullable": true
          },
          "context": {
            "type": "string",
            "description": "Context round was played on",
            "nullable": true
          },
          "gameId": {
            "type": "string",
            "description": "Game round was played on",
            "nullable": true
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "amount": {
            "type": "number",
            "description": "Total Amount that should be credited to players account",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "Currency of round",
            "nullable": true
          },
          "gamesessionId": {
            "type": "integer",
            "description": "Game Session  round was played on",
            "format": "int64"
          },
          "freeGameOfferId": {
            "type": "integer",
            "description": "Freegameofferid/promotionofferid if the round was played on any.",
            "format": "int64",
            "nullable": true
          },
          "buyIn": {
            "type": "boolean",
            "description": "Indicates if this debit request is a buyin, meaning the money is transferred into an account that will be used to play mulitple rounds.null\r\nThis is used mainly by blitz buy in function that can greatly increase the speed of blitz and minimize the amount of requests.\r\n\r\nThe integrating system is responsible to apply any limits on buy in transactions such as for example if it limits bets including bonus money(mixed bets).\r\nif so the integrating system can return Code 6 (limited reached) and the yolted game system will fall back to use regular transactions.\r\nNote that for buyout a regular credit request is sent with the parent round id."
          },
          "totalLoss": {
            "type": "number",
            "description": "Only relevant when buyin is true.\r\nThe acual amount that was betted. Used to calculate bonus and other contributions.",
            "format": "double",
            "nullable": true
          },
          "totalWin": {
            "type": "number",
            "description": "Only relevant when buyin is true.\r\nThe acual amount that was won, Same as the Amount minus amount that was left for rounds that where not played.",
            "format": "double",
            "nullable": true
          },
          "externalGameSessionId": {
            "type": "string",
            "description": "External Gamesession id, if such was passed on the game start.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Credit player account"
      },
      "CreditResponse": {
        "required": [
          "balance",
          "code",
          "currency"
        ],
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IntegrationResponseCode"
          },
          "message": {
            "type": "string",
            "description": "Message, null if ok.",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "description": "Players new balance",
            "format": "double"
          },
          "currency": {
            "minLength": 1,
            "type": "string",
            "description": "Currency"
          },
          "bonusBalance": {
            "type": "number",
            "description": "players new bonus balance",
            "format": "double"
          },
          "externalTransactionId": {
            "type": "string",
            "description": "External Transaction Id, if operator wants to trace thier own id on transaction.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Credit response"
      },
      "DebitCreditRequest": {
        "required": [
          "amount",
          "channel",
          "creditAmount",
          "currency",
          "debitAmount",
          "externalPlayerId",
          "gameId",
          "key",
          "transactionId"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key that should be validated by the operator to ensure that only our game system is allowed to make calls.\r\nCan and should be combined with IP white listing.\r\n\r\n<br>NOTE! this is the same value that is also sent as an Http Header, \"Authorization: Basic KEY\""
          },
          "transactionId": {
            "type": "integer",
            "description": "Yolted transaction id",
            "format": "int64"
          },
          "roundId": {
            "type": "integer",
            "description": "Round transaction was made for",
            "format": "int64",
            "nullable": true
          },
          "externalPlayerId": {
            "minLength": 1,
            "type": "string",
            "description": "Players ID in the operators system"
          },
          "context": {
            "type": "string",
            "description": "Context the round was played on",
            "nullable": true
          },
          "gameId": {
            "minLength": 1,
            "type": "string",
            "description": "Game the round was played on"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "debitAmount": {
            "type": "number",
            "description": "The Bet amount, this amount should be credited to the players account. This will be 0 if player did not win.\r\nCannot be negative.\r\n\r\nIMPORTANT, if a player does not have this amount on thier account they should respond with inssuficant balance and the round will be cancelled.\r\nNot doing so will allow the player to possibly bet money he does not have.\r\nNo result will have been shown to the player.",
            "format": "double"
          },
          "creditAmount": {
            "type": "number",
            "description": "The Win amount, this amount should be added to the players account.\r\nCannot be negative.",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "description": "The result of the round, this can be negative!\r\nNegative if player lost money. win - bet, creditAmount-DebitAmount.",
            "format": "double"
          },
          "currency": {
            "minLength": 1,
            "type": "string",
            "description": "Currency of the round"
          },
          "gamesessionId": {
            "type": "integer",
            "description": "GameSession the round was played on",
            "format": "int64"
          },
          "externalGameSessionId": {
            "type": "string",
            "description": "Operators gamesession id if any.",
            "nullable": true
          },
          "freeGameOfferId": {
            "type": "integer",
            "description": "Freegameofferid/promotionofferid if the round was played on any.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Used to trigger bet and win at the same time when there is no action in the game that can affect the outcome.\r\nSuch as slot game without gamble and collect\r\nthis would reduce the amount of requests needed between the systems."
      },
      "DebitCreditResponse": {
        "required": [
          "balance",
          "code",
          "currency"
        ],
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IntegrationResponseCode"
          },
          "message": {
            "type": "string",
            "description": "Message, null if ok.",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "description": "Players new balance",
            "format": "double"
          },
          "currency": {
            "minLength": 1,
            "type": "string",
            "description": "Currency"
          },
          "bonusBalance": {
            "type": "number",
            "description": "players new bonus balance",
            "format": "double"
          },
          "externalTransactionId": {
            "type": "string",
            "description": "External Transaction Id, if operator wants to trace thier own id on transaction.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Debit credit response"
      },
      "DebitRequest": {
        "required": [
          "amount",
          "channel",
          "currency",
          "externalPlayerId",
          "gameId",
          "key",
          "transactionId"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key that should be validated by the operator to ensure that only our game system is allowed to make calls.\r\nCan and should be combined with IP white listing.\r\n\r\n<br>NOTE! this is the same value that is also sent as an Http Header, \"Authorization: Basic KEY\""
          },
          "transactionId": {
            "type": "integer",
            "description": "Yolted transaction id",
            "format": "int64"
          },
          "roundId": {
            "type": "integer",
            "description": "Round transaction was made for",
            "format": "int64",
            "nullable": true
          },
          "externalPlayerId": {
            "minLength": 1,
            "type": "string",
            "description": "Players ID in the operators system"
          },
          "context": {
            "type": "string",
            "description": "Context the round was played on",
            "nullable": true
          },
          "gameId": {
            "minLength": 1,
            "type": "string",
            "description": "Game the round was played on"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "amount": {
            "type": "number",
            "description": "Amount that should be debited of the players account",
            "format": "double"
          },
          "currency": {
            "minLength": 1,
            "type": "string",
            "description": "Currency of the round"
          },
          "gamesessionId": {
            "type": "integer",
            "description": "GameSession the round was played on",
            "format": "int64"
          },
          "externalGameSessionId": {
            "type": "string",
            "description": "Operators gamesession id if any.",
            "nullable": true
          },
          "freeGameOfferId": {
            "type": "integer",
            "description": "Freegameofferid/promotionofferid if the round was played on any.",
            "format": "int64",
            "nullable": true
          },
          "buyIn": {
            "type": "boolean",
            "description": "Indicates if this debit request is a buy in, meaning the money is transferred into an account that will be used to play mulitiple rounds.null\r\nThis is used mainly by blitz buy in function that can greatly increase the speed of blitz and minimize the amount of requests.\r\n\r\nfor regular game play this will always be false or null (not included in the request).\r\n\r\nThe integrating system is responsible to apply any limits on buy in transactions such as for example if it limits bets including bonus money(mixed bets).\r\nif so the integrating system can return Code 6 (limited reached) and the Yolted game system will fall back to use regular transactions.\r\nNote that for buyout a regular credit request is sent with the parent round id."
          }
        },
        "additionalProperties": false,
        "description": "Debit a players account request"
      },
      "DebitResponse": {
        "required": [
          "balance",
          "code",
          "currency"
        ],
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IntegrationResponseCode"
          },
          "message": {
            "type": "string",
            "description": "Message, null if ok.",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "description": "Players new balance",
            "format": "double"
          },
          "currency": {
            "minLength": 1,
            "type": "string",
            "description": "Currency"
          },
          "bonusBalance": {
            "type": "number",
            "description": "players new bonus balance",
            "format": "double"
          },
          "externalTransactionId": {
            "type": "string",
            "description": "External Transaction Id, if operator wants to trace thier own id on transaction.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Debit response"
      },
      "IntegrationResponseCode": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10001,
          10002
        ],
        "type": "integer",
        "description": "Response codes for the DefaultIntegration B2B API.\r\nResponses from the integrating operator/partner.\r\n            \r\nNote numbers greater than 1000 should not be used. They are used internally for transport layer faultcodes.<p>Possible values:</p>\n<ul>\n<li><b>0</b>: OK. There was no issues, all good.</li>\n<li><b>1</b>: Invalid player token.</li>\n<li><b>2</b>: Player is locked in the operator system.</li>\n<li><b>3</b>: Invalid player id.</li>\n<li><b>4</b>: Api is down. will default to this if the api responds with a none 200 or not at all.</li>\n<li><b>5</b>: not enough money on player account</li>\n<li><b>6</b>: player has reached limits.</li>\n<li><b>7</b>: time limit has been exceeded</li>\n<li><b>8</b>: Will Ask player to contact support.</li>\n<li><b>9</b>: Genric error of some sort.</li>\n</ul>\n",
        "format": "int32"
      },
      "RewardRequest": {
        "required": [
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key that should be validated by the operator to ensure that only our game system is allowed to make calls.\r\nCan and should be combined with IP white listing.\r\n\r\n<br>NOTE! this is the same value that is also sent as an Http Header, \"Authorization: Basic KEY\""
          },
          "rewardTriggerId": {
            "type": "integer",
            "description": "The game specific trigger id, rewards are in an enum, 0,1,2,3,4,5 for the possible rewards.",
            "format": "int64"
          },
          "rewardId": {
            "type": "integer",
            "description": "The Reward id the trigger id was mapped to, maps the text representation for the reward in game.",
            "format": "int64"
          },
          "transactionId": {
            "type": "integer",
            "description": "Yolteds transaction ID.",
            "format": "int64"
          },
          "roundId": {
            "type": "integer",
            "description": "Round the transaction was made for.",
            "format": "int64",
            "nullable": true
          },
          "externalPlayerId": {
            "type": "string",
            "description": "Players ID in the operators system",
            "nullable": true
          },
          "context": {
            "type": "string",
            "description": "Context round was played on",
            "nullable": true
          },
          "gameId": {
            "type": "string",
            "description": "Game round was played on",
            "nullable": true
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "gamesessionId": {
            "type": "integer",
            "description": "Game Session  round was played on",
            "format": "int64"
          },
          "externalGameSessionId": {
            "type": "string",
            "description": "External Gamesession id, if such was passed on the game start.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request for generic rewards outside of regular games or Loyalty games. Rewards are defined and not part of regular RTP's and games\r\nThe can be mystery prices etc defined."
      },
      "RewardResponse": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IntegrationResponseCode"
          },
          "message": {
            "type": "string",
            "description": "Message, null if ok.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "empty response means ok."
      },
      "StartGameRequest": {
        "required": [
          "channel",
          "gameId",
          "key",
          "token"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key that should be validated by the operator to ensure that only our game system is allowed to make calls.\r\nCan and should be combined with IP white listing.\r\n\r\n<br>NOTE! this is the same value that is also sent as an Http Header, \"Authorization: Basic KEY\""
          },
          "token": {
            "minLength": 1,
            "type": "string",
            "description": "Token passed to the launcher during the launch. Generated by operator, validated by the operator."
          },
          "context": {
            "type": "string",
            "description": "Context passed to the launcher.",
            "nullable": true
          },
          "ip": {
            "type": "string",
            "description": "IP of the player.",
            "nullable": true
          },
          "language": {
            "type": "string",
            "description": "Language passed to the launcher.",
            "nullable": true
          },
          "gameId": {
            "minLength": 1,
            "type": "string",
            "description": "Game Id of the game launched"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          }
        },
        "additionalProperties": false,
        "description": "Start Game / Login Integration Request."
      },
      "StartGameResponse": {
        "required": [
          "balance",
          "code",
          "currency",
          "externalPlayerId"
        ],
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IntegrationResponseCode"
          },
          "message": {
            "type": "string",
            "description": "Message, null if ok.",
            "nullable": true
          },
          "externalPlayerId": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string",
            "description": "PlayerId in the operators system."
          },
          "nickname": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string",
            "description": "Nickname of the player.",
            "nullable": true
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "three Letter currency code.\r\nexample.\r\nEUR\r\nSEK\r\nDKK\r\nUSD"
          },
          "brand": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string",
            "description": "Players Brand.",
            "nullable": true
          },
          "language": {
            "type": "string",
            "description": "ISO Locale code. such as\r\n\r\nzh_CN,\r\nzh_TW\r\nfr_fr\r\nen_US\r\nen_GB",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "description": "Players Balance.",
            "format": "double"
          },
          "bonusBalance": {
            "type": "number",
            "description": "Players Bonus Balance.",
            "format": "double"
          },
          "birthdate": {
            "type": "string",
            "description": "Players birthdate, nullable.",
            "format": "date-time",
            "nullable": true
          },
          "country": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "Alpha 2 standard. Max 2 letters.\r\nhttps://www.iban.com/country-codes",
            "nullable": true
          },
          "registered": {
            "type": "string",
            "description": "Date player was registered.",
            "format": "date-time",
            "nullable": true
          },
          "externalGameSessionId": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string",
            "description": "External Game Session Id, operator side.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Start Game Integrate Response."
      }
    },
    "securitySchemes": {
      "API Key": {
        "type": "apiKey",
        "description": "Authenticate with Apikey provided in header. This is also sent in the json data if you prefer to validate not on header.",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  }
}