Inventory Get
{{api_url}}/shop/inventory/{{sku}}?warehouse_idReturns the current inventory for one SKU. By default it's the total across all warehouses. Send warehouse_id to get one warehouse's count instead.
This is the count InfiPlex holds for the SKU. What a marketplace is told can be lower, because each channel's warehouse scope, set-to-zero threshold, and Inventory Buffer rules are applied before inventory is sent.
Query parameters
| Parameter | Type | Description |
|---|---|---|
warehouse_id | integer | Optional. Returns the SKU's inventory in that warehouse only. Omit it for the total across all warehouses. Use Warehouse Search to find a warehouse's ID. |
Examples
Total across all warehouses:
{{api_url}}/shop/inventory/5L-MARG-MW04
Warehouse 7 only:
{{api_url}}/shop/inventory/5L-MARG-MW04?warehouse_id=7
Response
The quantity alone, as a JSON string:
"984"
Before you build
- The response is a bare JSON string, not an object. Parse it, then convert it to a number.
- Leaving out
warehouse_idmeans different things here and on Inventory Set. Here it returns the total across all warehouses. On Inventory Set, it writes to the first warehouse in the system. - To see how the SKU reached its current count, use Inventory Change History Get.
- To read inventory for many SKUs at once, use Inventory Search.
- Your API key needs Inventory read permission. A key without it gets
403 Forbidden.
Related guides:
Authorization
Bearer token, sent in the Authorization header. Inherited from the collection.
Query Parameters
| Key | Value | Description |
|---|---|---|
warehouse_id | If set, the inventory for the specific warehouse will be returned instead of total inventory across all warehouses |
Example Request
curl --location --request GET '{{api_url}}/shop/inventory/{{sku}}?warehouse_id' \
--header 'Authorization: Bearer {{auth_token}}'Example Responses
Inventory Get
Request
curl --location --request GET '{{api_url}}/shop/inventory/5L-MARG-MW04' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'Response 200 OK
"984"
