# Cancel an eSIM

## Cancel an eSIM based on ICCID

> Cancels the current Matching ID for the QR code associated with a given ICCID, provided its state is set to “released”. The API requires both the ICCID and the Matching ID

```json
{"openapi":"3.0.0","info":{"title":"Filtered eSIM API","version":"1.0"},"paths":{"/api/v1/eSIM/cancel":{"post":{"description":"Cancels the current Matching ID for the QR code associated with a given ICCID, provided its state is set to “released”. The API requires both the ICCID and the Matching ID","operationId":"cancelOrder","requestBody":{"content":{"application/json":{"schema":{"properties":{"iccid":{"description":"The ICCID (19 or 20 characters) associated with the order to cancel.","type":"string"},"matchingId":{"description":"The matchingId of the SIM.","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"The response data containing the cancellation details.","properties":{"header":{"description":"contains value of functionExecutionStatus.","properties":{"functionExecutionStatus":{"description":"contains value of status of cancellation.","properties":{"status":{"description":"Status of order cancellation","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"}}},"description":"Successfully cancelled the order."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"description":"Error message indicating validation failure or incorrect input.","type":"string"}},"type":"object"}}},"description":"Bad request, invalid ICCID format, or the ICCID state is not \"released\"."},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"description":"Error message describing what went wrong.","type":"string"}},"type":"object"}}},"description":"Internal server error, failed to cancel the order or other issues."}},"summary":"Cancel an eSIM based on ICCID","tags":["eSIM"]}}}}
```


---

# 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.monogoto.io/developer/api/esim/cancel-an-esim.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.
