Inventory API
The Carriyo Inventory API manages stock levels across your fulfillment locations and tracks inventory changes over time. Submit inventory events to update per-location quantities, and query current balances by product or location.
Inventory
The Inventory resource provides a centralized view of stock levels across your fulfillment locations. Inventory records are automatically created and updated when you submit inventory events through the Inventory Events API.
Key concepts
Stock levels
Inventory in Carriyo tracks three types of stock quantities for each product at each location:
- On hand: total physical quantity of the product available at the location.
- Reserved: quantity allocated to orders but not yet shipped.
- Unavailable: quantity not available for sale (for example, damaged or expired).
The available quantity is calculated as: on_hand - reserved - unavailable.
Location-based tracking
Inventory is tracked per product per location, allowing you to:
- Monitor stock levels across multiple warehouses or stores
- Allocate orders to locations with available inventory
- Enable store-to-door or ship-from-store fulfillment
Integration with orders
When orders are created and allocated to fulfillment locations, Carriyo automatically reserves inventory. This ensures accurate available quantities are reflected in real-time.
2 operations · 0 objects
/inventory/product-id/{product-id}Get inventory by product ID
Retrieves the current inventory levels for a specific product across all locations.
The response includes stock information for each location where the product has inventory, including:
On Hand: Total physical quantity available
Reserved: Quantity allocated to orders
Unavailable: Quantity not available for sale
Use this endpoint to check real-time stock availability before allocating orders or to sync inventory data with external systems.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product-id | string | Yes | The unique identifier of the product to retrieve inventory for. |
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
Responses
inventory-responseNeed the full machine-readable spec? Download the OpenAPI document →
/inventory/product-id/{product-id}/location-id/{location-id}Delete inventory
Permanently deletes the inventory record for a specific product at a specific location.
Warning: This action cannot be undone. Use this endpoint when:
A product is discontinued at a location
Correcting data by removing incorrect inventory records
Cleaning up test data
After deletion, the inventory for this product-location combination will need to be recreated through new inventory events.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product-id | string | Yes | The unique identifier of the product. |
| location-id | string | Yes | The unique identifier of the location. |
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
Responses
Need the full machine-readable spec? Download the OpenAPI document →
Inventory Events
Inventory events are the mechanism through which stock levels are updated in Carriyo. Instead of directly setting inventory quantities, you submit events that describe changes to your inventory.
Event types
The event_type field controls how the submitted quantities are applied. Each type is either a Set (overwrites the position to the absolute value you send) or an Adjust (applies a signed delta to the current position):
| Event type | Write mode | Effect |
|---|---|---|
SNAPSHOT |
Set | Overwrites both on_hand and unavailable with the values you send. |
SNAPSHOT_ONHAND |
Set | Overwrites on_hand only. |
SNAPSHOT_UNAVAILABLE |
Set | Overwrites unavailable only. |
INVENTORY_ADJUSTMENT_ONHAND |
Adjust | Applies a signed delta to on_hand. |
INVENTORY_ADJUSTMENT_UNAVAILABLE |
Adjust | Applies a signed delta to unavailable. |
RETURN |
Adjust | Records returned items as a delta to unavailable. |
TRANSFER_IN |
Adjust | Records stock moved into the location as a delta. |
TRANSFER_OUT |
Adjust | Records stock moved out of the location as a delta. |
SALE |
Adjust | Records a sale as a delta (send a negative value to reduce stock). |
PO_RECEIPT |
Adjust | Records a purchase-order receipt as a delta. |
Bulk import
The Inventory Events API supports bulk import, allowing you to submit multiple inventory events in a single request. This is useful for:
- Syncing inventory from your ERP or WMS systems
- Processing inventory adjustments in batch
- Initial inventory setup
Each bulk import request is identified by a unique request_id that you supply and can use to track the status of all events in the batch.
Idempotency and retries
The request_id you supply must be unique — re-using one is rejected (requestId already exists), so it guards against an accidental duplicate submission rather than acting as a replay token. Within a single batch you may submit at most one event per product_id and location_id.
Whether a failed batch is safe to resubmit (under a new request_id) depends on the write mode:
- Set events (
SNAPSHOT,SNAPSHOT_ONHAND,SNAPSHOT_UNAVAILABLE) write an absolute position and are applied inevent_timestamporder — a stale snapshot is ignored if a newer one has already been applied — so resubmitting the same values converges to the same result. Safe to retry. - Adjust events apply a signed delta, so resubmitting double-counts. If an adjust batch fails or times out, confirm whether it landed by retrieving the batch by its
request_idbefore resubmitting.
Event tracking
Retrieve the status and results of inventory events using either:
- Request ID: get all events from a specific bulk import.
- Product ID: get all events for a specific product.
This lets you verify that inventory updates were processed correctly and troubleshoot any failures.
3 operations · 0 objects
/inventory-events/request-id/{request-id}Get inventory events by request ID
Retrieves all inventory events that were submitted as part of a specific bulk import request.
Use this endpoint to:
- Verify that all events in a batch were processed successfully
- Check the overall batch status (
COMPLETEDorPROCESSING) - Troubleshoot individual events
Response shape
The response includes:
status: Overall batch statusCOMPLETED- All events have been processedPROCESSING- Some events are still being processed
inventory_events: List of events sorted by sequence number
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| request-id | string | Yes | The request ID returned from the bulk import operation. |
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
Responses
get-inventory-events-responseNeed the full machine-readable spec? Download the OpenAPI document →
/inventory-events/product-id/{product-id}Get inventory events by product ID
Retrieves the history of inventory events for a specific product.
Use this endpoint to:
Audit inventory changes over time
Debug unexpected inventory levels
Track the source and timing of inventory updates
Events are returned in chronological order with full details including timestamps, quantities, and processing status.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product-id | string | Yes | The unique identifier of the product to retrieve events for. |
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
Responses
- The type of inventory event.Values:
SNAPSHOTSNAPSHOT_ONHANDSNAPSHOT_UNAVAILABLEINVENTORY_ADJUSTMENT_ONHANDINVENTORY_ADJUSTMENT_UNAVAILABLEORDER_RESERVATIONORDER_UPDATEORDER_CANCELLATIONORDER_FULFILLMENTORDER_UNFULFILLEDORDER_RETURNSHIPMENT_SHIPPEDRETURN_REQUEST_REVERSE_SHIPMENT_DELIVEREDRETURN_REQUEST_MARKED_AS_RECEIVEDRETURNTRANSFER_INTRANSFER_OUTSALEPO_RECEIPT
Need the full machine-readable spec? Download the OpenAPI document →
/inventory-events/bulk/importBulk import inventory events
Submits multiple inventory events in a single request to update stock levels across your locations.
Request header requirements
request-id(required): a unique ID for this batch. Must not have been used before.
Supported event types
Only these event types are supported for bulk import:
| Event type | Description | Required fields |
|---|---|---|
SNAPSHOT |
Set absolute values for both on_hand and unavailable | on_hand AND unavailable |
SNAPSHOT_ONHAND |
Set absolute value for on_hand only | on_hand only |
SNAPSHOT_UNAVAILABLE |
Set absolute value for unavailable only | unavailable only |
INVENTORY_ADJUSTMENT_ONHAND |
Adjust on_hand by delta (+/-) | on_hand only |
INVENTORY_ADJUSTMENT_UNAVAILABLE |
Adjust unavailable by delta (+/-) | unavailable only |
RETURN |
Record returned items | unavailable only |
TRANSFER_IN |
Record stock transfer into location | on_hand or unavailable |
TRANSFER_OUT |
Record stock transfer out of location | on_hand or unavailable |
SALE |
Record sales (usually negative adjustment) | on_hand or unavailable |
PO_RECEIPT |
Record purchase order receipt | on_hand or unavailable |
Not supported (internal events): ORDER_RESERVATION, ORDER_UPDATE, ORDER_CANCELLATION, ORDER_FULFILLMENT, ORDER_UNFULFILLED, ORDER_RETURN, SHIPMENT_SHIPPED.
Validation rules
- Quantity range: values must be between −1,000,000 and 1,000,000.
- Timestamp: must be within the last 14 days and not in the future.
- No duplicates: each
product_id+location_idcombination must be unique in the batch. - Product/location: must exist in your tenant.
- Location type: must be an inventory-enabled location.
Processing
Events are processed asynchronously via a queue. The response indicates per event:
PROCESSING: event accepted and queued.REJECTED: event failed validation, with a reason.
Best practices
- Use the
request-idheader to provide your own correlation ID. - Include
event_timestampto ensure events are processed in the correct order. - Check results for any
REJECTEDitems.
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| Content-Type | application/json | Yes | Media type of the request body. |
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
| request-id | string | Yes | A unique request ID for this batch (required). - Must be unique across all previous requests - Use this to track processing status via the Get Events by Request ID endpoint - Cannot be reused - if you need to retry, use a new request ID |
Request body
application/jsonrequired- The type of inventory event: -
SNAPSHOT- Set absolute values for both on_hand and unavailable -SNAPSHOT_ONHAND- Set absolute value for on_hand only -SNAPSHOT_UNAVAILABLE- Set absolute value for unavailable only -INVENTORY_ADJUSTMENT_ONHAND- Adjust on_hand by delta (+/-) -INVENTORY_ADJUSTMENT_UNAVAILABLE- Adjust unavailable by delta (+/-) -RETURN- Record returned items (unavailable only) -TRANSFER_IN- Stock transfer into location -TRANSFER_OUT- Stock transfer out of location -SALE- Record sales -PO_RECEIPT- Purchase order receiptValues:SNAPSHOTSNAPSHOT_ONHANDSNAPSHOT_UNAVAILABLEINVENTORY_ADJUSTMENT_ONHANDINVENTORY_ADJUSTMENT_UNAVAILABLERETURNTRANSFER_INTRANSFER_OUTSALEPO_RECEIPT
Responses
inventory-event-bulk-responseNeed the full machine-readable spec? Download the OpenAPI document →