Ticket Placement Response

Destination
Source

Client

MTS

Ticket structure

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

Example
Field Name
Field Description
Mandatory/Optional
Data Type
{

  "content": {

content

See Content object description below

M

Object

       ...........

       ...........

  },

  "correlationId": "Uw59kwUL",

correlationId

The same string as submitted by client in the Ticket placement request

M

String

  "timestampUtc": 1678202889000,

timestampUtc

Timestamp of response placement (Unix time in milliseconds format), minimal: 1, maximum: 9223372036854776000

M

Integer

  "operation": "ticket-placement",

operation

Should be "ticket-placement" in case of Ticket placement response,

In case of Cancellation, Cashout and Non-SR settlement requests / responses, enumerator:

  • "ticket-cancel"

  • "ticket-cashout"

  • "ticket-ext-settlement",

In case of Acknowledgement messages and Acknowledgement reply messages - enumerator:

  • "ticket-placement-ack"

  • "ticket-cancel-ack"

  • "ticket-cashout-ack"

  • "ticket-ext-settlement-ack"

M

String

  "version": "3.0"

version

Indicates the ticket format version

M

String

}

Content object (Ticket placement response)

The Content object includes the following fields:

  • type

  • signature

  • status

  • ticketId

  • code

  • message

  • betDetails

  • exchangeRate

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.

Content object table

Example
Field Name
Field Description
Mandatory/Optional
Data Type
  "content": {

Object

      "type": "ticket-reply",

type

Declaration of the content type, should be "ticket-reply" in the case of Ticket placement response

or "error-reply" in the case of major ticket errors or internal system errors (see also Error-reply Response).

M

String

      "signature": "HHDut7XIEl+SmjWB3x
DB0AIB6fUZVFOvmGKm6Rcvxm0=",

signature

String calculated and sent by MTS to be used as a proof that the response has actually been provided by MTS, minimal string length = 1, maximum string length = 128

M

String

      "status": "rejected",

status

Suggestion on ticket acceptance, provided by MTS, enumerator:

  • accepted

  • rejected

M

String

      "ticketId": "Ticket_3690",

ticketId

Used to identify the ticket that this response relates to, minimal string length = 1, maximum string length = 128

M

String

      "code": -701,

code

Ticket response validation code (the main reason the ticket has eventually been rejected), see list of validation codes

M

Integer

      "message": "Liability EUR 722.8 
is over Limit ID Total liability 
limit EUR...

message

Readable ticket response validation code, minimal string length = 1, maximum string length = 128 (example is shortened)

O

String

      "betDetails":   [

betDetails

For syntax, see betDetails description

O

Array

         ......

         ......

         ],

      "exchangeRate":   [

exchangeRate

MTS has a system currency (used for defining liability limits etc.), details can be found here. This rate was used at ticket acceptance time when converting actual bet currency to the MTS system currency

O

Array

           {

            "fromCurrency": "USD",
  • fromCurrency

Actual bet currency, 3 or 4 letter currency code, BTC and mBTC are also supported (4 letters only apply to mBTC). For more details please check https://www.iso.org/iso-4217-currency-codes.html

M

String

            "toCurrency": "EUR",
  • toCurrency

MTS system currency (currently the euro, so for the time being only "EUR" can be expected), 3 or 4 letter currency code, BTC and mBTC are also supported (4 letters only apply to mBTC). For more details please check https://www.iso.org/iso-4217-currency-codes.html

M

String

            "rate": "0.931741"
  • rate

System currency units for one non-system currency unit (amount in bet currency * rate = amount in system currency), string pattern: 1 up to 8 digits, optionally followed by a decimal point and 1 up to 8 digits, Java regex: ^\\d{1,8}(\\.\\d{1,8})?$

M

String

           }

       ]

  },

BetDetails array

The BetDetails array consists of the following fields. The Code and Message fields indicate potential errors in the requested bet (from the Ticket placement request).

  • betId

  • selectionDetails

  • code

  • message

  • suggestion

BetDetails array table:

Example
Field Name
Field Description
Mandatory/Optional
Data Type
    "betDetails": [

betDetails

Array of betDetails, minimal number of betDetails per Ticket placement response = 1, maximum number = 10

O

Array

      {

"betId": "Ticket_3690_bet0",

betId

Unique ticket bet id (in the client's system), minimal string length = 1, maximum length = 128

O

String

"selectionDetails": [ 

selectionDetails

Array of bet selectionDetails, minimal number of selectionsDetails per bet = 1, maximum number = 100

M

Array

           {

    "selection": 
  • selection

A selection that was 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"

M

Object

{

                  "type": .....,

Only possible types: "type":"uf" , "type":"external" , "type":"uf-custom-bet"

M

String

              .....

                },

             "autoAcceptedOdds":  
  • autoAcceptedOdds

Provides information of an eventual odds change (at ticket acceptance)

O

Object

                {

                "type": "decimal",
    • type

Any other odds format will be converted to decimal and returned here

M

String

                "value": "1.25"
    • value

Specifies the odds which the ticket was placed with, 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, Java regex: ^[1-9]\\d{0,7}(\\.\\d{1,8})?$

M

String

                  },

             "code": -701,
  • code

Selection validation code, see list of validation codes

M

Integer

             "message": " Liability 
EUR 722.8 is over Limit ID Total 
liability limit EUR...
  • message

Readable selection validation code, minimal string length = 1, maximum string length = 128, (example is shortened)

O

String

           }

         ],

        "code": -701,

code

Bet validation code, see list of validation codes

M

Integer

        "message": " Liability 
EUR 722.8 is over Limit ID Total 
liability limit EUR...

message

Readable bet validation code, minimal string length = 1, maximum string length = 128, (example is shortened)

O

String

        "suggestion": {

suggestion

In the case of a liability excess, MTS may return a re-offer or an alternative stake suggestion (both are MTS features)

O

Object

             "type": "reoffer",
  • type

Enumerator:

  • reoffer

  • alt-stake

M

String

             "mode": "automatic",
  • mode

Specifies the re-offer functionality operation mode, if "type": "alt-stake" this field is omitted, enumerator:

  • manual - reserved for eventual future MTS functionalities

  • automatic - re-offered stake amount is calculated by MTS

O

String

             "stake":   [
  • stake

New suggested stake, array of stake, minimal number of stake per suggestion =1, maximum number = 5, see stake description

M

Array

{

                  "type": .....,

M

String

                   .....

}

              ]

          }

      }

    ],

Last updated

Was this helpful?