Validate Cost Entry Allocation Import
POST/api/cost-entries/:costEntry/allocations/import/validate
Validates mapped import rows against the cost entry and returns a per-row preview — no changes are made. Each row resolves its target (SKU / name, case-insensitive) and reports errors (row is skipped on import) and warnings (e.g. the entry already has an allocation to that target on that date). A blank allocation date defaults to the cost entry's cost date.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
summary.exceeds_available is true — and errors explains it — when the valid rows add up to more than summary.available_amount (the entry amount minus existing allocations minus a pending amortization schedule's reserved periods). Such a file cannot be imported.
Body: rows (required, 1–5000) — each with allocation_type, allocation_target, allocation_amount, and optional allocation_date, allocation_period_start, allocation_period_end.
Authentication: Requires Bearer token (scope purchase-orders:write).
Request
Responses
- 200
- 401
- 403
- 404
- 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.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
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.