Create Variation Group - Venddor API

← Back to API Documentation
POST {{baseUrl}}/ProductVariations/

This endpoint allows you to create a product variation group, which groups related products together (e.g., the same product in different colors or sizes). Products in a variation group appear on the same product page, allowing customers to switch between variations.

Request Headers

Header Value Description
Authorization Basic Auth Base64 encoded username:password combination

Request Body Parameters

Parameter Type Required Description
product_ids* array Yes Array of product IDs to be included in the variation group
code* string Yes Unique identifier for the variation group
features* array Yes Array of features that define the variations (e.g., color, size)

Features Array Structure

Parameter Type Required Description
feature_id* number Yes ID of the feature (e.g., 573 for color, 575 for size)
purpose* string Yes Always set to "group_catalog_item" for product variations

Example Request

{
  "product_ids": [
    977463,
    977465
  ],
  "code": "MY_GROUP_h1",
  "features": [
    {
      "feature_id": 573,
      "purpose": "group_catalog_item"
    },
    {
      "feature_id": 575,
      "purpose": "group_catalog_item"
    }
  ]
}
Note: In this endpoint, you can create a product group and specify which products should belong to it. This way, products will appear grouped on the same product page, allowing customers to switch between them based on color, size, and box type variations.

Response

The endpoint returns information about the newly created variation group.

Example Response

{
  "variation_group_id": "123",
  "status": "success",
  "message": "Variation group created successfully"
}
Tip: When creating a variation group, make sure the products you're grouping actually have the relevant features (color, size, etc.) assigned to them. Otherwise, they won't display correctly as variations.
Important: The code parameter must be unique. If you attempt to use a code that already exists for another variation group, the request will fail and the group won't be created.