Skip to main content
POST
https://api.zenflow.com.ar
/
api
/
v1
/
stock
/
bulk
Bulk Update Stock
curl --request POST \
  --url https://api.zenflow.com.ar/api/v1/stock/bulk \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "updates": [
    {
      "product_id": 123,
      "sku": "<string>",
      "location_id": "<string>",
      "quantity": 123
    }
  ]
}
'

Bulk Update Stock

Update stock levels for multiple products in a single request.
Requires write:stock scope.

Request

POST /api/v1/stock/bulk

Body Parameters

updates
array
required
Array of stock updates

Example

curl -X POST "https://api.zenflow.com.ar/api/v1/stock/bulk" \
  -H "X-API-Key: zenflow_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "updates": [
      {
        "sku": "SKU-001",
        "location_id": "LOC-A1",
        "quantity": 100
      },
      {
        "sku": "SKU-002",
        "location_id": "LOC-A1",
        "quantity": 50
      },
      {
        "product_id": 103,
        "location_id": "LOC-B1",
        "quantity": 25
      }
    ]
  }'

Response

{
  "success": true,
  "data": {
    "success": 3,
    "errors": []
  }
}

Response with Errors

{
  "success": true,
  "data": {
    "success": 2,
    "errors": [
      {
        "product_id": 0,
        "error": "Product with SKU INVALID-SKU not found"
      }
    ]
  }
}

Best Practices

  • Batch updates in groups of 100 for optimal performance
  • Use SKU for matching if product IDs aren’t available
  • The endpoint continues processing even if some items fail