Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
News
Announcements
Change to the availableQuantity field in the search API
Photo of the author
julia-rabello
Published on 9/18/2024
Last update on 9/19/2024

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
Suggest edits (Github)
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedbackSite Map