Cancellation Request
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
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
See Content object description below
M
Object
correlationId
Client defined string to facilitate the request-response pairing, Sportradar is obliged to return the same string in every response
M
String
timestampUtc
Timestamp of ticket placement as submitted by the client (Unix time milliseconds format), minimal: 1, maximum: 9223372036854776000
M
Integer
operation
Declaration of ticket content type, should be "ticket-cancel" in case of Cancellation request
M
String
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:
Object
type
Declaration of content type, should be "cancel" in case of Cancellation request
M
String
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
Cancellation details - additional information related to the ticket
M
Object
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
type
Specifies the type of cancellation details
M
String
ticketId
ID of the original ticket that is to be affected by this cancellation
M
String
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
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
type
Specifies the type of cancellation details
M
String
ticketId
ID of the original ticket that is to be affected by this cancellation
M
String
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
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
type
Specifies the type of cancellation details
M
String
ticketId
ID of the original ticket that is to be affected by this cancellation
M
String
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
bettId
ID of the initial bet (defined by client) which is to be affected with this cancellation
M
String
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
type
Specifies the type of cancellation details
M
String
ticketId
ID of the original ticket that is to be affected by this cancellation
M
String
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
betId
ID of the initial bet (defined by client) which is to be affected with this cancellation
M
String
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
type
Specifies the type of cancellation details
M
String
ticketId
ID of the original ticket that is to be affected by this cancellation
M
String
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
Last updated
Was this helpful?