Cancellation Response

Destination
Source

Client

MTS

Envelope and Content table:

The envelope provides the Content's (Cancellation 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": "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": 1678265557000,

timestampUtc

Timestamp of ticket placement as submitted by the client (Unix time in 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 response

M

String

  "version": "3.0"

version

Indicates the ticket format version

M

String

}

Content object (Cancellation response)

The Content object includes the following fields:

  • type

  • cancellationId

  • signature

  • status

  • ticketId

  • code

  • message

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":"cancel-reply. For description see Error-reply Response.

Content object table:

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

Object

    "type": "cancel-reply",

type

Declaration of the content type, should be "cancel-reply" in the case of Cancellation response

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

M

String

    "cancellationId": "CANC8787414", 

cancellationId

ID from the corresponding request, minimal string length = 1, maximum string length = 128

O

String

    "signature": "ouHgh3Yn+1p9C0Ms
3brurfLBlLTcweMdP0vM2HI+Lx8=",

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

Request outcome, enumerator:

  • accepted

  • rejected

M

    "ticketId": "Ticket_3690",

ticketId

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

M

String

    "code": -2013,    

code

Cancellation response code, see list of codes below

M

Integer

    "message": "Ticket time for cancellation expired"

message

Readable ticket response validation code, minimal string length = 1, maximum string length = 128

O

}

Cancellation response codes:

Code
Description
0

Transaction processed

-2010

Ticket not found

-2011

Client (bookmaker) not found

-2012

Cannot be cancelled because ticket contains live selection

-2013

Ticket time for cancellation expired

-2015

Cannot be cancelled because ticket contains pre-match selection

-2016

Cannot be cancelled because particular cancellation option is not active

-2017

Cannot be cancelled because ticket is already settled

-2018

Cannot be cancelled because ticket is already cancelled

-2019

Cancel factor is out of bounds (when the cancellation factor is outside the allowed range of 0-100%)

-2020

Cancel factor is lower than existing (when the cancellation factor is lower than the previous one)

-2021

Cannot be cancelled because bet id was not found

-2022

Ticket already settled manually

-2023

Cannot be cancelled because ticket contains inactive market

-2024

Cannot be cancelled because code is not compatible with partial cancellation

-999

Generic exception code

Last updated

Was this helpful?