For the CATALOG request:- curl -X POST --data ‘{“cursor”:null,“object_types”:[“DISCOUNT”],“begin_time”:“1970-01-01T00:00:00Z”,“include_deleted_objects”:true}’ -H ‘Accept: application/json’ -H ‘Accept: application/json’ -H ‘Authorization: Bearer ***’ -H ‘Content-Type: application/json’ -A ‘Jersey/2.31’ ‘https://connect.squareup.com/v2/catalog/search’
For different object_types here we are encountering data discrepancy issues. The actual number of records present is different from the number of records we get by making API call. We have also set include_deleted_objects to true, but still records we get via get request are less than actual amount of records
Can you please look into this?
Do you have the IDs of the catalog object records that aren’t showing in the request?
Yes. Please find the below attached files containing catalog_object_ids for catalog_object.type = item_variation. We have missing ids for other types of objects as well but this image contains only
some item_variation ids.
@Bryan-Square Any further update on why these ids are missing in API response?
@pm_fivetran Do you have the list in a .txt format and whats your application Id?
Great, thanks! What’s your application Id?
@Bryan-Square Application_id:- sq0idp-lE4I6dGUmPppWnTODw7jZw
@Bryan-Square Any update about data discrepancy?
@pm_fivetran I haven’t been able to replicate this. Every object I try I’ve been getting the deleted object in the API response. I see that you are using SearchCatalog but when I had to spot check your list I used BatchRetrieveCatalogObjects
with "include_deleted_objects" : "true"
. For example:
{
"object_ids": [
"FVHDT7KSMP7BBSLDLF6UU6LR"
],
"include_deleted_objects": true
}
@Bryan-Square I check this we are not able to fetch above object via SearchCatalogAPI even if we include_deleted_objects, but it can be fetched via BatchRetrieveCatalogObjects API. In our use-case we cannot use BatchRetrieveCatalogObjects API as we dont have ids beforehand, we can only use Search.
Can u please tell what is the bug with SearchCatalog Api?
@pm_fivetran There is an issue that the team is working to fix where if the object_type
isn’t included it won’t return the correct results. I’ve spot checked quite a few of the IDs you provided and they were all returned with SearchCatalogObjects
. I was using:
{
"include_deleted_objects": true,
"object_types": [
"ITEM",
"ITEM_VARIATION"
],
"begin_time": "2009-02-08T00:22:13.226Z"
}
Thanks, @Bryan-Square When I was trying the same request with begin_time:1970-01-01 by including all the object_types I couldn’t see object_id: FVHDT7KSMP7BBSLDLF6UU6LR in response, can u see what issue might be here?
@Bryan-Square What might be the issue there that records are present when we pass begin_time=2009-02-08T00:22:13.226Z but it is not sending records when begin_time=1970-01-01T00:00:00:000Z ?
Were still looking into why 1970-01-01T00:00:00:000Z isn’t working however Square was founded in 2009 so there will never be any records prior to 2009.
@Bryan-Square following-up to see if there is any update on this
however Square was founded in 2009 so there will never be any records prior to 2009.
what if our users have migrated to square, so they might have some records before 2009
The customers that migrated to Square that had records prior to 2009 will still never have any records within Square that predate 2009. All items would have had to be migrated to Square with a created_at
date that is 2009 to now.