For the complete documentation index, see llms.txt. This page is also available as Markdown.

cancel_full_rejected

Goal: Send a full ticket cancel and receive a rejected reply with code -2013.

Sandbox module name: cancel_full_rejected.

How to build the request (Java SDK)

1

Create the cancel request

Use the same shape as cancel_full_accepted: CancelRequest + CancelDetails.newTicketCancelDetailsBuilder().

2

Route the request

Route with either:

  • Magic ticketId: "mock_cancel_rejected", or

  • meta.punter.id: "customer_cancel_rejected" with any normal ticketId.

3

Send the request

Send with mbsSdk.getTicketProtocol().sendCancel(request).

Java example

import com.sportradar.mbs.sdk.entities.cancellation.CancelDetails;
import com.sportradar.mbs.sdk.entities.common.AcceptanceStatus;
import com.sportradar.mbs.sdk.entities.request.CancelRequest;
import com.sportradar.mbs.sdk.entities.response.CancelResponse;

CancelRequest request = CancelRequest.newBuilder()
    .setCancellationId("cncl-rej")
    .setDetails(CancelDetails.newTicketCancelDetailsBuilder()
        .setTicketId("mock_cancel_rejected")
        .setTicketSignature("sandbox-signature")
        .build())
    .build();

CancelResponse response = mbsSdk.getTicketProtocol().sendCancel(request);
// expect: response.getStatus() == AcceptanceStatus.REJECTED, getCode() == -2013

Wire JSON (what the SDK sends)

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

Magic map: mock_cancel_rejectedcustomer_cancel_rejected.

Expected response

Java getter
Expected value

getStatus()

AcceptanceStatus.REJECTED

getCode()

-2013

getMessage()

"Ticket time for cancellation expired"

getCancellationId()

"cncl-rej" (echo)

getTicketId()

"mock_cancel_rejected" (echo)

Wire JSON (content type "cancel-reply"; no cancel-ack on this reject path):

This is a successful protocol round-trip with a rejected CancelResponse — handle with if on getCode() / getStatus(), not try/catch.

Common mistakes

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.

Was this helpful?