question

kevinmonpara avatar image
kevinmonpara asked David Marginian Deactivated commented

How to get most recent order using API for my web app?

I'm trying to get the last order created or modified using the API. How can I do this? In addition, on the orders that have just been updated (say to add another line item), how can I see what has been changed from the original order?
REST API
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

·
Lee Tickett avatar image
Lee Tickett answered David Marginian Deactivated commented
https://apisandbox.dev.clover.com/v3/merchants/1VG...

The default ordering is createdTime in descing order. You can change to modifiedTime for example by appending; &orderBy=modifiedTime

I don't believe Clover record any audit data (or give access to anyway). But each lineItem has a createdTime so you can always use that?
4 comments
10 |2000

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

kevinmonpara avatar image kevinmonpara commented ·

Is it possible to use webhooks to keep track of new / updated orders, and then just pull those orders?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ kevinmonpara commented ·

That would be possible but doesn't seem like a good approach.

0 Likes 0 ·
kevinmonpara avatar image kevinmonpara David Marginian ♦♦ commented ·

Why wouldn't the webhook solutions be better? Without webhooks, wouldn't you have to continuously poll to find the most recent orders?

0 Likes 0 ·
Show more comments

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