Skip to main content

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.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Row semantics:

  • mapped_sku set → links the variant to the SKU.io product with that code, replacing any existing link.
  • mapped_sku blank AND the variant is currently mapped → removes the mapping.
  • mapped_sku blank AND the variant is already unmapped → counted in skipped_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 with row_number and error.
  • mappings - The resolved faire_product_option_idsku_product_id pairs (sku_product_id is null for an unmap).

Errors:

  • 422 - The file is missing the required columns, or fails file validation (type/size).

Request

Responses

OK

Response Headers
    Content-Type