Update Delivery Window

Update delivery window by specifying dropId, control business id and updated delivery window.

NB: The 'user' field in the request body is the control business id.

Update delivery window

POST {baseUrl}/drops/updateDeliveryWindow

Request Body

{
  "status": true,
  "message": "Delivery cancelled",
  "data": {
  }
}
// Sample Request Information
Url: https://sandbox.sendstack.africa/api/v1/drops/updateDeliveryWindow
Method: POST
Headers: 
 - app_id: "your app_id"
 - app_secret: "your app_secret"

Sample Success Data

// Sample Request body
{
    "estimatedPickupWindow": {
        "date": "2024-09-22 00:00:00",
        "start": "2024-09-22  07:00:00",
        "end": "2024-09-22 13:00:00"
    },
    "estimatedDropoffWindow": {
        "date": "2024-09-22 00:00:00",
        "start": "2024-09-22 13:00:00",
        "end": "2024-09-22 18:00:00"
    },
    "user": "65b78c4e13d8753d300a1c59",
    "dropIds": ["65b8c2c734d8cd1be099fd45"],
    "pickupDate": "2024-09-22"
}
//Sample Response Body - 200 OK
{
    "status": true,
    "message": "Delivery window updated",
    "data": [
        {
            "id": "65b8c2c734d8cd1be099fd45",
            "status": "PENDING",
            "paymentStatus": "PENDING",
            "trackingId": "E033LM",
            //...truncated for brevity
        }
    ]
}

Sample Error Data

// Sample Request body
{
    "estimatedPickupWindow": {
        "date": "2024-09-22 00:00:00",
        "start": "2024-09-22  07:00:00",
        "end": "2024-09-22 13:00:00"
    },
    "estimatedDropoffWindow": {
        "date": "2024-09-22 00:00:00",
        "start": "2024-09-22 13:00:00",
        "end": "2024-09-22 18:00:00"
    },
    "user": "65b78c4e13d8753d300a1c59",
    "dropIds": ["invalidDropId"],
    "pickupDate": "2024-09-22"
}
//Sample Response Body - 400 Bad Request
{
    "status": false,
    "message": "Invalid dropId"
}

Last updated