Create a product family
Create a new product family.
Upon successful creation, a 201 CREATED status code is returned and product family can be found in response body.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| name | string | yes | human friendly name |
| attributes | list | no | List of attribute IDs or objects that include a label and, optionally, an id. *attributes with inheritance OFF |
| parent_attributes | list | no | List of attribute IDs or objects that include a label and, optionally, an id. *attributes with level 1 inheritance ON |
| variant_attributes | list | no | List of attribute IDs or objects that include a label and, optionally, an id. *attributes with level 2 inheritance ON |
"attributes", "parent_attributes", and "variant_attributes" can each be provided as either a list of IDs or a list of objects containing a label and, optionally, an id. You cannot mix IDs and objects within the same request. Attributes can also be sent as objects to define the inheritance level for system attributes.
The "parent_attributes" and "variant_attributes" options are available only when automatic inheritance is active on the account. Contact your account manager for more information.
Authorization
bearerAuth Obtain a token via POST /auth/api/get-token (15 minute lifetime), then send it as Authorization: Bearer <token>.
In: header
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/product_families' \ -H 'Content-Type: application/json' \ --data-raw '{ "name": "product_family_name", "attributes": [ "attribute1_id", "attribute2_id", "attribute3_id" ], "parent_attributes": [ "attribute4_id", "attribute5_id" ], "variant_attributes": [ "attribute6_id", "attribute7_id" ]}'{ "data": [ { "created": "2023-03-27T07:39:28.167000+00:00", "created_at": "2023-03-27T07:39:28.167000+00:00", "id": "64214830d9a5d3244f24ce97", "modified": "2023-03-27T07:39:28.245000+00:00", "name": "product_family_name", "total_attributes": 5, "total_models": 0, "total_products": 0 } ]}