Show Return confirmation Code
This page provides details how to get the confirmation code and a list of the not delivered deliveries for an active route.
The confirmation code (return_code) will be achievable only when a currier is on the way to the return point.
The list of the deliveries will contain all the deliveries that should be returned by the courier.
Resource
GET /deliveries/not_delivered/courier/phone/:courier_phone
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 |
---|---|---|
courier_phone | string | Phone number of the courier. The phone number can be achieved by: 1. Delivery Webhooks Events 2. Show Bundle 3. Show Delivery Possible formats: 050-1111111 0501111111 972501111111 |
Response body
{
"return_code": "0595",
"deliveries": [
{
"id": "DR-3a6498af1144417d8aca2ae918257c4b",
"bundle_id": "B-efcfc8edaad0403ba707a501cee6f647",
"product_id": "86c31386-f596-48ff-9458-c70634414c9b",
"display_identifier": "M87483H8F889",
"status": "not_delivered",
"status_code": 90,
"cannot_deliver_info": {
"description": "cannot reach client",
"reason_id": 1,
"reason_type": "cannot_reach_client"
},
"courier": {
"name": "John",
"phone": "012-1234567",
"picture_url": ""
},
"pickup": {
"lat": 32.193452,
"lng": 34.8840545,
"address": "Habarzel 1 Tel Aviv",
"note": "floor 1, door 4"
},
"drop_off": {
"lat": 32.1099275,
"lng": 34.8381351,
"address": "Herzel 4 Tel Aviv",
"note": "leave the package near the door"
},
"return_drop_off": {
"lat": 32.193452,
"lng": 34.8840545,
"address": "Habarzel 1 Tel Aviv",
"note": "floor 1, door 4"
},
"pickup_contact": {
"name": "Mark",
"phone_number": "0123456789"
},
"drop_off_contact": {
"name": "Michael",
"phone_number": "0127654321"
},
"return_contact": {
"name": "Mark",
"phone_number": "04564256"
},
"verifications": null,
"started_at": "2020-09-24T08:40:24.661397Z",
"scheduled_at": "2020-09-24T08:40:10.160253Z",
"arrived_at": "2020-09-24T08:40:58.733916Z",
"picked_up_at": "2020-09-24T08:41:01.922544Z",
"ended_at": "2020-09-24T08:41:28.395444Z",
"deliver_from": null,
"deliver_until": null,
"parcels": [
{
"display_identifier": "M87483H8F889_1",
"barcode": "1Dr33gghj",
"barcodes": [
"1Dr33gghj"
],
"size_alias": "",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"items": [
{
"external_id": "",
"name": "M87483H8F889_1",
"quantity": 1,
"price": 0,
"vat_rate": 0,
"exemplars": null,
"status": "not_delivered",
"cannot_deliver_info": null
}
],
"status": "not_delivered",
"cannot_deliver_info": null
}
],
"client_price": null,
"delivery_price": null,
"vendor": {
"name": "MJ"
},
"route_identifier": "test-1",
"external_identifier": null,
"journey_id": 986,
"created_at": "2020-09-24T08:40:10.993016Z",
"age_verification_required": false,
"order_id_representation": "BD2983793104NY",
"order_from": "DeliveryApi-d5f0c8a2adb0d9f8df6e4c8735bfdf9f62ac07c99719554bba5430cdd706ab6d"
}
]
}
Sandbox
Resource:
GET v1/delivery_sandbox/deliveries/not_delivered/courier/phone/:courier_phone
More info can be found here
Input options:
- For simulating a response with deliveries array but without confirmation code, what means that the courier is still in the route and didn't started already his way to return the parcels back, courier_phone parameter should be equals '0502222222'.
- For simulating this request with deliveries array and confirmation code, what means that the courier is already on the way to the return point, or already arrived, courier_phone parameter should be equals '0501111111'.
- If you use any other input in courier_phone parameter, you will get an empty response.
Updated over 2 years ago