V1 and V2Products (V1)

Resync variants

POST
/api/v1/products/{parent_product_id}/variants/resync

Restore the attributes at parent level of the variant with the value of the parent

It's necessary to send two list, one with the labels of the attributes and another with the ids of the variant products.

fieldMandatoryDescription
attribute_labelsyesList of attribute labels to reset. These attributes must be at a parent level
variant_idsyesList of variant ids that are going to restore the value for the parent attributes. These ids must be variants of the parent product

A 200 OK is returned upon success.

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

parent_product_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST 'https://example.com/api/v1/products/string/variants/resync' \  -H 'Content-Type: application/json' \  --data-raw '{  "attribute_labels": [    "attribute_label_1",    "attribute_label_2"  ],  "variant_ids": [    "<variant_id_1>",    "<variant_id_2>"  ]}'
Empty