# 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 %}
