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.
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
- 201
- 401
- 403
- 404
- 422
- 429
Created
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.
Unprocessable Entity
Response Headers
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.