# Casino Sessions Request

<table><thead><tr><th width="115.0677490234375" align="center">Source</th><th width="55.919189453125" align="center"></th><th width="114.782958984375" align="center">Destination</th></tr></thead><tbody><tr><td align="center"><strong>Client</strong></td><td align="center"><strong>→</strong></td><td align="center"><strong>MTS</strong></td></tr></tbody></table>

This request contains information about online gaming events and their outcomes. The information includes elements such as: end customer identification, channel, game type, game provider, game progress, stake, payout, timestamps, etc. The data collected helps MTS maintain a profile of the end customer, which in turn enables MTS's clients to conduct automated marketing campaigns, analyse their services, manage end customer churn and more.

**Envelope and Content table:**

The Envelope provides the content's (Casino sessions request) context and contains the following fields (besides Content):

* operatorId
* correlationId
* timestampUtc
* operation
* version

<table data-full-width="true"><thead><tr><th width="351">Example</th><th width="161.7421875">Field Name</th><th>Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>{
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre><code>  "operatorId": 10234,
</code></pre></td><td>operatorId</td><td>ID to uniquely identify the client from which the ticket originated,<br>ID is provided to the client by Sportradar,<br>The client is obliged to include it in every ticket</td><td>M</td><td>Integer</td></tr><tr><td><pre><code>  "content": {
        .......
        .......
         },
</code></pre></td><td>content</td><td>See Content object description below</td><td>M</td><td>Object</td></tr><tr><td><pre><code>  "correlationId": "kL20vAyh",
</code></pre></td><td>correlationId</td><td>Client defined string to facilitate the request-response pairing,<br>Sportradar is obliged to return the same string in the corresponding response</td><td>M</td><td>String</td></tr><tr><td><pre><code>  "timestampUtc": 1703852995000,
</code></pre><p><br><br></p></td><td>timestampUtc</td><td>Timestamp of ticket placement as submitted by the client (Unix time in milliseconds format),<br>minimal: 1,<br>maximum: 9223372036854776000</td><td>M</td><td>Integer</td></tr><tr><td><pre data-overflow="wrap"><code>  "operation": "casino-sessions-inform",
</code></pre></td><td>operation</td><td>Declaration of operation type, should be "casino-sessions-inform" in the case of a Casino sessions request</td><td>M</td><td>String</td></tr><tr><td><pre><code>  "version": "3.0"
</code></pre></td><td>version</td><td>Indicates the ticket format version</td><td>M</td><td>String</td></tr><tr><td>}</td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>

### Content object (Casino sessions request) <a href="#mtscasinosessionsrequest-v3.0-contentcontentobject-casinosessionsrequest" id="mtscasinosessionsrequest-v3.0-contentcontentobject-casinosessionsrequest"></a>

This object constitutes the ticket itself and contains the following fields:

* type
* reportId
* sessions (array)
* context

**Content object table:**

