API reference

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.

Serverhttps://api.carriyo.comAuthOAuth 2.0 + API KeySpecinventory.yaml

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

get/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

NameTypeRequiredDescription
product-idstringYesThe unique identifier of the product to retrieve inventory for.

Headers

NameValueRequiredDescription
AuthorizationBearer YOUR-ACCESS-TOKENYesOAuth 2.0 bearer token obtained from `POST /oauth/token`.
x-api-keyYOUR-API-KEYYesYour tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.
tenant-idYOUR-TENANT-IDYesYour Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.

Responses

200Successfully retrieved inventory for the product.Schema: inventory-response
  • tenantstring
    The tenant identifier.
  • product_idstring
    The unique identifier of the product.
  • stock_by_locationobject
    Stock information keyed by location ID.
  • creation_datestringformat: date-time
    The date and time when the inventory record was created (ISO 8601 format).
  • update_datestringformat: date-time
    The date and time when the inventory record was last updated (ISO 8601 format).
  • creation_sourcerequest-source
  • update_sourcerequest-source
404No inventory found for the specified product ID.Schema: error-response
  • errorstring
    Error message describing what went wrong.
  • codestring
    Error code for programmatic handling.

Need the full machine-readable spec? Download the OpenAPI document →

delete/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

NameTypeRequiredDescription
product-idstringYesThe unique identifier of the product.
location-idstringYesThe unique identifier of the location.

Headers

NameValueRequiredDescription
AuthorizationBearer YOUR-ACCESS-TOKENYesOAuth 2.0 bearer token obtained from `POST /oauth/token`.
x-api-keyYOUR-API-KEYYesYour tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.
tenant-idYOUR-TENANT-IDYesYour Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.

Responses

200Successfully deleted the inventory record.
404Inventory not found for the specified product and location.Schema: error-response
  • errorstring
    Error message describing what went wrong.
  • codestring
    Error code for programmatic handling.

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 in event_timestamp order — 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_id before 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

get/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 (COMPLETED or PROCESSING)
  • Troubleshoot individual events

Response shape

The response includes:

  • status: Overall batch status
    • COMPLETED - All events have been processed
    • PROCESSING - Some events are still being processed
  • inventory_events: List of events sorted by sequence number

Path parameters

NameTypeRequiredDescription
request-idstringYesThe request ID returned from the bulk import operation.

Headers

NameValueRequiredDescription
AuthorizationBearer YOUR-ACCESS-TOKENYesOAuth 2.0 bearer token obtained from `POST /oauth/token`.
x-api-keyYOUR-API-KEYYesYour tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.
tenant-idYOUR-TENANT-IDYesYour Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.

Responses

200Successfully retrieved inventory events for the request.Schema: get-inventory-events-response
  • statusstring
    Overall status of the batch: - COMPLETED - All events in the batch have been processed - PROCESSING - Some events are still being processed
    Values:COMPLETEDPROCESSING
  • inventory_eventsinventory-event[]
    List of inventory events for this request, sorted by sequence number.
404No events found for the specified request ID.Schema: error-response
  • errorstring
    Error message describing what went wrong.
  • codestring
    Error code for programmatic handling.

Need the full machine-readable spec? Download the OpenAPI document →

get/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

NameTypeRequiredDescription
product-idstringYesThe unique identifier of the product to retrieve events for.

Headers

NameValueRequiredDescription
AuthorizationBearer YOUR-ACCESS-TOKENYesOAuth 2.0 bearer token obtained from `POST /oauth/token`.
x-api-keyYOUR-API-KEYYesYour tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.
tenant-idYOUR-TENANT-IDYesYour Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.

Responses

200Successfully retrieved inventory events for the product.
  • tenantstring
    The tenant identifier.
  • product_idstring
    The unique identifier of the product.
  • location_idstring
    The unique identifier of the location.
  • request_idstring
    The request ID from the bulk import.
  • event_typestring
    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
  • on_handintegerformat: int64
    The on-hand quantity delta applied.
  • reservedintegerformat: int64
    The reserved quantity delta applied (for order-related events).
  • unavailableintegerformat: int64
    The unavailable quantity delta applied.
  • statusstring
    Whether the event has been applied to the inventory snapshot. NOT_APPLIED events are typically superseded by a more recent SNAPSHOT event for the same product/location.
    Values:APPLIEDNOT_APPLIED
  • error_messagestring
    Error message explaining why the event was not applied. Populated when status is NOT_APPLIED.
  • event_timestampstringformat: date-time
    The timestamp when the event occurred.
  • receive_timestampstringformat: date-time
    Timestamp when Carriyo received the event for processing.
  • creation_datestringformat: date-time
    The timestamp when the event record was created.
  • sourcerequest-source
404No events found for the specified product ID.Schema: error-response
  • errorstring
    Error message describing what went wrong.
  • codestring
    Error code for programmatic handling.

Need the full machine-readable spec? Download the OpenAPI document →

post/inventory-events/bulk/import

Bulk 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_id combination 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-id header to provide your own correlation ID.
  • Include event_timestamp to ensure events are processed in the correct order.
  • Check results for any REJECTED items.

Headers

NameValueRequiredDescription
AuthorizationBearer YOUR-ACCESS-TOKENYesOAuth 2.0 bearer token obtained from `POST /oauth/token`.
x-api-keyYOUR-API-KEYYesYour tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.
tenant-idYOUR-TENANT-IDYesYour Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`.
Content-Typeapplication/jsonYesMedia type of the request body.

Header parameters

NameTypeRequiredDescription
request-idstringYesA 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

Content type: application/jsonrequired
  • product_idstringrequired
    The unique identifier of the product. Must exist in your tenant.
  • location_idstringrequired
    The unique identifier of the location. Must be an inventory-enabled location.
  • on_handintegerformat: int64
    The on-hand quantity value. Required for some event types: - Required: SNAPSHOT, SNAPSHOT_ONHAND, INVENTORY_ADJUSTMENT_ONHAND - Not allowed: INVENTORY_ADJUSTMENT_UNAVAILABLE, RETURN, SNAPSHOT_UNAVAILABLE
  • unavailableintegerformat: int64
    The unavailable quantity value. Required for some event types: - Required: SNAPSHOT, SNAPSHOT_UNAVAILABLE, INVENTORY_ADJUSTMENT_UNAVAILABLE, RETURN - Not allowed: SNAPSHOT_ONHAND, INVENTORY_ADJUSTMENT_ONHAND
  • event_typestringrequired
    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 receipt
    Values:SNAPSHOTSNAPSHOT_ONHANDSNAPSHOT_UNAVAILABLEINVENTORY_ADJUSTMENT_ONHANDINVENTORY_ADJUSTMENT_UNAVAILABLERETURNTRANSFER_INTRANSFER_OUTSALEPO_RECEIPT
  • reasonstring
    Optional reason or note for the inventory change.
  • event_timestampstringrequiredformat: date-time
    The timestamp when the event occurred (ISO 8601 format). Required. - Must be within the last 14 days - Cannot be in the future

Responses

200Successfully processed inventory events.Schema: inventory-event-bulk-response
  • request_idstring
    The unique identifier for this bulk import request. Use this to track event status.
  • resultsinventory-event-bulk-response-item[]
    Processing results for each event in the request.
400Invalid request payload.Schema: error-response
  • errorstring
    Error message describing what went wrong.
  • codestring
    Error code for programmatic handling.

Need the full machine-readable spec? Download the OpenAPI document →