Inventory Layers API

Get access to your inventory layers data through Cloudbox's v1 API.

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

GET
/api/v1/inventory-layers
GET
/api/v1/inventory-layers/{id}

Required Headers

Every request must include the following:

Header Key
Description
org-api-key
Your Organization API key. Contact Cloudbox Support For Access: support@cloudboxapp.com.
user-api-key
Your User API Key

Requests missing either header will return 401 Unauthorized

Example Request

bash curl -X GET "https://app.cloudboxapp.com/api/v1/inventory-layers?limit=100" \ -H "org-api-key: YOUR_ORG_API_KEY" \ -H "user-api-key: YOUR_USER_API_KEY" \ -H "Accept: application/json"

Response Schema

Column
Type
Description
id
string
Unique ID
sku_id
string
References SKU. Filterable (exact)
product_id
string, nullable
References Product. Filterable (exact)
container_id
string, nullable
References Containers
shipment_id
string (uuid), nullable
References Shipments
source_type
string
Filterable (exact)
quantity_received
number
quantity_available
number
quantity_consumed
number
event_qty
number, nullable
Negative on outbound rows (quantity consumed from a layer)
unit_cost
number, nullable
freight_cost_allocated
number
tax_cost_allocated
number
landed_unit_cost
number, nullable
consumed_layer_id
string, nullable
References Inventory
reference_type
string, nullable
reference_id
string, nullable
notes
string, nullable
created_at
string (ISO 8601)
Creation timestamp (UTC). Sortable

Filters

limitPage size (default 100, max 1000)
offsetNumber of records to skip (default 0)
sortOne of: created_at
orderasc | desc
sku_idLayers for this SKU
product_idLayers for this product
source_typeshipment | manual | backfill | container_adjustment | fulfillment | return | production | production_consume | initial
created_sinceOnly records created at or after this ISO 8601 timestamp
created_beforeOnly records created at or before this ISO 8601 timestamp
default sortcreated_at descending

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)