Show List of Deliveries
Resource
GET /v1/delivery/deliveries/list
Authorization
OAuth 2.0 bearer token with delivery scope.
Query Parameters
Name | Type | Description |
---|---|---|
business_id | string | Unique identifier representing a Business. |
page (optional) | int | The page that will be shown (for example 1 out of 3) Default value is 1 |
size (optional) | int | The amount of delivery will be shown in a page Default value is 25 |
created_at_from (optional) | timestamp | The "From" date deliveries will be queried format |
created_at_until (optional) | timestamp | The "To" date deliveries will be queried format |
status (optional) | string | Filter by status. The value should be one of the statuses listed in Create Delivery (For example: "at_drop_off") |
request_uuids (optional) | string | Delivery UUID. This parameter is applied to filter deliveries by the list of exact delivery UUIDs.Your can specify multiply request_uuids to request multiple deliveries in a single query. |
Request examples
Request by the delivery status. This request will provide 1st page of 100 completed deliveries in your account.
https://api.gett.com/v1/delivery/deliveries/list?business_id=RU-7436&
page=1&
size=100&
status=completed
Request by the delivery UUIDs. This request will provide 3 deliveries matching the UUIDs specified in the query.
https://api.gett.com/v1/delivery/deliveries/list?business_id=RU-7436&
request_uuids=DR-4b82b236cc2122dfb29404bc848005c1&
request_uuids=DR-69972347cb236c49be402fb23541e8da&
request_uuids=DR-bcdb09cf826943b95c54eb78fdc8480d
Response body
{
"data": [
{
"id": "DR-6c2799757e42afb0b67a5c4bfa0f3f",
"uuid": "DR-6c2799757e42afb0b67a5c4bfa0f3f",
"bundle_id": "B-3153c7edab234dbda2bd66051875549",
"product_id": "4d403791-faaa-43b6-bef0-95693e4848d",
"display_identifier": "W75f-555",
"status": "completed",
"status_code": 70,
"cannot_deliver_info": null,
"courier": {
"color": "Red",
"license_plate": "1232-76-76",
"model": "Skoda",
"name": "John Lenon",
"phone": "012-4567898",
"picture_url": "https://public.gett.com/IMG/DRIVERS/3263.3.production.1619125.png"
},
"pickup": {
"lat": 32.108544,
"lng": 34.838642,
"address": "Habarzel 15 Tel Aviv",
"note": "Near the white door"
},
"drop_off": {
"lat": 32.086130,
"lng": 34.774710,
"address": "Dizengoff 67 Tel aviv",
"note": "Floor 6, Door 3"
},
"return_drop_off": {
"lat": 32.108544,
"lng": 34.838642,
"address": "Habarzel 15 Tel Aviv",
"note": "Near the white door"
},
"pickup_contact": {
"name": "Omer",
"phone_number": "032-4563344"
},
"drop_off_contact": {
"name": "Joel Doe",
"phone_number": "972519876544"
},
"return_contact": {
"name": "Omer",
"phone_number": "032-4563344"
},
"verifications": [
{
"type": "recipient",
"proved_at": "2021-03-18T13:07:07.30883Z",
"proof": {
"recipient_category": "other",
"recipient_name": "Michael",
"verified_by": "32263"
}
}
],
"started_at": "2021-03-18T12:53:24.160026Z",
"scheduled_at": "2021-03-18T11:00:00Z",
"arrived_at": "2021-03-18T13:00:56.93175Z",
"picked_up_at": "2021-03-18T13:00:56.93175Z",
"ended_at": "2021-03-18T13:07:07.355859Z",
"deliver_from": null,
"deliver_until": null,
"parcels": [
{
"display_identifier": "110929",
"barcode": "110929",
"barcodes": [
"110929"
],
"size_alias": "",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"items": [
{
"external_id": "",
"name": "110929",
"quantity": 1,
"price": 0,
"vat_rate": 0,
"exemplars": null,
"status": "completed",
"cannot_deliver_info": null
}
],
"status": "completed",
"cannot_deliver_info": null
}
],
"client_price": null,
"delivery_price": null,
"vendor": {
"name": "NBA"
},
"route_identifier": "Route 1",
"journey_id": 1870925,
"created_at": "2021-03-18T12:53:24.087038Z",
"age_verification_required": false,
"order_id_representation": "JC317822093ME",
"order_from": "",
"external_payment_confirmation": false,
"processing_has_started": false,
"return_delivery_uuid": null
},
],
"error": "",
"total": 1,
"counter_exceeded": false
}
Pagination
counter_exceeded and total response attributes are used to manage the request containing multiple pages.
counter_exceeded attribute is set to true if the displayed page does not exceed the overall number of deliveries requested by filtering parameters. counter_exceeded attribute is set to false if the displayed page exceeds the overall number of deliveries requested by filtering parameters.
total attribute is equal to the index number of the latest delivery in the response among the number of overall deliveries requested by filtering parameters.
For example, if the overall number of deliveries filtered by your request is 5 and you've set the page size to 2 and you have requested the 1st page:
https://api.gett.com/v1/delivery/deliveries/list?business_id=RU-7436&
page=1&
size=2&
request_uuids=DR-4b82b236cc2122dfb29404bc848005c1&
request_uuids=DR-69972347cb236c49be402fb23541e8da&
request_uuids=DR-bcdb09cf826943b95c54eb78fdc8480d&
request_uuids=DR-bcdb09cf826943b9be402fb23541e43a&
request_uuids=DR-69972347cb236c495c54eb78fdc84d24
Then you will receive a response with total attribute set to "2" and counter_exceeded set to "true":
{
"data": [
{
"id": "DR-4b82b236cc2122dfb29404bc848005c1",
"uuid": "DR-4b82b236cc2122dfb29404bc848005c1",
"... ... ..."
},
{
"id": "DR-69972347cb236c49be402fb23541e8da",
"uuid": "DR-69972347cb236c49be402fb23541e8da",
"... ... ..."
}
],
"total": 2,
"counter_exceeded": true
}
Please note that this is not a valid JSON format. String "... ... ..." is used here to represent the rest of the delivery object attributes for short.
If for the same filtering you will set the page size to 2 as before but will request 2nd page then you will receive a response with total attribute set to "4" and counter_exceeded attribute set to "true":
{
"data": [
{
"id": "DR-bcdb09cf826943b95c54eb78fdc8480d",
"uuid": "DR-bcdb09cf826943b95c54eb78fdc8480d",
"... ... ..."
},
{
"id": "DR-bcdb09cf826943b9be402fb23541e43a",
"uuid": "DR-bcdb09cf826943b9be402fb23541e43a",
"... ... ..."
}
],
"total": 4,
"counter_exceeded": true
}
If for the same filtering parameters you will set the page size to 2 as before but will request 3rd page then you will receive a response with total attribute set to "5" and counter_exceeded attribute set to "false":
{
"data": [
{
"id": "DR-69972347cb236c495c54eb78fdc84d24",
"uuid": "DR-69972347cb236c495c54eb78fdc84d24",
"... ... ..."
}
],
"total": 5,
"counter_exceeded": false
}
Please note that Show List of Deliveries API does not guarantee to maintain the order of deliveries identical to the order of your Request parameters.
Sandbox
Resource:
GET /v1/delivery_sandbox/deliveries/list?business_id={{company_id}}
More info can be found here
Updated over 2 years ago