# Ticket Placement Response

<table><thead><tr><th width="114.609375" align="center">Destination</th><th width="54.75262451171875" align="center"></th><th width="115.19964599609375" align="center">Source</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>

### Ticket structure <a href="#mtsticketplacementresponse-v3.0-ticketstructure" id="mtsticketplacementresponse-v3.0-ticketstructure"></a>

The **Ticket placement response**, like any other ticket, consists of the envelope and content.

The content part represents the ticket itself and is included in the Content object.\
Its most complex part, the BetDetails array, is described in a separate table below.

**Envelope and Content table:**

The Envelope provides the content's (Ticket placement response) context and contains the following fields (besides Content):

* correlationId
* timestampUtc
* operation
* version

<table data-full-width="true"><thead><tr><th width="310.8958740234375">Example</th><th width="140.201416015625">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>  "content": {
       .......
       .......
   },    
</code></pre></td><td>content</td><td>See Content object description below</td><td>M</td><td>Object</td></tr><tr><td><pre data-overflow="wrap"><code>  "correlationId": "Uw59kwUL",
</code></pre></td><td>correlationId</td><td>The same string as submitted by client in the Ticket placement request</td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>  "timestampUtc": 1678202889000,
</code></pre></td><td>timestampUtc</td><td>Timestamp of response placement (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": "ticket-placement",
</code></pre></td><td>operation</td><td><p>Should be "ticket-placement" in case of Ticket placement response,</p><p>In case of Cancellation, Cashout and Non-SR settlement requests / responses, enumerator:</p><ul><li>"ticket-cancel"</li><li>"ticket-cashout"</li><li>"ticket-ext-settlement",</li></ul><p>In case of Acknowledgement messages and Acknowledgement reply messages - enumerator:</p><ul><li>"ticket-placement-ack"</li><li>"ticket-cancel-ack"</li><li>"ticket-cashout-ack"</li><li>"ticket-ext-settlement-ack"</li></ul></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 (Ticket placement response) <a href="#mtsticketplacementresponse-v3.0-contentcontentobject-ticketplacementresponse" id="mtsticketplacementresponse-v3.0-contentcontentobject-ticketplacementresponse"></a>

The Content object includes the following fields:

* type
* signature
* status
* ticketId
* code
* message
* betDetails
* exchangeRate<br>

**Please note** that in the case of major ticket errors or internal system errors the content object has a different structure and contains "type": "error-reply" instead of "type": "ticket-reply. For description, see [Error-reply response](https://docs.sportradar.com/transaction30api/api-description/ticket-json-format-description/error-reply-response).

**Content object table**

<table data-full-width="true"><thead><tr><th width="333.34375">Example</th><th width="165.42266845703125">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": "ticket-reply",
</code></pre></td><td>type</td><td><p>Declaration of the content type, should be "ticket-reply" in the case of Ticket placement response</p><p>or "error-reply" in the case of major ticket errors or internal system errors (see also <a href="error-reply-response">Error-reply Response</a>).</p></td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>      "signature": "HHDut7XIEl+SmjWB3x
DB0AIB6fUZVFOvmGKm6Rcvxm0=",
</code></pre></td><td>signature</td><td>String calculated and sent by MTS to be used as a proof that the response has actually been provided by MTS,<br>minimal string length = 1,<br>maximum string length = 128</td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>      "status": "rejected",
</code></pre></td><td>status</td><td><p>Suggestion on ticket acceptance, provided by MTS,<br>enumerator:</p><ul><li>accepted</li><li>rejected</li></ul></td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>      "ticketId": "Ticket_3690",
</code></pre></td><td>ticketId</td><td>Used to identify the ticket that this response relates to,<br>minimal string length = 1,<br>maximum string length = 128</td><td>M</td><td>String</td></tr><tr><td><pre><code>      "code": -701,
</code></pre></td><td>code</td><td>Ticket response validation code (the main reason the ticket has eventually been rejected),<br>see list of <a href="../validation-codes">validation codes</a></td><td>M</td><td>Integer</td></tr><tr><td><pre data-overflow="wrap"><code>      "message": "Liability EUR 722.8 is over Limit ID Total liability limit EUR...
</code></pre></td><td>message</td><td>Readable ticket response validation code, minimal string length = 1,<br>maximum string length = 128<br>(example is shortened)</td><td>O</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>      "betDetails":   [
         ......
         ......
         ],
</code></pre></td><td>betDetails</td><td>For syntax, see the <a href="#mtsticketplacementresponse-v3.0-betdetailsbetdetailsarray">betDetails array description</a></td><td>O</td><td>Array</td></tr><tr><td><pre data-overflow="wrap"><code>      "exchangeRate":   [
</code></pre></td><td>exchangeRate</td><td>MTS has a system currency (used for defining liability limits etc.), details can be <a href="https://app.gitbook.com/s/3JvMJx2x71aK15pDIp2j/transaction-3.0-api/additional-transaction-details/exchange-rates">found here</a>.<br>This rate was used at ticket acceptance time when converting actual bet currency to the MTS system currency</td><td>O</td><td>Array</td></tr><tr><td><pre><code>           {
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre data-overflow="wrap"><code>            "fromCurrency": "USD",
</code></pre></td><td><ul><li>fromCurrency</li></ul></td><td>Actual bet currency,<br>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 data-overflow="wrap"><code>            "toCurrency": "EUR",
</code></pre></td><td><ul><li>toCurrency</li></ul></td><td>MTS system currency (currently the euro, so for the time being only "EUR" can be expected),<br>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 data-overflow="wrap"><code>            "rate": "0.931741"
</code></pre></td><td><ul><li>rate</li></ul></td><td>System currency units for one non-system currency unit<br>(amount in bet currency * rate = amount in system currency),<br>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><code>           }
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre><code>       ]
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre><code>  },
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>

