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
new_stockdecimalyesThe new stock level
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",
"new_stock": 50.0,
"reason": "Weekly shipment received"
}' \
https://yourstore.brotherpos.ca/api/v1/stock_adjustments

Response

{
"data": {
"success": true,
"product_id": 1,
"product_name": "Blue Dream 3.5g",
"old_stock": 24.0,
"new_stock": 50.0,
"adjustment_type": "receive"
}
}