Documentation
Feedback
Guides
API Reference

Guides
Catalog
SKUs

A Stock Keeping Unit (SKU) corresponds to the actual item in the inventory that customers can purchase, which means it is equivalent to a product variation at VTEX, such as a long sleeve gray size S shirt.

Once you have created a product, it is time to submit its respective SKUs.

Try the interactive version of this article by accessing this link. Code will be highlighted and focused for your convenience.

Creating an SKU

To create a new SKU, use the Create SKU endpoint.

Follow these instructions when creating the request body:

  • During SKU creation, do not set IsActive as true. If you send the request to activate the SKU when creating it, you will receive a 400 Bad Request error. The value to IsActive must always be false when sending that request for activation to occur afterward, as explained in Activating an SKU.
  • We suggest you set ActivateIfPossible as true, unless you plan to have an internal workflow to manually activate SKUs.
  • If there is a need to create a new SKU with a specific custom ID, specify the Id (integer) in the request. Otherwise, VTEX will generate the ID automatically.
  • Besides the main ID, you must provide at least one of the following alternate IDs in the request body: RefId or EAN. It is possible to provide both as well.

Request body example (custom ID)


_29
{
_29
"Id": 1,
_29
"ProductId": 310117069,
_29
"IsActive": false,
_29
"ActivateIfPossible": true,
_29
"Name": "sku test",
_29
"RefId": "125478",
_29
"Ean": "8949461894984",
_29
"PackagedHeight": 10,
_29
"PackagedLength": 10,
_29
"PackagedWidth": 10,
_29
"PackagedWeightKg": 10,
_29
"Height": null,
_29
"Length": null,
_29
"Width": null,
_29
"WeightKg": null,
_29
"CubicWeight": 0.1667,
_29
"IsKit": false,
_29
"CreationDate": null,
_29
"RewardValue": null,
_29
"EstimatedDateArrival": null,
_29
"ManufacturerCode": "123",
_29
"CommercialConditionId": 1,
_29
"MeasurementUnit": "un",
_29
"UnitMultiplier": 2.0000,
_29
"ModalType": null,
_29
"KitItensSellApart": false,
_29
"Videos": [ "https://www.youtube.com/" ]
_29
}

Request body example (automatically generated ID)


_28
{
_28
"ProductId": 310117069,
_28
"IsActive": false,
_28
"ActivateIfPossible": true,
_28
"Name": "sku test",
_28
"RefId": "125478",
_28
"Ean": "8949461894984",
_28
"PackagedHeight": 10,
_28
"PackagedLength": 10,
_28
"PackagedWidth": 10,
_28
"PackagedWeightKg": 10,
_28
"Height": null,
_28
"Length": null,
_28
"Width": null,
_28
"WeightKg": null,
_28
"CubicWeight": 0.1667,
_28
"IsKit": false,
_28
"CreationDate": null,
_28
"RewardValue": null,
_28
"EstimatedDateArrival": null,
_28
"ManufacturerCode": "123",
_28
"CommercialConditionId": 1,
_28
"MeasurementUnit": "un",
_28
"UnitMultiplier": 2.0000,
_28
"ModalType": null,
_28
"KitItensSellApart": false,
_28
"Videos": [ "https://www.youtube.com/" ]
_28
}

Response body example


_29
{
_29
"Id":1,
_29
"ProductId": 310117069,
_29
"IsActive": false,
_29
"ActivateIfPossible": true,
_29
"Name": "sku test",
_29
"RefId": "125478",
_29
"Ean": "8949461894984",
_29
"PackagedHeight": 10,
_29
"PackagedLength": 10,
_29
"PackagedWidth": 10,
_29
"PackagedWeightKg": 10,
_29
"Height": null,
_29
"Length": null,
_29
"Width": null,
_29
"WeightKg": null,
_29
"CubicWeight": 0.1667,
_29
"IsKit": false,
_29
"CreationDate": null,
_29
"RewardValue": null,
_29
"EstimatedDateArrival": null,
_29
"ManufacturerCode": "123",
_29
"CommercialConditionId": 1,
_29
"MeasurementUnit": "un",
_29
"UnitMultiplier": 2.0000,
_29
"ModalType": null,
_29
"KitItensSellApart": false,
_29
"Videos": [ "https://www.youtube.com/" ]
_29
}

