Cancel delivery
Delivery can be canceled until the status is waiting (30).
Canceling delivery after that phase will set Delivery's status as not_delivered (90)
For more information regarding delivery lifecycle: Create Delivery
Resource
POST /v1/delivery/deliveries/:uuid/cancel
Authorization
OAuth 2.0 bearer token with Delivery scope.
Query Paramaters
Name | Type | Description |
---|---|---|
business_id | string | Unique identifier representing a Business. |
Path Parameters
Name | Type | Description |
---|---|---|
uuid | string | Delivery id received when creating a new delivery |
Response body
{
"id": "DR-c0ae8df32b9041fdb008c9a21e91d57e",
"product_id": "d88d078d-d9e7-4aae-89bb-1eb839a4b4c4",
"bundle_id": "B-g84e8df32b9041fdb008c9a21e91ffde",
"display_identifier": "M87483H8F889",
"status": "cancelled",
"status_code": 100,
"cannot_deliver_info": null,
"courier": {
"name": "Alex(Pixel 2)QA",
"phone": "50-50"
},
"pickup": {
"address": "HaBarzel 25, Tel Aviv",
"lat": 32.109528,
"lng": 34.840088,
"note": "Apt: 3, floor: 4"
},
"drop_off": {
"address": "Dvora'h Ha'neviah 74, Tel Aviv",
"lat": 32.116846,
"lng": 34.838704,
"note": ""
},
"pickup_contact": {
"name": "Itai Sagi",
"phone_number": "972554754407"
},
"drop_off_contact": {
"name": "Dean Smith",
"phone_number": "972593877655"
},
"started_at": "2018-08-27T10:26:10.293116Z",
"scheduled_at": null,
"arrived_at": null,
"picked_up_at": "2018-08-27T10:28:03.118387Z",
"ended_at": "2018-08-27T10:28:21.236545Z"
}
Sandbox
Resource:
POST /v1/delivery_sandbox/deliveries/:uuid/cancel?business_id={{company_id}}
More info can be found here
Note: If uuid parameter equals '1', a fake delivery payload will be returned
Updated almost 2 years ago