إنتقل إلى المحتوى الرئيسي

Update Purchase Order API

This endpoint allows you to update the items of an existing purchase order using its ID.

معلومات

Only items can be edited. Other fields such as expectedReceivingDate, timeSlot, address, and contactPerson cannot be changed after the purchase order is created.

PUThttps://api-fulfillment.bosta.co/api/v1/purchase-orders/:id

Update the items of a purchase order. The id in the URL identifies which purchase order to modify.

REQUEST BODY

{
"items": [
{
"skuCode": "meat-1",
"quantity": 530
}
]
}

Responses

200Purchase order updated successfully
 {
"success": true,
"message": "Purchase order updated successfully"
}
404Purchase order not found
 {
"success": false,
"message": "No purchase order found with the provided ID."
}

Field Details​

FieldTypeDescription
id (URL)stringThe unique ID of the purchase order you want to update.
itemsarrayThe updated list of items. Each item contains a skuCode and quantity.

Note on Items​

The provided items array replaces the existing items on the purchase order. Include all items you want to keep.