question

jonbloom avatar image
jonbloom asked bryanvargas answered

Deleted Items Present in Order API

I'm working on some external reporting and I've run into a rare scenario -- I am attempting to generate a merge of orders with inventory items, so that I can look at an order object and see all of the line items's full item representation. Currently i'm querying through all pages of inventory, then pulling from that data structure when iterating over orders. I've run into a situation where an inventory item was deleted (and subsequently recreated) after it was included in an order. It shows in the lineItems of the order, but since it's deleted, it's not included in the inventory listing response, nor can I query for it directly in the API. I see there's a search parameter for deleted, but the documentation does not specify what value to include to query for deleted items.

OrdersREST APIInventory
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
bryanvargas avatar image
bryanvargas answered

You have to specify a time window in the query params, here is an example:

{ {baseUrl}}/v3/merchants/{ {merchantId}}/voided_line_items?filter=deleteType=ALL&filter=deletedTime>1677646800000&filter=deletedTime<1681832074354

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community