Upload Inventory File
POST/api/supplier-portal/inventory/upload
Stores and validates a CSV/XLSX stock file (max 10 MB, 20,000 rows) into a preview; nothing is written yet. Columns are auto-mapped from your saved mapping, then from common header names. Rows match your SKU first, then the buyer's product SKU. Zero or negative quantities become 0 and out of stock. SKUs absent from the file are untouched unless full_snapshot is on, which sets them to 0 in the warehouses the file covers. Cost columns never change prices; they become a catalog proposal at commit.
Called by a B2B portal buyer with the bearer token POST /api/portal/auth/login returns (or the buyer's feed key) — not with a staff Personal Access Token.
Status needs_mapping means the SKU or quantity column could not be identified: send a mapping with Map Inventory Upload Columns. Any earlier un-committed preview is discarded. Returns 404 when the merchant has switched the supplier's inventory feed capability off.
Authentication: supplier-portal bearer token. Every lookup is scoped to the signed-in user's supplier; a record of another supplier returns 404.
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
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.
Unprocessable Content
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.