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

Create Purchase Order API

This endpoint allows you to create a purchase order to send stock to the Bosta fulfillment warehouse.

تلميح

Call Get Receiving Availability first to get a valid expectedReceivingDate and timeSlot.

POSThttps://api-fulfillment.bosta.co/api/v1/purchase-orders

Create a new purchase order with the items you are sending to the warehouse.

REQUEST BODY

{
"items": [
{
"skuCode": "wireless-mouse-01",
"quantity": 50
}
],
"expectedReceivingDate": "2026-11-02",
"timeSlot": {
"startTime": 1000,
"endTime": 1100
},
"receivingWay": "pickup",
"carType": "medium",
"numberOfTrucks": 1,
"address": {
"location": {
"name": "Main Warehouse",
"id": "Lc7KpW2-4"
},
"city": {
"name": "Cairo",
"id": "Xk82LmQp4RtZ9vBnA"
},
"district": {
"name": "Nasr City",
"id": "Qw3Er-Ty7Ui"
},
"firstLine": "12 Abbas El Akkad St.",
"secondLine": "Near City Stars",
"apartment": "5",
"floor": "2",
"buildingNumber": "12"
},
"contactPerson": {
"phone": "01000000000",
"name": "Ahmed Hassan"
}
}

Responses

200Purchase order created successfully
 {
"success": true,
"message": "Purchase order created successfully",
"data": {
"id": "30140001",
"businessId": "Bz7Yx6Wv5Ut4Sr3Qp2On",
"hubCode": "CairoHub",
"omnifulPurchaseOrderId": "PO-BO12-101",
"items": [
{
"skuCode": "wireless-mouse-01",
"quantity": 50,
"name": "Wireless Mouse",
"images": [
{
"url": "https://example.com/images/wireless-mouse.png"
}
]
}
],
"totalItemsCount": 50,
"expectedReceivingDate": "2026-11-02",
"status": "ordered",
"timeSlot": {
"startTime": 1000,
"endTime": 1100
},
"receivingWay": "pickup",
"carType": "medium",
"numberOfTrucks": 1,
"address": {
"location": {
"name": "Main Warehouse",
"id": "Lc7KpW2-4"
},
"city": {
"name": "Cairo",
"id": "Xk82LmQp4RtZ9vBnA"
},
"firstLine": "12 Abbas El Akkad St.",
"secondLine": "Near City Stars",
"buildingNumber": "12",
"floor": "2",
"apartment": "5",
"district": {
"id": "Qw3Er-Ty7Ui",
"name": "Nasr City"
}
},
"contactPerson": {
"name": "Ahmed Hassan",
"phone": "01000000000"
},
"createdBy": "merchant@example.com",
"_id": "6ae0a16755b241be7bdc0001",
"createdAt": "2026-10-27T10:00:00.000Z",
"updatedAt": "2026-10-27T10:00:00.000Z",
"__v": 0
},
"meta": {
"timestamp": "2026-10-27T10:00:00.120Z"
}
}

Field Details​

FieldTypeDescription
itemsarrayList of products to send. Each item contains a skuCode and quantity.
items[].skuCodestringThe SKU code of an existing product.
items[].quantitynumberThe quantity of this product being sent.
expectedReceivingDatestringThe date the warehouse should expect the shipment (YYYY-MM-DD). Must be an available date returned by Get Receiving Availability.
timeSlotobjectThe receiving time window. startTime and endTime are in HHMM format (e.g., 1000 = 10:00, 1100 = 11:00). Must fall within the date's available working hours.
receivingWaystringHow the stock will be received (e.g., pickup).
carTypestringThe size of the vehicle (e.g., medium).
numberOfTrucksnumberNumber of trucks required.
addressobjectThe address where the stock will be picked up. Includes location, city, district (each with name and id), plus firstLine, secondLine, apartment, floor, and buildingNumber.
contactPersonobjectThe person to contact regarding the shipment (name and phone).

Response Fields​

FieldTypeDescription
idstringThe purchase order ID. Use it with Get Purchase Order by ID and Update Purchase Order.
statusstringThe current status of the purchase order (e.g., ordered).
totalItemsCountnumberThe total quantity of all items in the purchase order.
hubCodestringThe warehouse hub that will receive the stock.
items[].name / items[].imagesstring / arrayProduct details resolved from the SKU code.
ملاحظة

Use the Get Zones API to get valid city and district IDs.