Cancellation Request

Source
Destination

Client

MTS

MTS supports the cancellation of any accepted ticket (or a bet within a multi-bet ticket) in its entire or partial value. In the case of partial cancellation, a portion of the ticket's original stake is returned to the bettor while the remaining part is still in play, and the payout depends on the event's outcome. In this case, the cancellation request must include the ratio of the stake (field "percentage") the bettor receives back.

Clients can send as many partial cancellation requests as they need, provided that the cancellation ratio of each cancellation request includes all previous cancellation requests' ratios, as MTS does not aggregate the ratio values of individual requests and treats the last request as if there were no previous requests.

Using different types of the Cancellation details object makes it possible to cancel – fully or partially – a single bet or a subset of bets within a multi-bet ticket, with custom cancellation ratios for each bet. With an appropriate Cancellation request, it is also possible to cancel an eventual re-offer offered by MTS.

Envelope and Content table:

The envelope provides the Content's (Cancellation request) context and contains the following fields (besides Content):

  • operatorId

  • correlationId

  • timestampUtc

  • operation

  • version

Example
Field Name
Field Description
Mandatory/Optional
Data Type
{

  "operatorId": 9985,

operatorId

ID to uniquely identify the client from which the ticket originated, ID is provided to the client by Sportradar, The client is obliged to include it in every ticket

M

Integer

  "content": {

content

See Content object description below

M

Object

       ...........

       ...........

  },

  "correlationId": "ew24faU66psM",

correlationId

Client defined string to facilitate the request-response pairing, Sportradar is obliged to return the same string in every response

M

String

  "timestampUtc": 1678265556000,

timestampUtc

Timestamp of ticket placement as submitted by the client (Unix time milliseconds format), minimal: 1, maximum: 9223372036854776000

M

Integer

  "operation": "ticket-cancel",

operation

Declaration of ticket content type, should be "ticket-cancel" in case of Cancellation request

M

String

  "version": "3.0"

version

Indicates the ticket format version

M

String

}

Content object (Cancellation request)

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

  • type

  • cancellationId

  • details

Content object table:

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

Object

    "type": "cancel",

type

Declaration of content type, should be "cancel" in case of Cancellation request

M

String

    "cancellationId": "CANC8787414", 

cancellationId

Unique ID of this particular cancellation request in client's system, referenced in eventual ack message, minimal string length = 1, maximum string length = 128

O

String

    "details": {

details

Cancellation details - additional information related to the ticket

M

Object

        "type": .......
  • type

See description of the 5 specific "details" types below

  • ticket

  • ticket-partial

  • bet

  • bet-partial

  • reoffer

M

String

        ..............

        ..............    

    }

}

1. Cancellation details ("type": "ticket") table

This type is used to cancel an entire ticket.

Fields:

  • type

  • ticketId

  • ticketSignature

  • code

Example
Field Name
Field Description
Mandatory/Optional
Data Type
    {

        "type": "ticket",

type

Specifies the type of cancellation details

M

String

        "ticketId": "Ticket_3690",

ticketId

ID of the original ticket that is to be affected by this cancellation

M

String

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

ticketSignature

Signature from MTS's response to initial ticket placement

M

String

        "code": 101     

code

Cancellation reason code, see list of codes

M

Integer

    }

2. Cancellation details ("type": "ticket-partial") table

This type is used to cancel only a portion of the ticket.

Fields:

  • type

  • ticketId

  • ticketSignature

  • code

  • percentage

Example
Field Name
Field Description
Mandatory/Optional
Data Type
    {

        "type": "ticket-partial",

type

Specifies the type of cancellation details

M

String

        "ticketId": "Ticket_3690",

ticketId

ID of the original ticket that is to be affected by this cancellation

M

String

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

ticketSignature

Signature from MTS's response to initial ticket placement

M

String

        "code": 103,     

code

Cancellation reason code, see list of codes

M

Integer

        "percentage": "0.9"

percentage

Proportion of the ticket that is to be cancelled, format: up to 8 decimal places after a zero and decimal point, has to be passed as a decimal (i.e. 0.9 and not 90), Java regex: ^0(\\.\\d{1,8})?$

M

String

    }

3. Cancellation details ("type": "bet") table

This type is used to cancel an entire bet.\

Fields:

  • type

  • ticketId

  • ticketSignature

  • betId

  • code

Example
Field Name
Field Description
Mandatory/Optional
Data Type
    {

        "type": "bet",

type

Specifies the type of cancellation details

M

String

        "ticketId": "Ticket_3690",

ticketId

ID of the original ticket that is to be affected by this cancellation

M

String

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

ticketSignature

Signature from MTS's response to initial ticket placement

M

String

        "betId": "bjda6GH",

bettId

ID of the initial bet (defined by client) which is to be affected with this cancellation

M

String

        "code": 103,     

code

Cancellation reason code, see list of codes

M

Integer

    }

4. Cancellation details ("type": "bet-partial") table

This type is used to cancel a portion of a bet.

Fields:

  • type

  • ticketId

  • ticketSignature

  • betId

  • code

  • percentage

Example
Field Name
Field Description
Mandatory/Optional
Data Type
    {

        "type": "bet-partial",

type

Specifies the type of cancellation details

M

String

        "ticketId": "Ticket_3690",

ticketId

ID of the original ticket that is to be affected by this cancellation

M

String

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

ticketSignature

Signature from MTS's response to initial ticket placement

M

String

        "betId": "bjda6GH",

betId

ID of the initial bet (defined by client) which is to be affected with this cancellation

M

String

        "code": 103     

code

Cancellation reason code, see list of codes

M

Integer

        "percentage": "0.8"

percentage

Proportion of the bet that is to be cancelled, format: up to 8 decimal places after a zero and decimal point, has to be passed as a decimal (i.e. 0.8 and not 80), Java regex: ^0(\\.\\d{1,8})?$

M

String

    }

5. Cancellation details ("type": "reoffer") table

This type is used to explicitly cancel a re-offer that has been previously sent by MTS. By means of this cancellation, a previously reserved liability (by the re-offer functionality) is released.

Fields:

  • type

  • ticketId

  • ticketSignature

  • code

Example
Field Name
Field Description
Mandatory/Optional
Data Type
    {

        "type": "reoffer",

type

Specifies the type of cancellation details

M

String

        "ticketId": "Ticket_3690",

ticketId

ID of the original ticket that is to be affected by this cancellation

M

String

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

ticketSignature

Signature from MTS's response to initial ticket placement

M

String

        "code": 103     

code

Cancellation reason code, see list of codes

M

Integer

    }

Last updated

Was this helpful?