# Rollback the ticket

The request is used in case Bet Engine made a ticket’s rollback.&#x20;

Rollback happens when the ticket is originally set one way, but later (can be minutes or sometimes even days after) the results are changed and the ticket is set differently. A ticket’s rollback means that ticket status changes to the previous ticket status (open) and then it can be set to the opposite. After successful response Bet Engine should make a `ticket_win` / `ticket_lost` / `ticket_void` request.

Request fields:

<table><thead><tr><th width="129">Attribute</th><th width="117">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>operator</td><td>string</td><td>Name of the operator as registered on the system</td></tr><tr><td>ticket_id</td><td>string</td><td>Ticket id</td></tr><tr><td>reason</td><td>string</td><td>Reason for <code>rollback</code> action</td></tr></tbody></table>

Sample request:

```json
[
    "action": "ticket_rollback", 
    "data": {
        "operator": "operator-code",
        "ticket_id": "1330556611374148608",
        "reason": "some-reason"
    }
}
```

Sample response:

```
Response: 200
Doesn't require any payload
```


---

# 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://developer.betstack.io/pam-platform-api/rollback-the-ticket.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.
