Get a Delivery Request
This API helps retriving a single delivery request details.
Request
Method : GET
URI : https://core.xameel.com/api/v1/call/delivery/{delivery-uuid}
Param | Required | Details |
---|---|---|
delivery-uuid | Yes | The delivery request identification string |
Header
{
"Content-Type": "application/json",
"Accept": "application/json",
"api_key": "your-api-key",
"api_aceess": "your-api-access",
"api_pass": "your-api-password"
}
Key | Required | Type | Details |
---|---|---|---|
api_key | Yes | String | Your API key generated from the user portal |
api_access | Yes | String | Your API access generated from the user portal |
api_password | Yes | String | Your API password generated from the user portal |
Expected Response
Success
{
"code": 200,
"status": "success",
"message": "Delivery found",
"data": {
"uuid": "e7e966a2-8f64-4241-b643-e971367f8394",
"origin": "Albaik",
"origin_location": "{\"lat\":24.48316739335232,\"long\":39.62342909511722}",
"origin_phone": "+123",
"destination": "Eyad Khallaf",
"destination_location": "{\"lat\":24.425913138738597,\"long\":39.60282972988284}",
"destination_phone": "+1456",
"estimated_distance": 0,
"reference": null,
"api_uuid": null,
"client_uuid": "62251b90-39d9-43f8-8661-1bdf42d30180",
"payment_method": "cash",
"status": "open",
"assigned_to": null,
"assigned_at": null,
"cancelled_by": null,
"cancelled_at": null,
"cancellation_reasons": null,
"estimated_delivery_cost": 15507.6,
"custom_delivery_cost": 45,
"sub_total": 75,
"tax": 5,
"total": 78.75,
"collect_cash": 1,
"amount_to_collect": 103.72,
"amount_collected": 85,
"created_at": "2018-11-08 13:58:15",
"updated_at": "2018-11-08 17:36:04",
"deleted_at": null,
"items": [
{
"uuid": "1e3f3c05-3cfe-4ade-aad3-af2ac78651c4",
"delivery_uuid": "e7e966a2-8f64-4241-b643-e971367f8394",
"item": "Test",
"description": "Testing description",
"notes": null,
"quantity": 1,
"price": 10,
"created_at": "2018-11-08 13:58:15",
"updated_at": "2018-11-08 13:58:15",
"deleted_at": null
},
{
"uuid": "3449024a-0c75-4212-abba-3dff3cddf673",
"delivery_uuid": "e7e966a2-8f64-4241-b643-e971367f8394",
"item": "Apple pie price",
"description": "Cream apple pie",
"notes": null,
"quantity": 1,
"price": 10,
"created_at": "2018-11-08 16:57:08",
"updated_at": "2018-11-08 16:57:08",
"deleted_at": null
},
{
"uuid": "42bca134-1fa2-421e-adda-4d29c6c2e726",
"delivery_uuid": "e7e966a2-8f64-4241-b643-e971367f8394",
"item": "Test",
"description": "Testing description",
"notes": "no onions",
"quantity": 1,
"price": 10,
"created_at": "2018-11-08 13:58:15",
"updated_at": "2018-11-08 13:58:15",
"deleted_at": null
}
]
}
}
If a delivery was assigned to an agent the resoponse will include an agent proparty with the agent name, last reported location, and contact phone.
{
"code": 200,
"status": "success",
"message": "Delivery found",
"data": {
"uuid": "e7e966a2-8f64-4241-b643-e971367f8394",
...,
"agent": {
"name": "Jason Smith",
"phone": "+17148553555",
"last_reported_location":
}
}
}
Failure
This response is just a sample, the content may differ based on the type of error
{
"code": 403,
"err_code": "1x00022-013",
"status": "fail",
"message": "Unauthorized",
"errors": [
"Unauthorized access"
]
}
Code | Error | Details |
---|---|---|
401 | 1x00022-015 | Couldn't validate the provided API data |
400 | 1x00022-048 | Delivery not found |
403 | 1x00022-155 | Unauthorized to preform the request |