Retrieving Inventory Layers
Cost ledger. Inbound rows are cost layers (receipts, builds, returns); outbound rows (negative event_qty) record what was consumed from which layer. Quantity on hand comes from SKUs, not this ledger.
Use GET /api/v1/inventory-layers to page through every record in your organization, or GET /api/v1/inventory-layers/{id} to fetch a single record. The id is a UUID, and a 404 means it doesn't exist in your organization.
API Endpoint
Current Use Cases
Each outbound row shows which cost layer was used, so your accounting tool can book COGS at the real cost.
Sum the remaining cost layers to report what your stock is worth at the end of the month.
Filter by source_type to see whether a layer came from a receipt, a production build, or a return.
Use created_since and created_before to pull exactly one month of cost movements for reconciliation.
Required Headers
Every request must include the following:
Requests missing either header will return 401 Unauthorized
Example Request
Response Schema
Filters
Errors
Cloudbox uses standard HTTP status codes to indicate API success or failure:
- 200–299 – Request succeeded
- 400 – Bad request (missing parameters, invalid values)
- 401 – Unauthorized (missing or invalid API keys)
- 404 – Resource not found
- 429 – Too many requests (rate limited)



