Pre-validated Ticket Placement Response

Destination
Source

Client

MTS

Ticket structure

The Pre-validated 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 (Pre-validated 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": "62ka01mxre",

correlationId

Same string as submitted by the client in the Pre-validated ticket placement request

M

String

  "timestampUtc": 1689752904000,

timestampUtc

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

M

Integer

  "operation": "ticket-placement-inform",

operation

Should be "ticket-placement-inform" in the case of a Pre-validated ticket placement response

M

String

  "version": "3.0"

version

Indicates the ticket format version

M

String

}

Content object (Pre-validated 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-inform-reply",

type

Declaration of the content type, should be "ticket-inform-reply" in the case of a Pre-validated 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": "gOxOcWAjiPn8hEjyPlzDY
u0B7aNA85fOeAB8m1j+Wm0=",

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": "accepted",

status

Suggestion on ticket acceptance, provided by MTS, enumerator:

  • accepted

  • rejected

M

String

      "ticketId": "Ticket_10150",

ticketId

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

M

String

      "code": 0,

code

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

M

Integer

      "message": "Transaction processed",

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.), this rate was used at ticket acceptance time when converting the actual bet currency to the MTS system currency

O

Array

           {

            "fromCurrency": "USD",
  • fromCurrency

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

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": "1.07326"
  • rate

Non-system currency unit per one system currency unit, 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. Code and Message fields indicate eventual errors in the requested bet (from the Pre-validated 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 one Pre-validated ticket placement response = 1, maximum number = 10

O

Array

      {

        "betId": "Ticket_10150_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 = 64

M

Array

           {

             "selection": 
  • selection

A selection that was included in the Pre-validated ticket placement request is returned here, however included are only the last level selections (of "type":"uf" or "type":"external")

M

Object

{

                  "type": .....,

Only possible types: "type":"uf" and "type":"external"

M

String

                   .....

                },

             "autoAcceptedOdds":  
  • autoAcceptedOdds

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

O

Object

                {

                "type": "decimal",
    • type

Currently only supported odds type: "type":"decimal"

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": 0,
  • code

Selection validation code, see list of validation codes

M

Integer

             "message": "Transaction processed",
  • message

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

O

String

           }

         ],

        "code": 0,

code

Bet validation code, see list of validation codes

M

Integer

        "message": "Transaction processed",

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?