<table data-full-width="true"><thead><tr><th width="351">Example</th><th width="147.39324951171875">Field Name</th><th>Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>"content": {
</code></pre></td><td><br></td><td><br></td><td><br></td><td>Object</td></tr><tr><td><pre data-overflow="wrap"><code>    "type": "casino-sessions-inform",
</code></pre></td><td>type</td><td>Declaration of content type, should be "casino-sessions-inform" in the case of a Casino sessions request</td><td>M</td><td>String</td></tr><tr><td><pre><code>    "reportId": "Report_862801",
</code></pre></td><td>reportId</td><td>Client defined string to identify the report (unique in the client's system),<br>minimal string length = 1,<br>maximum string length = 128</td><td>O</td><td>String</td></tr><tr><td><pre><code>    "sessions": [
            .......
            .......
       ],     
</code></pre></td><td>sessions</td><td>See description of the <a href="#mtscasinosessionsrequest-v3.0-sessionssessionsarray">sessions array</a> below,<br>minimal number of sessions (array elements) per content (request) = 1,<br>maximum number = 50</td><td>M</td><td>Array</td></tr><tr><td><pre><code>    "context": {
</code></pre></td><td>context</td><td>Additional information related to the request</td><td>M</td><td>Object</td></tr><tr><td><pre><code>        "channel": {
</code></pre></td><td><ul><li>channel</li></ul></td><td>Specifies the means of delivery of service to client's end customers (bettors), also called distribution channel</td><td>M</td><td>Object</td></tr><tr><td><pre><code>            "type": "mobile",
</code></pre></td><td><ul><li><p></p><ul><li>type</li></ul></li></ul></td><td><p>Declaration of channel type, enumerator:</p><ul><li>agent</li><li>call-centre</li><li>internet</li><li>mobile</li><li>mobile-app</li><li>phone (used for USSD betting - USSD is a communication protocol in mobile networks)</li><li>retail</li><li>sms</li><li>terminal</li><li>tv-app</li></ul></td><td>M</td><td>String</td></tr><tr><td><pre><code>             "ip": "109.74.24.155",
</code></pre></td><td><ul><li><p></p><ul><li>ip</li></ul></li></ul></td><td><p>IP address of the end customer's device</p><p>May be present only if "type": "internet" or "type": "mobile" or "type": "mobile-app" or "type":" tv-app"</p></td><td><p>M</p><p>if "type": "internet" , "type": "mobile" , "type": "mobile-app" , "type":" tv-app"</p></td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>             "deviceId": "device_133123",
</code></pre></td><td><ul><li><p></p><ul><li>deviceId</li></ul></li></ul></td><td><p>ID of the end customer's device</p><p>May be present only if "type": "mobile" or "type": "tv-app" or "type": "internet" or "type": "retail" or<br>"type": "sms"</p><p>Minimal string length = 1,<br>maximum length = 36,<br>allowed characters : uppercase and lowercase letters, numerals, #, :, -, _, \<br>Java regex: ^[0-9A-Za-z#:\\-_]{1,36}$</p></td><td>O</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>             "shopId": "shop_789135",
</code></pre></td><td><ul><li><p></p><ul><li>shopId</li></ul></li></ul></td><td><p>ID of the shop</p><p>May be present only if "type": "retail" or "type": "terminal"</p><p>Minimal string length = 1,<br>maximum length = 36,<br>allowed characters : uppercase and lowercase letters, numerals, #, :, -, _, \</p></td><td>M<br>if "type": "retail" or<br>"type": "terminal"</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>             "terminalId": "term_2313",
</code></pre></td><td><ul><li><p></p><ul><li>terminalId</li></ul></li></ul></td><td><p>May be present only if "type": "terminal"</p><p>Minimal string length = 1,<br>maximum length = 36,<br>allowed characters : uppercase and lowercase letters, numerals, #, :, -, _, \</p></td><td>M<br>if "type": "terminal"</td><td>String</td></tr><tr><td><pre><code>            "lang": "ES"
        },            
</code></pre></td><td><ul><li><p></p><ul><li>lang</li></ul></li></ul></td><td><p>End customer's user interface language code according to <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO 639-1 </a>(string length = 2)</p><p>May be present only if "type": "internet" or "type": "mobile" or "type": "mobile-app" or "type": "terminal" or "type": "tv-app"</p></td><td><p>M</p><p>if "type": "internet" , "type": "mobile" , "type": "mobile-app" , "type": "terminal" , "type": "tv-app"</p></td><td>String</td></tr><tr><td><pre><code>        "endCustomer": {
</code></pre></td><td><ul><li>endCustomer</li></ul></td><td>Data about client's end customer (bettor), it can only be omitted if the bet is placed by an unregistered bettor in retail or on a terminal</td><td>M</td><td>Object</td></tr><tr><td><pre data-overflow="wrap"><code>            "id": "endCustomer_e34t45",
</code></pre></td><td><ul><li><p></p><ul><li>id</li></ul></li></ul></td><td>End customer's unique ID (in client's system). It should be an anonymous value which cannot be used to identify a physical person.<br>minimal string length = 1,<br>maximum length = 36,<br>allowed characters are : uppercase and lowercase letters, numerals, #, :, -, _, \<br>Java regex: ^[0-9A-Za-z#:\\-_]{1,36}$</td><td>M</td><td>String</td></tr><tr><td><pre><code>             "confidence": "1.15"
           },  
</code></pre></td><td><ul><li><p></p><ul><li>confidence</li></ul></li></ul></td><td>End customer's suggested CCF<br>Java regex: ^\\d{1,8}(\\.\\d{1,8})?$</td><td>O</td><td>String</td></tr><tr><td><pre><code>        "walletId": Wallet_67209
     }
},     
</code></pre></td><td><ul><li>walletId</li></ul></td><td>Client defined string to identify the wallet (ID or type),<br>minimal string length = 1,<br>maximum string length = 128</td><td>O</td><td>String</td></tr></tbody></table>

### Sessions array <a href="#mtscasinosessionsrequest-v3.0-sessionssessionsarray" id="mtscasinosessionsrequest-v3.0-sessionssessionsarray"></a>

The sessions array elements convey information about the actual casino sessions. They consist of the following fields:

* id
* game
* startUtc
* endUtc
* spins
* stake
* payout

**Sessions array table:**

