Add variants to products by SKU
Variants are the different options of an item such as size, color, and materials. For example, there are 12 variants for a laptop that comes in three sizes (13, 15, and 17 inches) and four colors (red, blue, grey, and white). By adding variants to products, you can offer more options to shoppers. With this endpoint, you can add up to 25 variants to an existing product Note:
1. At least one variant must be specified.
2. If you don’t have product ID, use the corresponding ID-based endpoint - POST /products/{id}/variants/actions/attach
.
Authorizations
S2S access token (JWT) from fabric Identity service (during Login)
Headers
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
Unique request ID
Path Parameters
Product SKU
Query Parameters
Comma-separated statuses indicating the preferred order of the product versions considered for this operation (endpoint action). For example, <br />1. When the status is DRAFT
, this operations will only apply to the Draft version of product, if it exists <br />2. When the status is LIVE
, this operation will only apply to the Live version of the product, if it exists <br />3 When the status is LIVE,DRAFT
, this operation will prioritize Live version first, if it exists. Otherwise, the Draft version is considered. <br />4 When the status is DRAFT,LIVE
this operation will prioritize the Draft version first, if it exists. Otherwise, the Live version is considered.
Body
Variants based on SKU
Was this page helpful?