Add an Item to a Delivery
Our Submit a delivery request requires items to be added to complete the request. This API allows you to add more item to an already existing request.
Update Amount to Collect
Adding an item to a delivery will update the delivery sub total, but will not update the amount to be collected automatically. This will allow adding items and accepting payments for them without effecting the total needed to be collected. To update the amount to be collected, you need to include 'updateAmountToCollect' in the request.
Request
Method : POST
URI : https://core.xameel.com/api/v1/call/delivery-item
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 |
Body
{
"deliveryUuid": "e7e966a2-8f64-4241-b643-e971367f8394",
"item": "Apple pie price",
"description": "Cream apple pie",
"price": 10.00,
"quantity": 1,
"notes": "Testing note",
"updateAmountToCollect": true
}
Key | Required | Type | Default | Details |
---|---|---|---|---|
deliveryUuid | Yes | String | - | The id string identifing the delivery request |
item | Yes | Boolean | False | The name of the item being added |
description | Yes | Float | - | A description of the item |
price | Yes | Float | - | The price of the item added |
quanitity | Yes | Int | - | The quntity required of the item |
notes | No | String | - | Note that can be attached to the item |
updateAmountToCollect | No | Boolean | false | Set to (true) to force update the total amount to be collected on delivery |
Expected Response
Success
{
"code": 200,
"status": "success",
"message": "Added successfully"
}
Failure
This response is just a sample, the content may differ based on the type of error
{
"code": 400,
"err_code": "1x00024-009",
"status": "fail",
"message": "Bad request",
"errors": [
"Delivery related to the item was not found"
]
}
Code | Error | Details |
---|---|---|
400 | 1x00024-091 | Input related errors |
400 | 1x00024-009 | Input related errors |
400 | 1x00022-010 | Missing required data or data is not valid |
401 | 1x00024-015 | Missing or incorrect provided API access data |
403 | 1x00024-157 | Unauthorized to preform the request |
500 | 1x00024-110 | Couldn't add the item due to server side error |
500 | 1x00024-088 | Error updating the delivery calculations |