Inventory
Track stock items with SKU lookup and stock counts
Inventory items are physical goods you sell or use on jobs — replacement parts, accessories, consumables. Each item has an SKU, optional GTIN, weight, and a stock count that you can let Servicebay track for you.
Endpoints
- GET
/organisations/{orgId}/inventory— List inventory items (paginated) - POST
/organisations/{orgId}/inventory— Create inventory item - GET
/organisations/{orgId}/inventory/{itemId}— Get inventory item - PUT
/organisations/{orgId}/inventory/{itemId}— Update inventory item - DELETE
/organisations/{orgId}/inventory/{itemId}— Delete inventory item
Server-side SKU lookup
Pass ?sku=BAT-001 to the list endpoint to perform an exact-match SKU
query in Firestore. This is much faster than fetching everything and
filtering client-side, and it doesn't count against the 100-row page limit.
List filters
| Query param | Description |
|---|---|
limit | Page size (max 100, default 50) |
startAfter | Cursor — pass the previous response's nextCursor |
search | Partial match on itemName, description, or sku |
sku | Exact SKU match (server-side query) |
categoryId | Filter to a single category |
API key for authentication. Get your key from the Developer Dashboard.
In: header
Path Parameters
Organisation ID
Query Parameters
Maximum number of items to return (max 100)
1 <= value <= 10050Cursor for pagination - ID of the last item from previous page
Exact SKU lookup
Response Body
application/json
curl -X GET "https://example.com/organisations/string/inventory"{ "success": true, "data": { "items": [ { "id": "string", "itemName": "string", "description": "string", "categoryId": "string", "gtin": "string", "sku": "string", "price": 0, "costPrice": 0, "weight": 0, "weightUnit": "g", "stockCount": 0, "tracksStock": true, "warranty": true, "warrantyPeriod": "day", "warrantyDuration": 0, "quantity": 0, "taxRateId": "string", "index": 0, "createdAt": "2019-08-24T14:15:22Z" } ], "pagination": { "limit": 0, "hasMore": true, "nextCursor": "string" } }}API key for authentication. Get your key from the Developer Dashboard.
In: header
Path Parameters
Organisation ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/organisations/string/inventory" \ -H "Content-Type: application/json" \ -d '{ "itemName": "string" }'{ "success": true, "data": { "id": "string", "itemName": "string", "description": "string", "categoryId": "string", "gtin": "string", "sku": "string", "price": 0, "costPrice": 0, "weight": 0, "weightUnit": "g", "stockCount": 0, "tracksStock": true, "warranty": true, "warrantyPeriod": "day", "warrantyDuration": 0, "quantity": 0, "taxRateId": "string", "index": 0, "createdAt": "2019-08-24T14:15:22Z" }}{ "success": false, "error": "An error occurred"}API key for authentication. Get your key from the Developer Dashboard.
In: header
Path Parameters
Organisation ID
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/organisations/string/inventory/string"{ "success": true, "data": { "id": "string", "itemName": "string", "description": "string", "categoryId": "string", "gtin": "string", "sku": "string", "price": 0, "costPrice": 0, "weight": 0, "weightUnit": "g", "stockCount": 0, "tracksStock": true, "warranty": true, "warrantyPeriod": "day", "warrantyDuration": 0, "quantity": 0, "taxRateId": "string", "index": 0, "createdAt": "2019-08-24T14:15:22Z" }}{ "success": false, "error": "An error occurred"}{ "success": false, "error": "You do not have access to this organisation"}{ "success": false, "error": "An error occurred"}API key for authentication. Get your key from the Developer Dashboard.
In: header
Path Parameters
Organisation ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/organisations/string/inventory/string" \ -H "Content-Type: application/json" \ -d '{ "itemName": "string" }'{ "success": true, "data": { "id": "string", "itemName": "string", "description": "string", "categoryId": "string", "gtin": "string", "sku": "string", "price": 0, "costPrice": 0, "weight": 0, "weightUnit": "g", "stockCount": 0, "tracksStock": true, "warranty": true, "warrantyPeriod": "day", "warrantyDuration": 0, "quantity": 0, "taxRateId": "string", "index": 0, "createdAt": "2019-08-24T14:15:22Z" }}{ "success": false, "error": "An error occurred"}{ "success": false, "error": "An error occurred"}{ "success": false, "error": "You do not have access to this organisation"}{ "success": false, "error": "An error occurred"}API key for authentication. Get your key from the Developer Dashboard.
In: header
Path Parameters
Organisation ID
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/organisations/string/inventory/string"{ "success": true, "data": { "message": "Operation completed successfully" }}{ "success": false, "error": "An error occurred"}{ "success": false, "error": "You do not have access to this organisation"}{ "success": false, "error": "An error occurred"}Machine-readable version: OpenAPI 3.1 spec.