curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/inventory-levels/{id}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"minQuantity": 5,
"maxQuantity": 20,
"includeUsed": false,
"autoCreate": false,
"active": false,
"customerPoNumber": "PO-12345"
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/inventory-levels/{id}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://apipub.firstbasehq.com/api/v1/inventory-levels/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "123e4567-e89b-12d3-a456-426614174000",
"skuId": "123e4567-e89b-12d3-a456-426614174000",
"warehouseId": "123e4567-e89b-12d3-a456-426614174000",
"minQuantity": 5,
"maxQuantity": 20,
"includeUsed": true,
"autoCreate": true,
"active": true,
"stockDetails": {
"newInventories": 12,
"usedInventories": 3,
"pendingInventoryOrders": 2,
"totalAvailable": 14,
"totalItemsToOrder": 6
},
"regionId": "123e4567-e89b-12d3-a456-426614174000",
"customerPoNumber": "PO-12345",
"createdInventoryOrderId": "123E4567-E89B-12D3-A456-426614174000"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Update inventory level
curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/inventory-levels/{id}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"minQuantity": 5,
"maxQuantity": 20,
"includeUsed": false,
"autoCreate": false,
"active": false,
"customerPoNumber": "PO-12345"
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/inventory-levels/{id}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://apipub.firstbasehq.com/api/v1/inventory-levels/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "123e4567-e89b-12d3-a456-426614174000",
"skuId": "123e4567-e89b-12d3-a456-426614174000",
"warehouseId": "123e4567-e89b-12d3-a456-426614174000",
"minQuantity": 5,
"maxQuantity": 20,
"includeUsed": true,
"autoCreate": true,
"active": true,
"stockDetails": {
"newInventories": 12,
"usedInventories": 3,
"pendingInventoryOrders": 2,
"totalAvailable": 14,
"totalItemsToOrder": 6
},
"regionId": "123e4567-e89b-12d3-a456-426614174000",
"customerPoNumber": "PO-12345",
"createdInventoryOrderId": "123E4567-E89B-12D3-A456-426614174000"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Authorizations
Prefix the value with "ApiKey" to indicate the custom authorization type
Path Parameters
Body
Partial update for an inventory level. Only the fields listed in this schema are accepted.
IMPORTANT: This endpoint does NOT accept skuId, warehouseId, or regionId — these are
immutable after creation. Sending any of them returns 400 with a per-field error
(Cannot change <field> after creation). Sending any other field name returns 400
with detail Unknown field: <name>. Sending an empty body returns 400 At least one
modifiable field must be provided. Fields skuId, warehouseId, and regionId are
not editable after the inventory level has been created.
Setting active to false soft-deletes the inventory level. Reactivating via PATCH
(active=true on an inactive level) is not supported; use POST /api/inventory-levels.
Sending active=true on an already-active level is a 200 no-op (no state change).
NOTE: Sending a wrong type for a numeric field (e.g. minQuantity: "foo") returns 400
with detail "Field \"<field>\" is missing or has an invalid value" — this is the global
deserialization error shape, not the per-field aggregated shape described above.
New minimum quantity threshold (>= 1).
5
New maximum quantity threshold (>= 1; must be > minQuantity unless both equal 1).
20
Whether to include used inventory in stock calculations.
false
Whether to automatically create restock orders when stock is low.
false
Set to false to soft-delete the inventory level. Setting true on an inactive level is rejected.
false
Customer purchase order number to apply to restock orders created from this level
"PO-12345"
Response
Inventory level updated
Inventory level configuration with current stock details for a specific SKU, warehouse, and region
Unique identifier for this inventory level configuration
"123e4567-e89b-12d3-a456-426614174000"
ID of the SKU whose stock level this configuration controls
"123e4567-e89b-12d3-a456-426614174000"
ID of the warehouse where this inventory level applies
"123e4567-e89b-12d3-a456-426614174000"
Minimum quantity threshold
5
Maximum quantity threshold
20
Whether used inventory is included in stock calculations
Whether inventory orders are automatically created when stock is low
Whether this inventory level is active
Current stock details for this inventory level
Show child attributes
Show child attributes
ID of the region scope for this inventory level; null means the organization's default region
"123e4567-e89b-12d3-a456-426614174000"
Optional customer PO number copied to restock orders created from this level
"PO-12345"
Inventory order id created by autoCreate; null when no restock was triggered.
"123E4567-E89B-12D3-A456-426614174000"