<table data-full-width="true"><thead><tr><th width="351.462646484375">Example</th><th width="171.92193603515625">Field Name</th><th>Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>    "sessions": [
</code></pre></td><td><br></td><td>Array of casino sessions,<br>minimal number of elements per content (request) = 1,<br>maximum number = 50</td><td>M</td><td>Array</td></tr><tr><td><pre><code>      { 
        "id": "Session_21018993",
</code></pre></td><td>id</td><td>Unique casino session id (in the client's system),<br>minimal string length = 1,<br>maximum length = 128</td><td>O</td><td>String</td></tr><tr><td><pre><code>        "game": {
</code></pre></td><td>game</td><td><br></td><td>M</td><td>Object</td></tr><tr><td><pre><code>           "id": "Game_TZU345",
</code></pre></td><td><ul><li>id</li></ul></td><td>Unique casino game id (in the client's system),<br>minimal string length = 1,<br>maximum length = 128</td><td>M</td><td>String</td></tr><tr><td><pre><code>           "provider": "PR_008"
           },
</code></pre></td><td><ul><li>provider</li></ul></td><td>Casino game provider identifier (in the client's system),<br>minimal string length = 1,<br>maximum length = 128</td><td>M</td><td>String</td></tr><tr><td><pre><code>        "startUtc": 1703845795000,
</code></pre></td><td>startUtc</td><td>Timestamp of start of the game (Unix time in milliseconds format),<br>minimal: 1,<br>maximum: 9223372036854776000</td><td>O</td><td>Integer</td></tr><tr><td><pre><code>        "endUtc": 1703845825000,
</code></pre></td><td>endUtc</td><td>Timestamp of end of the game (Unix time in milliseconds format),<br>minimal: 1,<br>maximum: 9223372036854776000</td><td>O</td><td>Integer</td></tr><tr><td><pre><code>        "spins": [
</code></pre></td><td>spins</td><td>Array of casino game spins,<br>minimal number of spins per session =1,<br>maximum number = 5</td><td>O</td><td>Array</td></tr><tr><td><pre><code>           { 
            "type": "ordinary",
</code></pre></td><td><ul><li>type</li></ul></td><td><p>Spin type, enumerator:</p><ul><li>ordinary</li><li>bonus</li></ul></td><td>M</td><td>String</td></tr><tr><td><pre><code>           "count": 3,
</code></pre></td><td><ul><li>count</li></ul></td><td><br></td><td>M</td><td>Integer</td></tr><tr><td><pre><code>           "winningCount": 1
             }
           ],  
</code></pre></td><td><ul><li>winningCount</li></ul></td><td><br></td><td>O</td><td>Integer</td></tr><tr><td><pre><code>        "stake": [
</code></pre></td><td>stake</td><td>Array of session stakes,<br>minimal number of stakes per session =1,<br>maximum number = 5</td><td>M</td><td>Array</td></tr><tr><td><pre><code>          {  
            "type": "cash",
</code></pre></td><td><ul><li>type</li></ul></td><td><p>Stake type, enumerator:</p><ul><li>cash (used for stake and payout)</li><li>bonus (amount added on top of end customer's winnings in case a bet is won )</li></ul></td><td>M</td><td>String</td></tr><tr><td><pre><code>            "currency": "DKK",
</code></pre></td><td><ul><li>currency</li></ul></td><td><p>Currently MTS does not support multiple sessions with stakes in different currencies,</p><p>See description</p></td><td>M</td><td>String</td></tr><tr><td><pre><code>            "amount": "12",
</code></pre></td><td><ul><li>amount</li></ul></td><td>See description</td><td>M</td><td>String</td></tr><tr><td><pre><code>            "mode": "total",
</code></pre></td><td><ul><li>mode</li></ul></td><td><p>Stake mode enumerator<br>(default = total):</p><ul><li>unit - stake amount relates to each sub-bet<br>(a sub-bet is one combination (in case of system bets))</li><li>total - stake amount relates to all sub-bets (each sub-bet receives a portion of the amount)</li></ul></td><td>O</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>            "traceId": "Source_2099"
           }
        ],    
</code></pre></td><td><ul><li>traceId</li></ul></td><td><p>A string to help identify the source of operation/action/state</p><p>Minimal string length = 1,<br>maximum length = 128,</p></td><td>O</td><td>String</td></tr><tr><td><pre><code>        "payout": [       
</code></pre></td><td>payout</td><td>Session payout array,<br>minimal number of payouts per session =1,<br>maximum number = 5</td><td>M</td><td>Array</td></tr><tr><td><pre><code>           { 
            "type": "cash",
</code></pre></td><td><ul><li>type</li></ul></td><td><p>Enumerator:</p><ul><li>cash</li><li>withheld</li></ul></td><td>M</td><td>String</td></tr><tr><td><pre><code>            "currency": "EUR",
</code></pre></td><td><ul><li>currency</li></ul></td><td>3 or 4 letter currency code, BTC and mBTC are also supported (4 letters only apply to mBTC).<br>For more details please check<br><a href="https://www.iso.org/iso-4217-currency-codes.html">https://www.iso.org/iso-4217-currency-codes.html</a></td><td>M</td><td>String</td></tr><tr><td><pre><code>            "amount": "100",
</code></pre></td><td><ul><li>amount</li></ul></td><td>String pattern: 1 up to 8 digits, optionally followed by a decimal point and 1 up to 8 digits,<br>Java regex: ^\\d{1,8}(\\.\\d{1,8})?$</td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>            "traceId": "Source_2099"
                }
             ]
        }
 ],               
</code></pre></td><td><ul><li>traceId</li></ul></td><td><p>A string to help identify the source of operation/action/state</p><p>Minimal string length = 1,<br>maximum length = 128,</p></td><td>O</td><td>String</td></tr></tbody></table>
