Skip to main content

Inventory API

Required scope: inventory:read (read) · inventory:write (write)


Stock Levels

Stock levels are included in the Products API response:

  • current_stock — Total stock on hand
  • in_stock — Whether the product is in stock
  • low_stock_threshold — Threshold for low-stock alerts

For products with variations, each variation includes its own current_stock.


Create a Stock Adjustment

POST /api/v1/stock_adjustments

Required scope: inventory:write

Request Body

ParameterTypeRequiredDescription
product_idintegeryesThe product to adjust
adjustment_typestringyesOne of: receive, count, spoilage, damage, reweigh, moisture_loss
quantity_changedecimalyesThe quantity to add (positive) or remove (negative)
reasonstringnoReason for the adjustment

Example

curl -X POST \
-H "X-API-Key: bpos_..." \
-H "Content-Type: application/json" \
-d '{
"product_id": 1,
"adjustment_type": "receive",
"quantity_change": 26.0,
"reason": "Weekly shipment received"
}' \
https://yourstore.brotherpos.ca/api/v1/stock_adjustments

Response

{
"data": {
"id": 101,
"product_id": 1,
"product_name": "Blue Dream 3.5g",
"adjustment_type": "receive",
"quantity_change": 26.0,
"quantity_before": 24.0,
"quantity_after": 50.0,
"reason": "Weekly shipment received",
"created_at": "2026-03-22T14:30:00Z"
}
}