I’d like to identify any items in our item library that have no associated location. Since the dashboard does not appear to support that search, I’ve started playing with the developer API. I can find items with a location ID, but I don’t see any way to find items with no location ID. Is this doable? If so, what’s the query?
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
Locations API
Square Developer
Build and Manage a Simple Inventory
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.
Yes, it is possible to find items with no associated location using the Catalog API. You can use the ListCatalog
endpoint to retrieve all items in your catalog. This will return a list of all catalog objects, including items and item variations.
Each item variation object has a present_at_all_locations
field. If this field is set to false
, it means the item variation is not present at all locations. In this case, you can check the present_at_location_ids
field to see the specific locations where the item variation is present. If this field is empty, it means the item variation is not associated with any location.
Please note that the present_at_all_locations
and present_at_location_ids
fields are only available for item variation objects, not for item objects. This is because in Square’s system, inventory is tracked at the item variation level, not at the item level. Therefore, you need to check these fields for each item variation under an item.
This answer was reviewed by @Bryan-Square.
This will get me what I need. Thank you!