Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Event API to get destroyed products/collections return items that are not actually deleted

Event API to get destroyed products/collections return items that are not actually deleted

howard-boost
Shopify Partner
18 0 4

Recently we got into an issue that happening intermittently: Our requests to Shopify Event API to get destroyed products & collections sometimes return items that are not actually deleted. This issue is quite serious because it cause missing products in our customer website. It doesn't happen for all store, but everyday we have customers report similar issue.

Replies 2 (2)

Luke_K
Shopify Staff
402 66 102

Hey @howard-boost 

 

Thanks for raising this! Please could you share the full API request that is made to the Events API, together with an x-request-id from the call? That will allow us to take a look in the logs. Thanks!

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
howard-boost
Shopify Partner
18 0 4

@Luke_KThanks for your reply

 

Unfortunately, I can only give you the API endpoint and params we used for the requests. We are using the official npm package `shopify-api-node` and it does not return the response headers for 2xx responses.

 

 

Shop: boost-pfs-horizontal.myshopify.com
Endpoint: /admin/api/2021-10/events.json
Params:
{
  "limit": 50, 
  "created_at_min": "2021-11-17T22:38:46.925Z", 
  "filter": "Product", 
  "verb": "destroy"
}
Request time: around "2021-11-17 22:50 UTC"

 

At the time the above request was sent, shopify returned all data & all verbs, seems like the filter & verb params didn't work at all. Even more mysterious, we cannot reproduce it, when we retry the request manually, it return correctly.

 

We already implemented a work around: double check by calling resource API to confirm the resource was correctly deleted. This way we can also know that how often the issue occurred. The weird thing is that before posting this ticket, the issue happened a few times per day, everyday for random stores. But it stopped happening since last Friday.