Skip to main content

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.

PATCHhttps://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
 {
"success": true,
"message": "Order has been updated"
}
400Invalid data or immutable field
 {
"success": false,
"message": "Cannot update order in current status"
}
404Order ID not found
 {
"success": false,
"message": "Order not found"
}

Key Constraints​

  • Immutable Fields: Fields like items or externalPlatform might be ignored or rejected depending on your business logic.
  • Order Status: You can usually only update orders that are still in PENDING or CREATED status. Once the order is PICKED or SHIPPED, updates may be restricted.