### BetDetails array <a href="#mtsticketplacementresponse-v3.0-betdetailsbetdetailsarray" id="mtsticketplacementresponse-v3.0-betdetailsbetdetailsarray"></a>

The betDetails array consists of the following fields. The code and message fields indicate potential errors in the requested bet in the Ticket placement request.

* betId
* selectionDetails
* code
* message
* suggestion

\
**BetDetails array table:**

<table data-full-width="true"><thead><tr><th width="349.1146240234375">Example</th><th width="146.9564208984375">Field Name</th><th width="147.524169921875">Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>"betDetails": [
</code></pre></td><td></td><td>Array of betDetails,<br>minimal number of betDetails per Ticket placement response = 1,<br>maximum number = 10</td><td>O</td><td>Array</td></tr><tr><td><pre><code>      {
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre data-overflow="wrap"><code>"betId": "Ticket_3690_bet0",
</code></pre></td><td>betId</td><td>Unique ticket bet 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 data-overflow="wrap"><code>"selectionDetails": [
      { 
</code></pre></td><td>selectionDetails</td><td>Array of bet selectionDetails,<br>minimal number of selectionsDetails per bet = 1,<br>maximum number = 100</td><td>M</td><td>Array</td></tr><tr><td><pre><code>    "selection":  {
</code></pre></td><td><ul><li>selection</li></ul></td><td>A selection that has been included in the Ticket Placement Request is returned here, however included can be only selections of "type":"uf" or "type":"external" or "type":"uf-custom-bet"</td><td>M</td><td>Object</td></tr><tr><td><pre data-overflow="wrap"><code>         "type": .....,
            ......
            ,
</code></pre></td><td><br></td><td>Only possible selection types:<br>"type": "uf" , "type": "external", "type": "uf-custom-bet"</td><td>M</td><td>String</td></tr><tr><td><pre><code>         "useHarmOdds": true,
</code></pre></td><td><p></p><p></p><ul><li><p></p><ul><li>useHarmOdds</li></ul></li></ul></td><td>Present only if selection type is "uf-custom-bet"</td><td>O</td><td>Boolean</td></tr><tr><td><pre><code>         "harmOddsApplied": true
</code></pre></td><td><ul><li><p></p><ul><li>harmOddsApplied</li></ul></li></ul></td><td>Present only if selection type is "uf-custom-bet",<br>Indicates successful odds harmonization</td><td>O</td><td>Boolean</td></tr><tr><td><pre><code><strong>            },
</strong></code></pre></td><td></td><td></td><td></td><td></td></tr><tr><td><pre data-overflow="wrap"><code>         "autoAcceptedOdds": {  
</code></pre></td><td><ul><li>autoAcceptedOdds</li></ul></td><td>Provides information of an eventual odds change (at ticket acceptance)</td><td>O</td><td>Object</td></tr><tr><td><pre data-overflow="wrap"><code>                "type": "decimal",
</code></pre></td><td><ul><li><p></p><ul><li>type</li></ul></li></ul></td><td>Any other odds format will be converted to decimal and returned here</td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>                "value": "1.25"
</code></pre></td><td><ul><li><p></p><ul><li>value</li></ul></li></ul></td><td>Specifies the odds which the ticket was placed with,<br>String pattern: 1 up to 8 digits (the first digit should not be 0), optionally followed by a decimal point and 1 up to 8 digits,<br>Java regex: ^[1-9]\\d{0,7}(\\.\\d{1,8})?$</td><td>M</td><td>String</td></tr><tr><td><pre><code>                  },
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre data-overflow="wrap"><code>         "code": -701,
</code></pre></td><td><ul><li>code</li></ul></td><td>Selection validation code,<br>see list of <a href="../validation-codes">validation codes</a></td><td>M</td><td>Integer</td></tr><tr><td><pre data-overflow="wrap"><code>         "message": " Liability EUR 722.8 is over Limit ID Total liability limit EUR...
           }
        ],   
</code></pre></td><td><ul><li>message</li></ul></td><td>Readable selection validation code,<br>minimal string length = 1,<br>maximum string length = 128,<br>(example is shortened)</td><td>O</td><td>String</td></tr><tr><td><pre><code>"code": -701,
</code></pre></td><td>code</td><td>Bet validation code,<br>see list of <a href="../validation-codes">validation codes</a></td><td>M</td><td>Integer</td></tr><tr><td><pre data-overflow="wrap"><code>"message": " Liability EUR 722.8 is over Limit ID Total liability limit EUR...
</code></pre></td><td>message</td><td>Readable bet validation code, minimal string length = 1,<br>maximum string length = 128,<br>(example is shortened)</td><td>O</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>"suggestion": {
</code></pre></td><td>suggestion</td><td>In the case of a liability excess, MTS may return a re-offer or an alternative stake suggestion (both are MTS features)</td><td>O</td><td>Object</td></tr><tr><td><pre data-overflow="wrap"><code>          "type": "reoffer",
</code></pre></td><td><ul><li>type</li></ul></td><td><p>Enumerator:</p><ul><li>reoffer</li><li>alt-stake</li></ul></td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>           "mode": "automatic",
</code></pre></td><td><ul><li>mode</li></ul></td><td><p>Specifies the re-offer functionality operation mode,<br>if "type": "alt-stake" this field is omitted,<br>enumerator:</p><ul><li>manual - reserved for eventual future MTS functionalities</li><li>automatic - re-offered stake amount is calculated by MTS</li></ul></td><td>O</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>            "stake":   [
</code></pre></td><td><ul><li>stake</li></ul></td><td>New suggested stake,<br>array of stake,<br>minimal number of stake per suggestion =1,<br>maximum number = 5,<br>see the stake array description (in the <a href="../ticket-placement-request#mtsticketplacementrequest-v3.0-betsbetsarray">bets array table)</a></td><td>M</td><td>Array</td></tr><tr><td><pre data-overflow="wrap"><code>                 {
                  "type": .....,
                  .......
                  }
</code></pre></td><td><br></td><td><br></td><td>M</td><td>String</td></tr><tr><td><pre><code>              ]
           }
         }
      ],     
</code></pre></td><td><br></td><td></td><td></td><td></td></tr></tbody></table>
