Documentation
Feedback
Guides

Release Notes
Release Notes
Fixed
Additional validation when creating and updating an SKU
November, 18

{"base64":"  ","img":{"width":97,"height":20,"type":"svg","mime":"image/svg+xml","wUnits":"px","hUnits":"px","length":933,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/additional-validation-when-creating-and-updating-an-sku-0.png"}}

Before, Catalog API did not apply the same validation rules seen in Admin, which had unintended side effects for our users when they attempted to activate an SKU they created or updated. Now we have corrected this behavior and the following restrictions apply.

  • post Create SKU SKU should never be created as active.

  • put Update SKU SKU should not be saved as active if:

  • It does not have files added and associated to it.

  • It is a kit and does not have components created and associated with it.

  • It is a kit and one of its components is not set as active.

From now on, if you violate these conditions when attempting to create or update an SKU, you will receive a 400 Bad Request error.

These constraints were created to guide developers into following the recommended SKU creation sequence:

  1. Create the SKU.
  2. If the SKU is a kit, create and associate SKU components.
  3. Create and associate SKU files.
  4. Update the SKU as active.
Was this helpful?
Yes
No
On this page