Documentation
Feedback
Guides

Release Notes
Release Notes
Improved
Change to the availableQuantity field in the search API
September, 10

VTEX changed how the availableQuantity field works, which is returned by the API routes of the legacy search. This change may impact existing integrations.

Stores that use VTEX Intelligent Search are not affected.

What has changed?

The availableQuantity field no longer represents the exact number of available items in the store inventory. The field now returns an estimate based on order of magnitude. The possible values for availableQuantity are:

  • 0: 0 inventory quantity.
  • 1: inventory quantity of 1.
  • 10: inventory quantity between 2 and 10.
  • 100: inventory quantity between 11 and 100.
  • 99999: inventory quantity above 100.

This change affects all routes that return this field:

Why did we make this change?

Previously, it was possible to check the product quantity in a store inventory through the legacy API. However, since inventory is a sensitive piece of data and the API is public, we decided to hide it.

What needs to be done?

If your store has any integration that returns the availableQuantity field in any of the routes mentioned above, check the feature to take into account the new behavior.

Was this helpful?
Yes
No
On this page