Is there a way to set an item in/out of stock via the API without changing the inventory number in Square for it to 0? My app tracks inventory separately from Square, and I don’t want to have to sync inventory numbers in Square, especially if Square is also going to try to manage those numbers separately. (My use case is a latte - there are a lot of ingredients in each latte, but if the seller runs out of milk, lattes can’t be sold anymore. But when they get more milk, lattes are back on the menu. It’d be nearly impossible to manage that inventory in Square, since drinks like this aren’t like, say, t-shirts. The same logic would apply to nearly everything in a restaurant.
What’s my best option for managing this programmatically?
Thanks!
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Inventory API Requirements
Inventory API Process Flow
Enable Stock Conversion
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
You can manage this by using the Catalog API to set the is_sold_out field of the CatalogItemVariation object. This field indicates whether the item variation is currently sold out. If you set is_sold_out to true, the item variation will be marked as sold out and won’t be available for sale. When you have more milk and lattes are back on the menu, you can set is_sold_out to false to make the item variation available for sale again. This way, you can control the availability of the item variation without having to sync inventory numbers in Square.
This answer was reviewed by @Bryan-Square.
1 Like
Will this also work for individual modifiers?
Yes, it will work with modifiers as well. 
1 Like
I do not believe this information is accurate as I have not been able to get this to work for Item Variations or Modifiers. Per the docs, the sold_out field is part of the location_overrides field and it is read only. Therefore it cannot be set via API. I have linked the corresponding documentation for Modifiers, but the similar is true for Items and Item Variations.
https://developer.squareup.com/reference/square/objects/CatalogModifier
If the information in your docs is not correct, please point us to a working example of how to set out of stock for catalog objects via API calls.