Preview Kit Assembly for Inventory Debt Claims
POST/api/inventory/debt/claims/assemble-preview
Preview what Assemble Kits for Inventory Debt Claims would build for the selected claims, without building anything.
inventory:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
A kit that ships with no kit stock owes the kit itself, and only kit stock can repay it. When the kit's components are in stock, the kits can be assembled from them and the claims settled from the new kits, at what the components actually cost.
Authentication: Requires Bearer token.
Request body:
- claim_ids (array of integer, required, 1-200) - the claims to plan for
Response 200:
- data.pools[] (array) - one entry per kit and warehouse in the selection
- product_id (integer) - the kit
- kit_sku (string, nullable)
- kit_name (string, nullable)
- warehouse_id (integer)
- warehouse_name (string, nullable)
- selected_claims (integer) - selected claims in this pool
- units_owed (number) - units owed in this pool up to and including the newest selected claim; claims are repaid oldest first, so older claims ahead of the selected ones count too. Shipments in a locked inventory period are excluded
- units_held_locked (number) - units owed on shipments in a locked inventory period; settlement holds them, so nothing is built for them
- kit_on_hand (number) - kit stock already free in the pool (quarantined units excluded), used before anything is built
- buildable (integer) - kits the component stock available at this warehouse can make (available = on hand minus allocated, on hold and non-sellable; the lowest per-component ratio wins)
- will_assemble (integer) - kits that will be built: owed less kit_on_hand, capped at buildable. Kits that share a component share its stock across the plan
- short_after (number) - units still owed after building
- bottleneck_product_id (integer, nullable) - the component that limits the build
- bottleneck_sku (string, nullable)
- component_cost_per_kit (number, nullable) - quantity per kit times the average cost of each component's stock on hand at this warehouse; the assembly consumes oldest stock first, so the actual cost can differ slightly
- skip_reason (string, nullable) - why a pool builds nothing: not_a_kit, no_recipe, no_components_on_hand, already_covered, period_locked, lifecycle_blocked
- skip_message (string, nullable) - the same reason in words
- lifecycle_warning (string, nullable) - set when the kit's lifecycle state allows new assemblies with a warning
- data.kits_to_assemble (integer) - total kits across pools
- data.units_owed (number)
- data.short_after (number)
- data.selected_claims (integer) - outstanding claims in the selection
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.