question

richa avatar image
richa asked David Marginian commented

to get total number of orders

Is there a way to get total count of orders by using any api?As I need to fetch all orders of last 3 years of any user.

Orders
10 |2000 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered David Marginian commented

No, and I would strongly recommend against retrieving 3 years worth of order data. This could be literally hundreds of thousands or orders and you would need to get them 1000 at a time - https://docs.clover.com/docs/paginating-elements.

12 comments
10 |2000 characters needed characters left characters exceeded

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

but can I get total count for orders of past 3 years so that I can fetch all based on total count

0 Likes 0 ·

No, you cannot. You woud need to start making requests filtering on date range and using the pagination link I provided you to get the next 1000, etc. As I said earlier, I strongly recommend that you do not do this, it seems like an abuse of the API in my opinion.

0 Likes 0 ·
richa avatar image richa David Marginian ♦♦ ·

I need all orders data to show sales history of past year,year to date for all products.Is there any other way(API) I can fetch all orders data to show sales history ?

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