Hi Square Team,
I believe I’ve encountered an unexpected behavior with the catalog/search API when using the include_deleted_objects=false parameter.
Here’s the scenario:
This behavior seems inconsistent, as include_deleted_objects=false should always exclude deleted items regardless of whether begin_time is set.
Could you confirm if this is the intended behavior or a potential bug?
If needed, I can provide my request payloads and sample responses for both cases.
Thanks for your help in clarifying this!
Best regards,
Murphy
1 Like
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
Catalog API Webhooks
Search for Items and Objects
Synchronize a Catalog with an External Platform
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.
1 Like
If you omit the include_deleted_object field what’s the result. The SearchCatalogObjects endpoint has this set to false by default. Normally you’d only include this field if you want to set it to true. 
Thanks for your reply, and I’d like to follow up with more details:
Whether I explicitly set include_deleted_objects=false or omit the include_deleted_objects parameter, when I add the begin_time parameter, the response still contains deleted catalog objects.
However, if I do not set the
begin_time parameter, the response does not include any deleted catalog objects.
Could you please confirm if this is the expected behavior or a potential bug?
I just checked with the team and they confirmed that this is the expected behavior with the endpoint. When a begin_time is included it will return any object that’s been updated including deleted objects. 
Thanks Bryan, and I have another question:
Surprisingly, in the Sandbox environment, whether I set include_deleted_objects to false or omit it entirely, when I add the begin_time parameter, the results do not include deleted catalogs.
Only when I explicitly set include_deleted_objects to true do the results include deleted catalogs.
This behavior is different from what I observed in the Production environment:
- In Production, when
begin_time is provided, deleted catalogs are still included in the results, even if include_deleted_objects is set to false.
- In Sandbox, deleted catalogs are excluded unless
include_deleted_objects is explicitly set to true.
Could you please confirm if this is an expected behavior difference between Sandbox and Production, or if it may be an inconsistency that needs to be addressed?
Hi Square Team.
If you have any updates, please feel free to let me know at any time.
Hi Square Team.
If you have any updates, please feel free to let me know at any time.
The team is still looking into this but the behavior you should be building to is production where if you include a begin_time deleted object will be returned. 
Thank you for your support.
May I ask if the Square team has recently modified the query logic related to begin_time?
I tested the Sandbox API again with begin_time when querying Catalogs, and I found that the results now include deleted catalogs, which is different from my previous tests.
Could you please help confirm if this change is expected?
Yes, the team has updated this to mirror production now. 