Warehouses and stock
Warehouses, the quantity on hand of each product, and stock adjustments.
Version v1.1, updated
On this page
Warehouses are the places where the company keeps stock, shops included. Stock levels give the quantity on hand per product, warehouse and unit, and adjustments record what changes outside BIRP.
Fields
Send says the field is in responses. Receive says a write accepts it; a reference is sent as an object, such as category for category_id. Totals, VAT, numbers and statuses are computed by BIRP and never received.
List warehouses
Lists the warehouses of the company, shop warehouses included.
Scope:
stock:read.Idempotency: a read; send it as often as you need.
A warehouse of kind retail belongs to a shop.
/v1/warehousesParameters
limitinteger, in query- Page size, 1 to 200. Default 50.Default
50 cursorstring, in query- next_cursor of the previous page. Pages are ordered by id.Example
opaque-cursor-example updated_sincestring (date-time), in query- Only records changed at or after this time: ISO 8601 date and time with an offset or Z.Example
2026-09-01T00:00:00Z external_idstring, in query- Identifier in an external system. Requires source.Example
1042 sourcestring, in query- External system of external_id, in lowercase. Requires external_id.Example
woocommerce
curl "https://api.birp.io/v1/warehouses" \
-H "Authorization: Bearer $BIRP_API_KEY"const response = await fetch("https://api.birp.io/v1/warehouses", {
headers: {
Authorization: `Bearer ${process.env.BIRP_API_KEY}`,
},
});
if (!response.ok) throw new Error(`BIRP API error ${response.status}`);
const result = await response.json();<?php
$ch = curl_init("https://api.birp.io/v1/warehouses");
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("BIRP_API_KEY"),
],
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);import os
import requests
response = requests.request(
"GET",
"https://api.birp.io/v1/warehouses",
headers={
"Authorization": f"Bearer {os.environ['BIRP_API_KEY']}",
},
timeout=10,
)
response.raise_for_status()
result = response.json(){
"data": [
{
"address": "Str. Exemplului 4, Chisinau",
"archived_at": null,
"created_at": "2026-09-01T07:30:00.000Z",
"external_ids": [],
"id": "00000000-0000-4000-8000-000000000041",
"kind": "warehouse",
"name": "Main warehouse",
"status": "active",
"updated_at": "2026-09-28T14:05:12.417Z"
}
],
"meta": {
"has_more": false,
"limit": 50,
"next_cursor": null
}
}Errors particular to this operation:
422
validation_failed
List stock levels
Lists the quantity on hand of each product, per warehouse and unit.
Scope:
stock:read.Idempotency: a read; send it as often as you need.
Stock levels have no updated_since: read them per warehouse or per product, with the cursor.
/v1/stock/levelsParameters
limitinteger, in query- Page size, 1 to 200. Default 50.Default
50 cursorstring, in query- next_cursor of the previous page. Pages are ordered by id.Example
opaque-cursor-example warehouse_idstring, in query- A warehouse id, or none for stock not assigned to a warehouse.Example
00000000-0000-4000-8000-000000000041 product_idstring (uuid), in query- One product.Example
00000000-0000-4000-8000-000000000011
curl "https://api.birp.io/v1/stock/levels" \
-H "Authorization: Bearer $BIRP_API_KEY"const response = await fetch("https://api.birp.io/v1/stock/levels", {
headers: {
Authorization: `Bearer ${process.env.BIRP_API_KEY}`,
},
});
if (!response.ok) throw new Error(`BIRP API error ${response.status}`);
const result = await response.json();<?php
$ch = curl_init("https://api.birp.io/v1/stock/levels");
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("BIRP_API_KEY"),
],
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);import os
import requests
response = requests.request(
"GET",
"https://api.birp.io/v1/stock/levels",
headers={
"Authorization": f"Bearer {os.environ['BIRP_API_KEY']}",
},
timeout=10,
)
response.raise_for_status()
result = response.json(){
"data": [
{
"id": "EXAMPLE-LEVEL-0001",
"lot_count": 2,
"product_id": "00000000-0000-4000-8000-000000000011",
"product_kind": "goods",
"quantity": "12.5",
"unit": "kg",
"warehouse_id": "00000000-0000-4000-8000-000000000041"
},
{
"id": "EXAMPLE-LEVEL-0002",
"lot_count": 1,
"product_id": "00000000-0000-4000-8000-000000000012",
"product_kind": "finished_product",
"quantity": "30",
"unit": "pcs",
"warehouse_id": null
}
],
"meta": {
"has_more": false,
"limit": 50,
"next_cursor": null
}
}Errors particular to this operation:
422
validation_failed
Adjust the stock of a goods item in a warehouse
Records a receipt, a correction or a loss of a goods item in a warehouse, and returns the resulting level.
Scope:
stock:write.Idempotency:
Idempotency-Keyrequired. See Idempotency.
receipt takes a quantity above zero, loss one below zero, adjustment either. Adjustments apply to resale goods, in warehouses of kind warehouse.
/v1/stock/adjustmentsParameters
Idempotency-Keyrequiredstring, in header- Unique value for this request (for example a UUID), 1 to 128 printable ASCII characters. A retry with the same key and the same request gets the stored response for 24 hours, with Idempotency-Replayed: true; the same key with a different request answers 422 idempotency_key_reused. Required on POST, optional on PUT, PATCH and DELETE.Example
00000000-0000-4000-8000-0000000000a1
Request body
application/json
notestring | nullunitstring- Unit of the quantity. Left out: the default unit of the product.
reasonrequiredstring- receipt: goods received (quantity above zero). adjustment: a correction, such as a stock count (either sign). loss: damage, theft or expiry (quantity below zero).One of
receipt,adjustment,loss productrequiredProductReference- A goods item of the company. Finished products are not adjusted through the API in this version: their stock comes from production.
product.idstring (uuid)- BIRP id of the record.
product.skustring- Product SKU.
product.kindstring- With sku only: which kind of product.One of
goods,finished_product product.sourcestring- External system of external_id, in lowercase.
product.external_idstring- Identifier of the record in an external system. Requires source.
quantityrequiredstring- Signed decimal string, at most three decimals, not zero: positive adds stock, negative takes it.
referencestring | null- Reference in the calling system, for example a delivery note or a count id. Kept with the movements.
warehouserequiredReference- An active warehouse of kind warehouse.
warehouse.idstring (uuid)- BIRP id of the record.
warehouse.sourcestring- External system of external_id, in lowercase.
warehouse.external_idstring- Identifier of the record in an external system. Requires source.
curl -X POST "https://api.birp.io/v1/stock/adjustments" \
-H "Authorization: Bearer $BIRP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"note":"Weekly count","product":{"sku":"SP-FLOUR-25"},"quantity":"-2.5","reason":"adjustment","reference":"WC-COUNT-2026-10-05","warehouse":{"id":"00000000-0000-4000-8000-000000000041"}}'const response = await fetch("https://api.birp.io/v1/stock/adjustments", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BIRP_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"note": "Weekly count",
"product": {
"sku": "SP-FLOUR-25"
},
"quantity": "-2.5",
"reason": "adjustment",
"reference": "WC-COUNT-2026-10-05",
"warehouse": {
"id": "00000000-0000-4000-8000-000000000041"
}
}),
});
if (!response.ok) throw new Error(`BIRP API error ${response.status}`);
const result = await response.json();<?php
$ch = curl_init("https://api.birp.io/v1/stock/adjustments");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("BIRP_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"note": "Weekly count",
"product": {
"sku": "SP-FLOUR-25"
},
"quantity": "-2.5",
"reason": "adjustment",
"reference": "WC-COUNT-2026-10-05",
"warehouse": {
"id": "00000000-0000-4000-8000-000000000041"
}
}
JSON,
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);import os
import uuid
import requests
response = requests.request(
"POST",
"https://api.birp.io/v1/stock/adjustments",
json={
"note": "Weekly count",
"product": {
"sku": "SP-FLOUR-25"
},
"quantity": "-2.5",
"reason": "adjustment",
"reference": "WC-COUNT-2026-10-05",
"warehouse": {
"id": "00000000-0000-4000-8000-000000000041"
}
},
headers={
"Authorization": f"Bearer {os.environ['BIRP_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=10,
)
response.raise_for_status()
result = response.json(){
"data": {
"created_at": "2026-10-05T09:12:44.120Z",
"id": "a1b2c3d4-0000-4000-8000-0000000000aa",
"level": {
"id": "EXAMPLE-LEVEL-0001",
"lot_count": 2,
"product_id": "00000000-0000-4000-8000-000000000011",
"product_kind": "goods",
"quantity": "12.5",
"unit": "kg",
"warehouse_id": "00000000-0000-4000-8000-000000000041"
},
"movements": [
{
"id": "b2c3d4e5-0000-4000-8000-0000000000bb",
"lot_id": "c3d4e5f6-0000-4000-8000-0000000000cc",
"quantity": "-2.500",
"type": "adjustment"
}
],
"note": "Weekly count",
"product_id": "00000000-0000-4000-8000-000000000011",
"quantity": "-2.500",
"reason": "adjustment",
"reference": "WC-COUNT-2026-10-05",
"unit": "kg",
"warehouse_id": "00000000-0000-4000-8000-000000000041"
}
}Errors particular to this operation:
409
insufficient_stock409
sku_ambiguous422
reference_not_found422
validation_failed
Related
- stock-levels
- products
- pagination-and-filtering