Product format: unknown stock is now null

When a product page says a variant is in stock or sold out, availability.inStock is true or false as before. When the page doesn't say, inStock is now null instead of a default value, so you can tell confirmed stock from unknown stock.

Product format: unknown stock is now null

What you can do

  • Handle unknown stock on your terms. Treat null as unknown, not sold out, and decide whether to recheck, hide or show the variant.
  • Match products across stores. Each variant now carries gtin, mpn and condition when the page publishes them.
  • Keep existing code working. Older SDK versions keep receiving true or false for unknown stock, as they did before. Upgrade to get null: Python 4.59.0, JavaScript 4.57.0, Java 1.19.0, Go 1.17.0, Rust 2.22.0, Ruby 1.18.0, PHP 1.17.0 or .NET 1.16.0. Other requests, such as raw HTTP calls, receive null now. A tool built on one of these SDKs follows that SDK's version.

Read the product format documentation.

//
Get started
//
Ready to build?
Start getting web context for free and scale seamlessly as your project expands. No credit card needed.
Are you an AI agent? See setup options