Inventory Set Bulk

POST{{api_url}}/shop/inventory/bulk_update

Changes inventory for many SKUs in one call. Each row names a SKU, a warehouse, and one quantity field, and every row can use a different field, so a single call can mix full counts and adjustments. InfiPlex then sends the new levels to every connected sales channel with inventory sync enabled, on each channel's normal schedule.

Use it for full inventory syncs from your ERP or WMS, and whenever more than a few SKUs change at once. There is no fixed limit on the number of rows in a call.

Each row takes exactly one of these two quantity fields:

  • quantity_to_set sets inventory to that exact number. Use it for cycle counts, full syncs from your own system, and corrections.
  • quantity_to_add changes current inventory by that amount. A positive number adds stock and a negative number subtracts it. Use it for receipts, returns, damages, and other adjustments.

quantity_to_add is applied to the SKU's inventory at the moment InfiPlex processes the row, so a sale that lands between your last read and your write is not lost. If you read the current value, do the math yourself, and send quantity_to_set, you can overwrite a sale that happened in between.

Body

A JSON array as the body root, one object per row:

FieldTypeDescription
skustringThe SKU to update.
warehouse_idintegerThe InfiPlex warehouse to update. Optional. If omitted, the first warehouse in the system is used, which keeps things simple for accounts with a single warehouse. On accounts with more than one warehouse, always send it. Use Warehouse Search to find a warehouse's ID.
quantity_to_setintegerThe exact inventory to set. Send this or quantity_to_add on each row, not both.
quantity_to_addintegerThe amount to add to current inventory. Negative values subtract. Send this or quantity_to_set on each row, not both.

The same SKU can appear on more than one row with different warehouses.

Example

Receive 5 units of ABC123 into warehouse 7, set DEF456 to 100 in warehouse 7, and set GHI789 to 250 in warehouse 17:

[
    {"sku": "ABC123", "warehouse_id": 7, "quantity_to_add": 5},
    {"sku": "DEF456", "warehouse_id": 7, "quantity_to_set": 100},
    {"sku": "GHI789", "warehouse_id": 17, "quantity_to_set": 250}
]

Response

A JSON array with one result per row:

[
    {"sku": "ABC123", "warehouse_inventory": "50"},
    {"sku": "DEF456", "warehouse_inventory": null},
    {"sku": "GHI789", "warehouse_inventory": null}
]
FieldTypeDescription
skustringThe SKU from the row.
warehouse_inventorystringThe SKU's inventory in the row's warehouse after the change. null when nothing was executed for the row.

A row comes back null when nothing was executed for it. There are two causes: the SKU wasn't found, or the row didn't include a quantity value. In the example, DEF456 and GHI789 weren't found, so their rows did nothing.

A null row does not stop the rest of the call. Every other row is still applied, and the call returns 200 OK. Check warehouse_inventory on every result rather than relying on the status code.

How the changes reach your sales channels

  • Each channel receives the number its own settings produce. That can be the combined total across all warehouses (the default), one warehouse's count, or per-warehouse levels on channels that support multiple warehouses (Amazon, TikTok Shop, Walmart, and Wayfair).
  • The channel's set-to-zero threshold and any Inventory Buffer rule on a SKU are applied before the number is sent.
  • A marketplace only receives inventory for SKUs flagged as sold on that marketplace.
  • Most channels receive inventory updates every 15 minutes. A few connections only accept updates once a day.

Before you build

  • Write to warehouses whose inventory InfiPlex holds directly. If a warehouse's inventory is pulled from an ERP, 3PL, WMS, or storefront, that source's next pull replaces the value you set for any SKU it reports.
  • SKU Groups apply. quantity_to_set on a SKU in a group sets every SKU in the group to that number. quantity_to_add applies the same change to each SKU's own count.
  • Every row is recorded in the SKU's inventory history as either quantity_set or quantity_added. See Inventory Change History Get.
  • Numbers come back as strings. Convert them before doing math.
  • Your API key needs Inventory write permission. A key without it gets 403 Forbidden.
  • To change one SKU, use Inventory Set. It takes the same quantity fields.

Related guides:

Authorization

Bearer token, sent in the Authorization header. Inherited from the collection.

Headers

KeyValueDescription
Content-Typeapplication/json

Body

[
    {
        "sku": "DTR5511",
        "warehouse_id": 13,
        "quantity_to_set": 27
    },
    {
        "sku": "1705145",
        "warehouse_id": 13,
        "quantity_to_set": 3
    },
    {
        "sku": "1702325",
        "warehouse_id": 13,
        "quantity_to_set": 1
    },
    {
        "sku": "3012431",
        "warehouse_id": 13,
        "quantity_to_set": 1
    },
    {
        "sku": "SMR15SF10",
        "warehouse_id": 13,
        "quantity_to_set": 0
    },
    {
        "sku": "8895554",
        "warehouse_id": 13,
        "quantity_to_set": 12
    },
    {
        "sku": "1703305",
        "warehouse_id": 13,
        "quantity_to_set": 14
    },
    {
        "sku": "1307005",
        "warehouse_id": 13,
        "quantity_to_set": 38
    },
    {
        "sku": "5531020",
        "warehouse_id": 13,
        "quantity_to_set": 19
    },
    {
        "sku": "16071160",
        "warehouse_id": 13,
        "quantity_to_set": 4
    },
    {
        "sku": "16021510",
        "warehouse_id": 13,
        "quantity_to_set": 5
    }
]

Example Request

curl --location --request POST '{{api_url}}/shop/inventory/bulk_update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '[
    {
        "sku": "DTR5511",
        "warehouse_id": 13,
        "quantity_to_set": 27
    },
    {
        "sku": "1705145",
        "warehouse_id": 13,
        "quantity_to_set": 3
    },
    {
        "sku": "1702325",
        "warehouse_id": 13,
        "quantity_to_set": 1
    },
    {
        "sku": "3012431",
        "warehouse_id": 13,
        "quantity_to_set": 1
    },
    {
        "sku": "SMR15SF10",
        "warehouse_id": 13,
        "quantity_to_set": 0
    },
    {
        "sku": "8895554",
        "warehouse_id": 13,
        "quantity_to_set": 12
    },
    {
        "sku": "1703305",
        "warehouse_id": 13,
        "quantity_to_set": 14
    },
    {
        "sku": "1307005",
        "warehouse_id": 13,
        "quantity_to_set": 38
    },
    {
        "sku": "5531020",
        "warehouse_id": 13,
        "quantity_to_set": 19
    },
    {
        "sku": "16071160",
        "warehouse_id": 13,
        "quantity_to_set": 4
    },
    {
        "sku": "16021510",
        "warehouse_id": 13,
        "quantity_to_set": 5
    }
]'

Example Responses

Inventory Set Bulk

Request

curl --location --request POST '{{api_url}}/shop/inventory/bulk_update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '[
    {
        "sku": "ABC123",
        "warehouse_id": 7,
        "quantity_to_add": 5
    },
    {
        "sku": "DEF456",
        "warehouse_id": 7,
        "quantity_to_set": 100
    },
    {
        "sku": "GHI789",
        "warehouse_id": 17,
        "quantity_to_set": 250
    }
]'

Response 200 OK

[
    {
        "sku": "ABC123",
        "warehouse_inventory": "50"
    },
    {
        "sku": "DEF456",
        "warehouse_inventory": null
    },
    {
        "sku": "GHI789",
        "warehouse_inventory": null
    }
]