Goal: Send a full ticket cancel and receive a rejected reply with code -2013.
Sandbox module name: cancel_full_rejected.
Use the same shape as cancel_full_accepted: CancelRequest + CancelDetails.newTicketCancelDetailsBuilder().
Route with either:
ticketId: "mock_cancel_rejected", ormeta.punter.id: "customer_cancel_rejected" with any normal ticketId.Send with mbsSdk.getTicketProtocol().sendCancel(request).
import com.sportradar.mbs.sdk.entities.cancellation.CancelDetails;
import com.sportradar.mbs.sdk.entities.common.AcceptanceStatus;
import com.sportradar.mbs.sdk.entities.request
{
"operatorId": 9985,
"correlationId": "corr-1",
"timestampUtc": 1710000000000,
"operation": "ticket-cancel",
"version": "3.0",
"content": {
"type": "cancel",
"cancellationId"
Magic map: mock_cancel_rejected → customer_cancel_rejected.
Wire JSON (content type "cancel-reply"; no cancel-ack on this reject path):
{
"correlationId": "corr-1",
"timestampUtc": 1710000001000,
"operation": "ticket-cancel",
"version": "3.0",
"content": {
"type": "cancel-reply",
"cancellationId": "cncl-rej",
"ticketId
This is a successful protocol round-trip with a rejected CancelResponse — handle with if on getCode() / getStatus(), not try/catch.
| Mistake | Result |
|---|---|
Using mock_cancel_accepted / customer_cancel_accepted | Hits cancel_full_accepted instead |
| Wrong magic id and no matching punter | Fallback -999 |
Treating -2013 as a transport / schema error | It is a sandbox scenario reject on cancel-reply |
See also: Error responses in the parent manual.
| Field name | Value | Mandatory / Optional | Data type | Ignored by sandbox |
|---|---|---|---|---|
operatorId | 9985 | Mandatory | integer | Yes |
correlationId | "corr-1" | Mandatory | string | No (echoed in reply) |
timestampUtc | 1710000000000 | Mandatory | integer | Yes |
operation | "ticket-cancel" | Mandatory | string | No |
version | "3.0" | Mandatory | string | No (echoed in reply) |
content.type | "cancel" | Mandatory | string | No |
content.cancellationId | "cncl-rej" | Mandatory | string | No (echoed in reply) |
content.details.type | "ticket" | Mandatory | string | No (routing: full cancel) |
content.details.ticketId | "mock_cancel_rejected" | Mandatory (sandbox) | string | No (routing via magic id; echoed) |
content.details.ticketSignature | "sandbox-signature" | Mandatory | string | Yes |
| Java getter | Expected value |
|---|---|
getStatus() | AcceptanceStatus.REJECTED |
getCode() | -2013 |
getMessage() | "Ticket time for cancellation expired" |
getCancellationId() | "cncl-rej" (echo) |
getTicketId() | "mock_cancel_rejected" (echo) |