> For the complete documentation index, see [llms.txt](https://doc.xendbridge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.xendbridge.com/api-method-calls/third-party-order-operations/cancel-order.md).

# Cancel Order

The `POST` endpoint accepts the request of `emailAddress` & `orderReference` of the third-party customer to cancel orders made. The `secretKey` is also needed here in the header.

If successful returns an " " `200`message. See the example below;

## Cancel order

<mark style="color:green;">`POST`</mark> `https://canary.xendbridge.com/api/PeerToPeerOrder/ThirdParty/Order/Cancel`

#### Headers

| Name                                        | Type | Description |
| ------------------------------------------- | ---- | ----------- |
| secretKey<mark style="color:red;">\*</mark> |      | {secretkey} |

#### Request Body

| Name                                             | Type | Description                          |
| ------------------------------------------------ | ---- | ------------------------------------ |
| emailAddress<mark style="color:red;">\*</mark>   |      | <johndoe@gmail.com>                  |
| orderReference<mark style="color:red;">\*</mark> |      | XB\_0877e5692ee946f491bafab275d3d522 |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "data": true,
    "status": "OK",
    "message": ""
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Request Fields" %}

<table><thead><tr><th width="195.66666666666666">Parameters</th><th width="150">Type</th><th>Definitions</th></tr></thead><tbody><tr><td>emailAddress</td><td>string</td><td><code>Required</code> The email address of the third party client.</td></tr><tr><td>orderReference</td><td>string</td><td><code>Required</code> The order reference of an order made.</td></tr></tbody></table>
{% endtab %}

{% tab title="Response Fields" %}

<table><thead><tr><th width="150">Parameters</th><th width="150">Type</th><th>Definitions</th></tr></thead><tbody><tr><td>data</td><td>bool</td><td>This can either be true or false.</td></tr><tr><td>status</td><td>string</td><td>This returns a status message of the request.</td></tr><tr><td>message</td><td>string</td><td>This returns an empty string if successful.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc.xendbridge.com/api-method-calls/third-party-order-operations/cancel-order.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
