# Reschedule Delivery

## Reschedule Delivery

<mark style="color:green;">`POST`</mark> `{baseUrl}/deliveries/:id/reschedule`

Reschedule Delivery by passing deliveryId

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String |             |

#### Headers

| Name                                          | Type   | Description |
| --------------------------------------------- | ------ | ----------- |
| app\_id<mark style="color:red;">\*</mark>     | String |             |
| app\_secret<mark style="color:red;">\*</mark> | String |             |

#### Request Body

| Name                                         | Type   | Description |
| -------------------------------------------- | ------ | ----------- |
| pickupDate<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200 Rescheduled delivery" %}

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

### Sample Success Data

```
// Sample Request Information
Url: https://sandbox.sendstack.africa/api/v1/deliveries/yourDeliveryId/reschedule
NB: Replace yourDeliveryId with an actual delivery Id
Method: POST
Headers: 
 - app_id: "your app_id"
 - app_secret: "your app_secret"
```

```json
// Sample Request body
{
    "pickupDate": "2024-09-22"
}
```

```json
// Sample Response Body - 200 OK
{
       "status": true,
       "message": "Rescheduled delivery",
       "data": {
       "pickup": {
          "address": "42230 Gene Unions",
          "pickupName": "Theodore Dietrich IV",
          "pickupNumber": "8032368985",
          "pickupDate": "2024-03-22T00:00:00.000Z",
          "locationCode": "01",
          "country": "NG",
          "lat": 6.602928,
          "long": 3.345006,
          "lga": "Location 1",
          "state": "Lagos",
          //..truncated for brevity
        }
    }
```

### Sample Error Data

```
// Sample Request Information
Url: https://sandbox.sendstack.africa/api/v1/deliveries/invalidDeliveryId/reschedule
Headers: 
 - app_id: "your app_id"
 - app_secret: "your app_secret"
```

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


---

# 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.sendstackhq.com/delivery-api/bookings/reschedule-delivery.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.
