V1 and V2Products (V1)
Assign a product family
Assign family to a product
| parameter | description | mandatory |
|---|---|---|
| product_family_id | id of the product family that is going to be assigned to the product | yes |
Important notes:
- Changing product family might cause data loss
- Product families cannot be assigned to Variant products
- Changing the product family will change the same fields of the variants
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
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/family' \ -H 'Content-Type: application/json' \ --data-raw '{ "product_family_id": "<product_family_id>"}'{ "data": [ { "_parent_id": null, "assets": [], "attributes": { "boolean": false, "date": "2023-02-27T00:00:00", "decimal": 25.3, "integer": 25, "paragraph": "paragraph", "short_text": "shorttext" }, "categories": [], "created": "2023-03-20T16:21:06.052000+00:00", "gtin": null, "id": "641887f2d10eec81d978e10e", "label": null, "modified": "2023-03-22T13:33:06.925000+00:00", "num_variations": 0, "overwritten_attributes": [], "product_family_id": "6422dd98d732cac61a58431e", "product_family_model_id": "6422dda9d732cac61a584320", "product_type": "PARENT", "relationships": [], "sku": "1013", "status": "Draft", "thumbnail": null } ]}