---
title: "cancel_full_rejected"
canonical_url: "https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual/cancel_full_rejected"
markdown_url: "https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual/cancel_full_rejected.md"
last_updated: "2026-11-11T13:15:15Z"
---

# 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`](https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual/cancel_full_accepted.md): `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

```java
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)

```json
{
  "operatorId": 9985,
  "correlationId": "corr-1",
  "timestampUtc": 1710000000000,
  "operation": "ticket-cancel",
  "version": "3.0",
  "content": {
    "type": "cancel",
    "cancellationId": "cncl-rej",
    "details": {
      "type": "ticket",
      "ticketId": "mock_cancel_rejected",
      "ticketSignature": "sandbox-signature"
    }
  }
}
```

| 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_rejected` → `customer_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):

```json
{
  "correlationId": "corr-1",
  "timestampUtc": 1710000001000,
  "operation": "ticket-cancel",
  "version": "3.0",
  "content": {
    "type": "cancel-reply",
    "cancellationId": "cncl-rej",
    "ticketId": "mock_cancel_rejected",
    "status": "rejected",
    "code": -2013,
    "message": "Ticket time for cancellation expired",
    "signature": "sandbox-signature"
  }
}
```

> **Info**
>
> 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`](https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual/cancel_full_accepted.md) 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](https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual.md#error-responses) in the parent manual.
