V1 and V2Products (V1)

Link a variant to a product

POST
/api/v1/products/{product_id}/variant/{variant_id}

Link an existing product as a variant of another product

variant_id will become a Variant of product_id

  • Product can be a Single product or a Parent product

  • Variant must be a Single product

Both product and variant must belong to the same Family or be Unassigned.

⚠️ The result of this operation may cause data loss

Authorization

bearerAuth
AuthorizationBearer <token>

Obtain a token via POST /auth/api/get-token (15 minute lifetime), then send it as Authorization: Bearer <token>.

In: header

Path Parameters

product_id*string
variant_id*string

Response Body

application/json

application/json

curl -X POST 'https://example.com/api/v1/products/string/variant/string'
{  "data": [    {      "_parent_id": null,      "assets": [],      "attributes": {        "boolean": false,        "decimal": 23.3,        "multiselect": [          "a",          "d"        ],        "short_text": "shorttext",        "url": "https://gitlab.plytix.com/"      },      "categories": [],      "created": "2023-03-20T16:21:05.923000+00:00",      "created_user_audit": {        "avatar_color": "#74cc66",        "type": "USER",        "user_display_name": null,        "user_email": "user@email.com",        "user_id": "60795d80302a91ac42e7f5f8",        "user_last_name": "Name",        "user_name": "User",        "user_thumb": "https://static.plytix.com/template/dev/img/user-default-image.png",        "username": "username"      },      "gtin": null,      "id": "641887f1d10eec81d978e10a",      "label": null,      "modified": "2023-03-20T16:32:13.485000+00:00",      "modified_user_audit": {        "avatar_color": null,        "type": "API",        "user_display_name": null,        "user_email": "apikey",        "user_id": "6405cf21f856320007dd2210",        "user_last_name": null,        "user_name": "apikey",        "user_thumb": null,        "username": null      },      "num_variations": 1,      "overwritten_attributes": [],      "product_family_id": "6405f5ce7288e165f149eb3c",      "product_family_model_id": "6405f74a7288e165f149eb47",      "product_type": "PARENT",      "relationships": [],      "sku": "1011",      "status": "Draft",      "thumbnail": null    }  ]}