Overview
Kibo offers two smart endpoints that intelligently determine the most efficient processing method:| Method | Endpoint | Description |
|---|---|---|
POST | /commerce/inventory/v5/inventory/smart-adjust/ | Dynamically routes inventory adjustment requests |
POST | /commerce/inventory/v5/inventory/smart-refresh/ | Dynamically routes inventory refresh requests |
Dynamic Routing Logic
The API automatically determines the most efficient processing method based on the size of your request payload:- Synchronous Processing: Used for smaller payloads. Provides immediate processing and returns inventory results directly.
- Asynchronous Processing: Used for larger payloads. Utilizes the job queue to handle batch updates and returns a job ID for tracking.
method field in the response to determine how the request was handled.
When to Use Smart APIs
Use the Smart Inventory APIs when:- You have variable batch sizes and want Kibo to optimize automatically
- You want to simplify your integration by using a single endpoint instead of managing sync/async logic
- You need to process mixed workloads ranging from single-item updates to bulk operations
- You always need synchronous responses regardless of batch size (use the sync APIs)
- You always want job-based processing for audit trails (use the async APIs)
- You have specific latency requirements that require explicit control
Request Schema
The request body is identical to the existing Adjust and Refresh APIs.Smart Adjust Request Example
Smart Refresh Request Example
Response Schema
The response includes metadata indicating how the request was processed:| Field | Type | Description |
|---|---|---|
method | string | Processing method used: "sync" or "async" |
jobID | string or null | Job identifier for async requests; null for sync requests |
Synchronous Response Example
When Kibo routes the request synchronously, you receive an immediate response:Asynchronous Response Example
When Kibo routes the request asynchronously, you receive a job ID for tracking:Handling Responses
Your integration should check themethod field to determine how to proceed:
Best Practices
- Design for both response types: Your integration should handle both sync and async responses gracefully, even if you expect most requests to fall into one category.
- Batch strategically: While the API handles routing automatically, consider your use case. If you need immediate confirmation, keep batches small. For bulk operations where immediate confirmation is not critical, larger batches are more efficient.
- Implement job polling for async: When you receive an async response, implement polling with exponential backoff to check job status rather than polling at a fixed rapid interval.
- Log the processing method: Track which method was used for your requests to understand your workload patterns and optimize batch sizes if needed.

