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 handin_stock— Whether the product is in stocklow_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
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | The product to adjust |
adjustment_type | string | yes | One of: receive, count, spoilage, damage, reweigh, moisture_loss |
new_stock | decimal | yes | The new stock level |
reason | string | no | Reason 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"
}
}