# Entire Ticket Cancellation with Acknowledgement (Including a Rejection Example)

This is an example of an entire ticket cancellation.

<details>

<summary><strong>Cancellation Request</strong></summary>

```json
{
  "operatorId": 9985,
  "content": {
    "type": "cancel",
    "cancellationId": "CANC8787414",
    "details": {
      "type": "ticket",
      "ticketId": "Ticket_3668",
      "ticketSignature": "HHDut7XIEl+SmjWB3xDB0AIB6fUZVFOvmGKm6Rcvxm0=",
      "code": 101
    }
  },
  "correlationId": "7Swn291Bxk",
  "timestampUtc": 1678980298000,
  "operation": "ticket-cancel",
  "version": "3.0"
}
```

</details>

<details>

<summary><strong>Cancellation Response</strong> </summary>

```json
{
  "content": {
    "type": "cancel-reply",
    "cancellationId": "CANC8787414",
    "signature": "ztmWXaG1HKHGnb8oqs9QzhxnaThiWjf4ARtN9YMs7Ag=",
    "status": "accepted",
    "ticketId": "Ticket_3668",
    "code": 0,
    "message": "Transaction processed"
  },
  "correlationId": "7Swn291Bxk",
  "timestampUtc": 1678980299000,
  "operation": "ticket-cancel",
  "version": "3.0"
}
```

</details>

<details>

<summary><strong>Acknowledgement Message</strong></summary>

```json
{
  "operatorId": 9985,
  "content": {
    "type": "cancel-ack",
    "cancellationId": "CANC8787414",
    "ticketId": "Ticket_3668",
    "cancellationSignature": "ztmWXaG1HKHGnb8oqs9QzhxnaThiWjf4ARtN9YMs7Ag=", 
    "acknowledged": true
  },
  "correlationId": "rZ20Cb1ka8",
  "timestampUtc": 1678980301000,
  "operation": "ticket-cancel-ack",
  "version": "3.0"
}
```

</details>

<details>

<summary><strong>Acknowledgement Reply Message</strong></summary>

```json
{
  "content": {
    "type": "cancel-ack-reply",
    "cancellationId": "CANC8787414",
    "signature": "TjlNtQGQUBWeOYbaClN+/Tnip5xBskLseR+pea/sAgE=",
    "status": "accepted",
    "ticketId": "Ticket_3668",
    "code": 0,
    "message": "Transaction processed"
  },
  "correlationId": "rZ20Cb1ka8",
  "timestampUtc": 1678980302000,
  "operation": "ticket-cancel-ack",
  "version": "3.0"
}
```

</details>

<br>

<br>

### Rejection Example <a href="#mtsentireticketcancellationwithacknowledgement-includingarejectionexample-v3.0-rejectionexample" id="mtsentireticketcancellationwithacknowledgement-includingarejectionexample-v3.0-rejectionexample"></a>

Alternatively, an example of the same Cancellation request being rejected can be found below.\
List of available Cancellation rejection codes can be found [here](/transaction30api/api-description/ticket-json-format-description/cancellation-description-and-flow/cancellation-response.md).

<details>

<summary><strong>Cancellation Response</strong></summary>

```json
{
  "content": {
    "type": "cancel-reply",
    "cancellationId": "CANC8787414",
    "signature": "ztmWXaG1HKHGnb8oqs9QzhxnaThiWjf4ARtN9YMs7Ag=",
    "status": "rejected",
    "ticketId": "Ticket_3668",
    "code": -2013,
    "message": "Ticket time for cancellation expired"
  },
  "correlationId": "7Swn291Bxk",
  "timestampUtc": 1678980299000,
  "operation": "ticket-cancel",
  "version": "3.0"
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/mts/transaction-3.0-api/mts-related-transaction-examples/cancellation-examples/entire-ticket-cancellation-with-acknowledgement-including-a-rejection-example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
