Update Order API
This endpoint allows you to modify an existing order's details such as the shipping address, customer contact information, or shipment preferences.
PATCH
https://api-fulfillment.bosta.co/api/v1/orders/${ORDER_ID}Update specific fields of an existing order. Note that only certain fields are mutable depending on the current status of the order.
REQUEST BODY
{
// ANY OTHER FIELD WILL BE IGNORED
"orderAlias": "first_order_UPDATED",
"shippingAddress": {
"firstLine": "MQR - 2, park 15, rehab club, new cairo",
"cityName": "Cairo",
"cityId": "FceDyHXwpSYYF9zGW",
"districtId": "Iy7-lFD0BE0",
"isWorkAddress": false,
// allows "" and null
"buildingNumber": "25",
"floor": "2",
"apartment": "B"
},
"customer": {
"mobile": "01028687408",
"secondPhone": "01029999998"
},
"shipment":{
"allowToOpenPackage": true,
"codAmount": 500
}
}
Responses
200Order updated successfully
400Invalid data or immutable field
404Order ID not found
Key Constraints
- Immutable Fields: Fields like
itemsorexternalPlatformmight be ignored or rejected depending on your business logic. - Order Status: You can usually only update orders that are still in
PENDINGorCREATEDstatus. Once the order isPICKEDorSHIPPED, updates may be restricted.