# Cancel Drops

## Cancel Drops

<mark style="color:green;">`POST`</mark> `{baseUrl}/drops/cancel`

Cancel drops by passing an array of dropIDs&#x20;

#### Headers

| Name                                          | Type   | Description         |
| --------------------------------------------- | ------ | ------------------- |
| app\_id<mark style="color:red;">\*</mark>     | string | Your app ID         |
| app\_secret<mark style="color:red;">\*</mark> | string | Your app secret key |

#### Request Body

| Name                                      | Type           | Description       |
| ----------------------------------------- | -------------- | ----------------- |
| dropIds<mark style="color:red;">\*</mark> | Array\<string> | array of drop IDs |
| trackingId                                | String         |                   |
| batchId                                   | String         |                   |
| note                                      | String         |                   |

{% tabs %}
{% tab title="200 Deliveries cancelled" %}

```
{
  "status": true,
  "message": "Delivery cancelled",
  "data": {
  }
}
```

{% endtab %}

{% tab title="400: Bad Request Invalid dropId" %}

```
{
    "status": false,
    "message": "Invalid app_id or app_secret",
    "data": {
        "statusCode": 401,
        "message": "Invalid app_id or app_secret",
        "isOperational": true,
    }
}
```

{% endtab %}
{% endtabs %}

```json
// Sample Request information
Url: https://sandbox.sendstack.africa/api/v1/drops/cancel
Method: POST
Headers: 
 - app_id: "your app_id"
 - app_secret: "your app_secret"
```

### Sample Success Data

```json
// Sample Request Body
{
    "dropIds": ["{{dropId}}"],
    "trackingId": "BN8IU3",
    "batchId": "MFUD2A",
    "note": "drop cancelled"
}
```

```json
//Sample Response Body - 200 OK
{
    "status": true,
    "message": "Deliveries cancelled",
    "data": {}
}
```

### Sample Error Data

```json
{
    "dropIds": ["invalid dropId"]
}
```

```json
//Sample Response Body - 400 OK
{
    "status": false,
    "message": "Invalid dropIds"
}
```