Updating an SKU

After an SKU has been successfully created, if any changes are needed or if it's necessary to activate it manually, use the Update SKU endpoint.

Request body example


_27
{
_27
"Id": 70,
_27
"ProductId": 42,
_27
"IsActive": true,
_27
"Name": "Size 10",
_27
"RefId": "B096QW8Y8Z",
_27
"PackagedHeight": 15.0,
_27
"PackagedLength": 15.0,
_27
"PackagedWidth": 15.0,
_27
"PackagedWeightKg": 15.0,
_27
"Height": null,
_27
"Length": null,
_27
"Width": null,
_27
"WeightKg": null,
_27
"CubicWeight": 0.0,
_27
"IsKit": false,
_27
"CreationDate": "2020-01-25T15:51:00",
_27
"RewardValue": null,
_27
"EstimatedDateArrival": null,
_27
"ManufacturerCode": null,
_27
"CommercialConditionId": 1,
_27
"MeasurementUnit": "un",
_27
"UnitMultiplier": 1.0,
_27
"ModalType": null,
_27
"KitItensSellApart": false,
_27
"Videos": []
_27
}

Response body example


_27
{
_27
"Id": 70,
_27
"ProductId": 42,
_27
"IsActive": true,
_27
"Name": "Size 10",
_27
"RefId": "B096QW8Y8Z",
_27
"PackagedHeight": 15.0,
_27
"PackagedLength": 15.0,
_27
"PackagedWidth": 15.0,
_27
"PackagedWeightKg": 15.0,
_27
"Height": null,
_27
"Length": null,
_27
"Width": null,
_27
"WeightKg": null,
_27
"CubicWeight": 0.0,
_27
"IsKit": false,
_27
"CreationDate": "2020-01-25T15:51:00",
_27
"RewardValue": null,
_27
"EstimatedDateArrival": null,
_27
"ManufacturerCode": null,
_27
"CommercialConditionId": 1,
_27
"MeasurementUnit": "un",
_27
"UnitMultiplier": 1.0,
_27
"ModalType": null,
_27
"KitItensSellApart": false,
_27
"Videos": []
_27
}

Activating an SKU

Before you can activate an SKU, it must meet the following requirements:

  • The SKU must have at least one of the following alternate IDs configured: RefId or EAN.
  • The SKU must have at least one image associated. To associate an image to an SKU, use the Create SKU file endpoint.
  • If the SKU has specifications, they must be filled in.
  • If the field ActivateIfPossible is false, the SKU must be activated manually. For more information, check the Manual activation section.
  • If the SKU is a kit, it must have at least one component active.
  • The SKU must be associated with an active product, which, in turn, must be associated with an active Brand and an active Category.

Once the SKU complies with all the aspects listed above, there are two ways that you can activate your SKU - manually or automatically. Read the following sections for more details.

Note that additional configurations are necessary for a product and its SKUs to become visible in a store:

  • Having registered a price for the SKU in the associated trade policy (also known as sales channel). Read the Pricing onboarding guide for more information on this process.
  • Having at least one unit in stock. Read the Fulfillment onboarding guide for more information on managing inventory.
  • Configuring your storefront's CMS to display products correctly, as described in this Frequently Asked Question.

Manual activation

To manually activate your SKU, follow these steps:

  1. Create the SKU, setting IsActive as false and ActivateIfPossible as false.
  2. If the SKU is a kit, create and associate SKU components.
  3. Create and associate SKU files.
  4. Update the SKU as active, setting IsActive as true.

Now the SKU should be active in your store.

Automatic activation

This configuration will automatically update the SKU as active once it is associated with an image or an active component. You do not need to update the SKU as in the previous steps.

To automatically activate your SKU, follow these steps:

  1. Create the SKU, setting IsActive as false and ActivateIfPossible as true.
  2. If the SKU is a kit, create and associate SKU components.
  3. Create and associate SKU files.

Now the SKU should be active in your store.

Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 3 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 3 contributors
On this page