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

Bulk Create Products API

This endpoint allows you to upload multiple products in a single request. It is the most efficient way to synchronize your catalog and initialize inventory records for multiple SKUs.

POSThttps://api-fulfillment.bosta.co/api/v1/inventory/products/bulk

Batch create products. The response returns the initial inventory state for each successfully created SKU.

REQUEST BODY

{
"products": [
{
"name": "MAGDY222",
"description": "A sample product for testing",
"skuCode": "MAGDY222",
"price": 99.99,
"itemValue": 75,
"images": [
{
"url": "https://cdn.futura-sciences.com/cdn-cgi/image/width=1920,quality=50,format=auto/sources/images/dossier/773/01-intro-773.jpg"
}
],
"weight": 500,
"dimensions": {
"length": 10,
"width": 10,
"height": 10
}
}
]
}

🔄 WEBHOOK CALLBACK (POST)

Bosta will send this data to your webhookUrl when the order status changes:

{
"quantityOnHand": 100,
"quantityReserved": 10,
"availableQuantity": 90,
"businessId": "bi2gKAXt6v3DoXO",
"hubCode": "NewCairo_Hub",
"skuCode": "x-api-key-latest2555"
}

Responses

201Products created and inventory initialized
 {
"success": true,
"message": "Bulk products created successfully",
"data": [
{
"skuCode": "MAGDY222",
"quantityOnHand": 0,
"quantityReserved": 0,
"availableQuantity": 0,
"businessId": "bi2gKAXt6v3DoXO",
"hubCode": "NewCairo_Hub"
}
],
"meta": {
"timestamp": "2026-01-15T15:15:00.000Z"
}
}
400Bad Request
 {
"success": false,
"message": "Invalid product data (e.g. missing itemValue, itemValue is 0, or itemValue is not less than price) or empty products array"
}

Implementation Details​

  • Inventory Initialization: Every product created through this API automatically generates an inventory record. By default, quantityOnHand starts at 0.
  • Data Mapping: The response data structure matches our Inventory Webhook, allowing you to use the same parsing logic in your system.
  • SKU Uniqueness: If you send a skuCode that already exists, that specific entry will be skipped or return an error depending on the organization settings.

Product Fields (Request)​

FieldTypeDescription
skuCodestringRequired. Unique identifier for the product (Stock Keeping Unit).
pricenumberThe selling price of the product.
itemValuenumberRequired. The cost of a single item. Must be greater than 0 and less than price. Shown as Item Value in the Fulfillment Dashboard.

Field Breakdown (Response)​

FieldDescription
quantityOnHandTotal physical stock in the warehouse.
quantityReservedStock blocked for pending orders.
availableQuantityNet stock available for sale ($OnHand - Reserved$).
hubCodeThe warehouse identifier where the product is stored.