Validate Product Mappings CSV
POST/api/faire/instances/:integrationInstance/products/csv-mappings/validate
Resolves every row of a mappings CSV and reports what WOULD change, without writing anything. Use it to preview an import before committing it with POST .../products/csv-mappings.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Row semantics:
mapped_skuset → links the variant to the SKU.io product with that code, replacing any existing link.mapped_skublank AND the variant is currently mapped → removes the mapping.mapped_skublank AND the variant is already unmapped → counted inskipped_count, nothing happens.
Only faire_variant_id and mapped_sku are read; the other exported columns are context for the person editing the sheet and are ignored. Variants are matched within the given integration instance only, so a file exported from one connection cannot write mappings into another.
Path Parameters:
integrationInstance- Faire integration instance ID.
Body (multipart/form-data):
file(required, file, mimes:csv,txt, max 10MB) - The mappings CSV.
Response:
map_count/unmap_count- How many variants would be linked / unlinked.skipped_count- Blank rows for variants that are already unmapped.invalid_rows- Rows that could not be resolved, each withrow_numberanderror.mappings- The resolvedfaire_product_option_id→sku_product_idpairs (sku_product_idis null for an unmap).
Errors:
422- The file is missing the required columns, or fails file validation (type/size).
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.
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.