Skip to main content

Update delivery order

PUT {{base_url}}/delivery-orders/{deliveryOrderUuid}

Description

This API endpoint updates the details of a specific delivery order identified by its UUID. The update includes information such as pickup and drop-off locations, contact details, shipping fee, items, and order status.

Request

Request Body

{
"updatedByEmail": "string",
"pickupLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string"
},
"dropOffLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string"
},
"dropOffContact": "string",
"pickupContact": "string",
"pickupEmail": "string",
"dropOffEmail": "string",
"shippingFee": 0,
"items": [
{
"id": 0,
"name": "string",
"paid": true,
"price": 1,
"quantity": 1,
"weight": 1
}
],
"orderStatus": "string"
}


Example:

<request>
<updatedByEmail>string</updatedByEmail>
<pickupLocation>
<latitude>0</latitude>
<longitude>0</longitude>
<address>string</address>
<userId>string</userId>
</pickupLocation>
<dropOffLocation>
<latitude>0</latitude>
<longitude>0</longitude>
<address>string</address>
<userId>string</userId>
</dropOffLocation>
<dropOffContact>string</dropOffContact>
<pickupContact>string</pickupContact>
<pickupEmail>string</pickupEmail>
<dropOffEmail>string</dropOffEmail>
<shippingFee>0</shippingFee>
<items>
<id>0</id>
<name>string</name>
<paid>true</paid>
<price>1</price>
<quantity>1</quantity>
<weight>1</weight>
</items>
<orderStatus>string</orderStatus>
</request>


Responses

200 OK

Example

{
"status": true,
"statusCode": 0,
"message": "Delivery order updated.",
"data": {},
"errors": []
}


<response>
<status>true</status>
<statusCode>0</statusCode>
<message>Delivery order updated.</message>
<data></data>
<errors></errors>
</response>


400 Bad Request

{
"status": false,
"statusCode": 400,
"message": "Invalid request.",
"errors": [
{
"message": "Invalid request.",
"descriptiveMessage": "The request is invalid. Please check the provided data."
}
]
}


<response>
<status>false</status>
<statusCode>400</statusCode>
<message>Invalid request.</message>
<errors>
<error>
<message>Invalid request.</message>
<descriptiveMessage>The request is invalid. Please check the provided data.</descriptiveMessage>
</error>
</errors>
</response>


404 Not Found

Example

{
"status": false,
"statusCode": 404,
"message": "Delivery order not found.",
"errors": [
{
"message": "Delivery order not found.",
"descriptiveMessage": "The specified delivery order could not be found."
}
]
}


<response>
<status>false</status>
<statusCode>404</statusCode>
<message>Delivery order</message>
</response>



LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PUT \ 
--url /delivery-orders/{deliveryOrderUuid} \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!