Validate Import
POST/api/supplier-inventories/:id/import/validate
Validates import data rows for a supplier without creating any records. Safe to call repeatedly for UI previewing. Resolves SKU and warehouse names against the tenant's catalogue and returns a per-row preview alongside an aggregate summary.
suppliers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
There is no hard row cap on this endpoint — SKU and warehouse lookups are chunked internally so large files can be submitted in one request. Per-request execution time and memory limits are raised for the duration of the call.
Authentication: Requires Bearer token.
Path params:
- supplier: Supplier ID
Body fields:
- rows (required): Array of raw import rows (1+).
- rows.*.sku (optional): Product SKU. Resolved case-insensitively.
- rows.*.quantity (optional): Stock quantity (numeric string)
- rows.*.eta (optional): ETA date string
- rows.*.in_stock (optional): Stock flag (1/0/true/false/yes/y)
- rows.*.discontinued (optional): Discontinued flag (1/0/true/false/yes/y)
- rows.*.warehouse (optional): Warehouse name. Falls back to the supplier's default warehouse when omitted.
Errors:
- 422 when standard validation fails (e.g. empty rows array).
- 422 when the manager raises an exception during lookup (translated from a 500 so the client gets an actionable message).
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.