This API allows you to update an item in an already existing request.
Update Amount to Collect
Update delivery item will automatically update the delivery sub total, and total just like when adding new item to a delivery , and just as well, with update delivery item, you can force the amount to be collected to be updated as well by calculating the difference between the original item total and the new item total and it's reflection on the whole delivery sub total.
Request
Method : PATCH
URI : https:
Param Required Details
item-uuid Yes The item 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
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" : "Updated 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-009 Input related errors
400 1x00024-119 Missing required data or data is not valid
401 1x00024-015 Missing or incorrect provided API access data
403 1x00024-155 Unauthorized to preform the request
500 1x00024-008 Couldn't update the item due to server side error
500 1x00024-039 Couldn't update the delivery total