question

zendeyo avatar image
zendeyo asked parquet76 edited

Order Details via Webhook

To avoid the rate limit issues we are using webhooks to retreive orders. However, we can't seem to retrieve order details (item, count, category, modifiers, note, custom info). Is there a method to do this outside of an api call?

Webhooks
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered

No, there is not. The webhook tells you that something has changed, but you need to obtain the details. If you want to reduce API calls you can queue up the ids and make a call every N seconds with just the ids that have changed - https://docs.clover.com/docs/using-filters-to-retrieve-multiple-results-from-an-endpoint.

10 |2000

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

zendeyo avatar image
zendeyo answered

Always appreciate your help and feedback... Unfortunately, we only had 1 point to share :)

10 |2000

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

zendeyo avatar image
zendeyo answered David Marginian Deactivated commented

One follow up question:

if we send multiple Ids in filter parameter, would it effect our API usage limit . Let's say we send 10 Ids, in filter parameter to retrieve details of 10 orders. Will it be consider 1 API call or 10 API calls?

1 comment
10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·
1 API call.
1 Like 1 ·
zendeyo avatar image
zendeyo answered cloveruser808 commented

"Clover recommends retrieving no more than 100 items per query to avoid hitting limits and performance issues". What does "hitting limits" mean? Are there other limits that exist?


In essence the thought is that if we are retrieving 100 items per query, at some point there will be a max amount of clients that can be supported. 50 api calls per second with 100 items each, that's 5,000 items per second max. Once you have X amount of clients retrieving 5,000 items per second, you will probably hit a limit of 50,000 items per second. Anything beyond that would probably upset the merchant that they have to wait beyond 10 seconds for an order to display.

If there is a possible work around, would love to have your advice.

2 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.

David Marginian avatar image David Marginian ♦♦ commented ·

I am not sure what the hard limit is (I would have to check), I am guessing it is around 1000 and that may work fine. But, on our end we are doing an IN and the statement ends up being very long and at some point I am guessing there could be problems. Yes, you can run into rate limit issues and when you do you can contact developer relations. If you are using the API correctly and efficiently and just have a lot of installs we can bump the limits.

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

"If you are using the API correctly and efficiently and just have a lot of installs we can bump the limits."

You should advertise this somewhere, like here: https://docs.clover.com/docs/api-usage-rate-limits

0 Likes 0 ·
zendeyo avatar image
zendeyo answered

sorry I meant 50,000 items in 10 seconds. With each request pulling 5,000 items.


10 |2000

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

cmacha2 avatar image
cmacha2 answered parquet76 edited

Hello,

I am trying to retrieve detailed information about each order, but I'm only receiving the order ID in the webhook payload. How can I access the detailed data such as the customer who made the purchase, the products involved, etc.?

Currently, I'm receiving the orderId from the payment.created webhook event. Here is my current workflow:

  1. I receive a notification from the payment.created webhook.
  2. I extract the orderId from the payment object.

However, I'm not sure how to use this orderId to fetch the detailed information I need, such as the customer details and the list of products in the order.

Any guidance or examples on how to achieve this would be greatly appreciated.

Thank you for your help!

1 comment
10 |2000

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

parquet76 avatar image parquet76 commented ·

You use the rest API, read the documentation.

0 Likes 0 ·

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