question

richa avatar image
richa asked David Marginian Deactivated 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

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

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated 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

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

richa avatar image richa commented ·

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 ·
David Marginian avatar image David Marginian ♦♦ richa commented ·

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 ♦♦ commented ·

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