Skip to main content

Create SKU Product

POST 

/api/shopify/:integrationInstance/products/:product/create-sku-product

Create a new SKU product from a Shopify product and map it. If a SKU product with the same SKU already exists, links to it instead.

Not yet available to API tokens

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

Returns 422 if the product is already mapped.

Authentication: Requires Bearer token.

Field mappings Send field_mappings to control how Shopify values are copied onto the new SKU product for this request only. Each entry pairs a Shopify source field with a SKU target field; call GET /api/shopify/mappings/available-fields for the valid values on both sides. Entries naming a field that is not in that list are ignored, and any field you do not map keeps its default value.

Omit field_mappings entirely to use the mappings already saved on the integration (GET /api/shopify/:integrationInstance/mappings).

Set save_as_default to true to also persist the supplied mappings as the integration's saved mappings, so later requests that omit field_mappings reuse them. It has no effect when field_mappings is absent or empty.

Optional per-mapping parsers transform the Shopify value before it is stored. Supported rules: fr (find and replace), tl (trim left), tr (trim right), append.

Request body (all fields optional)

  • field_mappings: array of mapping objects. Applied to this request only unless save_as_default is true.
  • field_mappings[].shopify_field: string, required for each entry. Shopify source field, e.g. unit_cost.
  • field_mappings[].sku_field: string, required for each entry. SKU target field, e.g. unit_cost.
  • field_mappings[].parsers: array of transforms applied to the source value, in order.
  • field_mappings[].parsers[].rule: string, required. One of fr, tl, tr, append.
  • field_mappings[].parsers[].args: required. Arguments for the rule.
  • save_as_default: boolean. Persist field_mappings as the integration's saved mappings.

Request

Responses

Created

Response Headers
    Content-Type