Skip to main content

Upload Product Mappings CSV

POST 

/api/faire/instances/:integrationInstance/products/csv-mappings

Applies Faire variant → SKU.io product mappings from a CSV file. Send as multipart/form-data.

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.

Rows are applied independently: rows that cannot be resolved are reported in invalid_rows with their line numbers while every valid row is still applied, so a large sheet can be corrected incrementally rather than all-or-nothing.

Path Parameters:

  • integrationInstance - Faire integration instance ID.

Body (multipart/form-data):

  • file (required, file, mimes:csv,txt, max 10MB) - The mappings CSV.

Response:

  • mapped_count - Variants linked to a SKU.io product.
  • unmapped_count - Variants whose mapping was removed.
  • skipped_count - Blank rows for variants that were already unmapped.
  • failed_count - Rows that resolved but could not be written.
  • invalid_rows - Rows rejected during parsing, each with row_number and error.

Errors:

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

Request

Responses

OK

Response Headers
    Content-Type