stockkeepingunit catalog API allows invalid commercial condition values
ID: 769053
No Fix
Published on 3/10/2023
•
Last update on 7/1/2024
Summary
Currently, the stockkeepingunit API https://catalog.vtexcommercestable.com.br/api/catalog/pvt/stockkeepingunit/\{skuid\} does not perform any checks for the field "CommercialConditionId".
This allows the user to input invalid data, such as an Id that doesn't exist on a given store and then, when trying to access this sku's form, an error is thrown.
Simulation
On the payload of the insert SKU API https://developers.vtex.com/docs/api-reference/catalog-api#post-/api/catalog/pvt/stockkeepingunit, use a commercialcondition id that isn't present on the store.
Then, access this created sku's UI and you should face an error message.
Workaround
n/a