Hi there,
I have a catalog item named (AUTOMATIONTEST) with variation id = 4B55VLXMVHHUBE2LRXY7OKKD that currently has 0 stock. I was able to locate its 0 quantity IN_STOCK using the retrieve_inventory_count endpoint, response shown below:
{
"counts": [
{
"catalog_object_id": "4B55VLXMVHHUBE2LRXY7OKKD",
"catalog_object_type": "ITEM_VARIATION",
"state": "IN_STOCK",
"location_id": "LB5F8WYCHXM5V",
"quantity": "0",
"calculated_at": "2022-07-11T18:42:41.03Z"
}
]
}
However, when I tried to locate it from the search-catalog-items endpoint with “stock_levels”: [“OUT”] filter on, I was not able to locate it somehow?!
Here is the request I had:
curl https://connect.squareup.com/v2/catalog/search-catalog-items \
-X POST \
-H 'Square-Version: 2022-06-16' \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"enabled_location_ids": [
"LB5F8WYCHXM5V"
],
"product_types": [
"REGULAR"
],
"text_filter": "(AUTOMATIONTEST)",
"stock_levels": [
"OUT"
]
}'
And here is the response I got:
{
"cursor": ""
}
Is this a bug on Square’s end? Or is there something I am not doing correctly here? Correct me if I am wrong. Thanks for helping!