/api/v1/inventory
is a specialized endpoint that is designed to work specifically with product and variant inventory.
Fetches the current quantity in stock for an existing product. This endpoint expects one of the following pieces of identifying information as a query string parameter:
product_id
variant_inventory_id
item_number
gtin
item_name
GET /api/v1/inventory?product_id=62
GET /api/v1/inventory?variant_inventory_id=12
GET /api/v1/inventory?item_number=60PY2DR
{
"product_id": 62,
"variant_inventory_id": null,
"item_number": "60PY2DR",
"item_name": "60PY2DR",
"gtin": "",
"quantity": 20
}
Adds the specified quantity to the quantity in stock. At least one of the following identifiers must be specified:
product_id
variant_inventory_id
item_number
gtin
item_name
POST /api/v1/inventory/add
{
"product_id": 62,
"quantity": 3
}
{
"product_id": 62,
"variant_inventory_id": null,
"item_number": "60PY2DR",
"item_name": "60PY2DR",
"gtin": "",
"quantity": 23
}
Removes the specified quantity from the quantity in stock. At least one of the following identifiers must be specified:
product_id
variant_inventory_id
item_number
gtin
item_name
POST /api/v1/inventory/remove
{
"product_id": 62,
"quantity": 3
}
{
"product_id": 62,
"variant_inventory_id": null,
"item_number": "60PY2DR",
"item_name": "60PY2DR",
"gtin": "",
"quantity": 17
}
Sets the quantity in stock to the specified quantity. At least one of the following identifiers must be specified:
product_id
variant_inventory_id
item_number
gtin
item_name
POST /api/v1/inventory/set
{
"product_id": 62,
"quantity": 10
}
{
"product_id": 62,
"variant_inventory_id": null,
"item_number": "60PY2DR",
"item_name": "60PY2DR",
"gtin": "",
"quantity": 10
}
Pulls the inventory settings for the current store.
GET /api/v1/inventory/settings
{
"track_inventory": true,
"remove_from_inventory_when": "Ordered",
"out_of_stock_product_status_id": 2,
"in_stock_product_status_id": 1,
"back_order_product_status_id": 3,
"discontinued_product_status_id": 4,
"product_hide_no_inventory": false
}
Modifies the inventory settings for the current store.
PUT /api/v1/inventory/settings
{
"track_inventory": false,
"remove_from_inventory_when": "Shipped",
"out_of_stock_product_status_id": 2,
"in_stock_product_status_id": 1,
"back_order_product_status_id": 3,
"discontinued_product_status_id": 4,
"product_hide_no_inventory": false
}
{
"track_inventory": false,
"remove_from_inventory_when": "Shipped",
"out_of_stock_product_status_id": 2,
"in_stock_product_status_id": 1,
"back_order_product_status_id": 3,
"discontinued_product_status_id": 4,
"product_hide_no_inventory": false
}