Skip to main content

Validate Import

POST 

/api/supplier-inventories/5/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.

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

Successful response