Skip to main content

Import Supplier Links

POST 

/api/v2/products/import-supplier-links

Import supplier links previewed by the validate endpoint. Send back the links the preview returned, minus any row whose errors array was non-empty.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

supplier_id may be omitted when the supplier does not exist yet - the supplier is created from supplier_name, once per distinct name across the whole payload, so ten rows naming the same new supplier produce one supplier. Either supplier_id or supplier_name must be present on every link.

A link carrying supplier_product_id updates that existing supplier link; without it a new link is created.

Request fields:

  • links (required, array, min 1)
    • product_id (required, integer): must exist
    • supplier_id (optional, integer): must exist when present; omit for a supplier that will be created
    • supplier_name (required when supplier_id is absent, string, max 255): name of the supplier to create or match
    • supplier_product_id (optional, integer): existing supplier link to update; must exist when present
    • product_sku (optional, string): echoed back in the result summary
    • supplier_sku (optional, string): supplier's own SKU for the product
    • supplier_sku_column_present (optional, boolean): false leaves an existing supplier_sku untouched on update
    • moq (optional, numeric), leadtime (optional, integer), target_stock_days (optional, integer)
    • is_default (optional, boolean): makes this the product's default supplier
    • pricing (optional, array): [{ tier_id, price }] per supplier pricing tier

Imports run in the background - a bulk import can exceed a ~100s edge-proxy limit (Cloudflare 524), so the rows are processed off the request cycle. The response returns a tracked_job_log_id; poll the tracked job log endpoints for progress and for the created / updated / failed counts plus the names of any suppliers created along the way.

Request

Responses

Accepted

Response Headers
    Content-Type