question

eingfilip avatar image
eingfilip asked kishoresukumaran answered

Webhooks for orders

We have an app as a kitchen display screen where we will show all orders from clover. We set up a webhook(https://docs.clover.com/docs/webhooks) for showing orders on our tablet as the kitchen display screen.. Hook gives only a list of Order IDS that are created/updated, how can we get full order(all order details) based on these ids(because we want to show them on the kitchen screen as new orders). For example, it might happen that waiters created 10 orders at the same time, webhook will trigger our endpoint with a list of order ids but in order to show those orders(item name, price...) we need to fetch those orders from Clover, how can we do that without firing 10/100/1000 requests is that possible to be done in a single request?

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.

chakerr avatar image
chakerr answered

Hello ,

I have no answer for you but I have a question ,

So I'm developing something similar to what you described , screen that shows orders in real time , however for me I have no problem fetching the order ID when I get it from the webhook , I'm just wondering about something , when a worker that creates orders using the clover device does it really trigger the api endpoint if not than how are you triggering it .

Thank you

10 |2000

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

kishoresukumaran avatar image
kishoresukumaran answered

Hi eingfilip,

The webhook is notifying you that a particular order with orderID xxxxx has been created or updated. When recieved this notification, you will have to query this orderID to get the detailed information on that order.

https://docs.clover.com/docs/webhooks

Webhooks allow your application to receive notifications when merchants who have installed your app perform certain actions. 


So, it is just the notification and to get more detail, you will have to query the orderID.

You can use the orders rest API to query the orderID and send the details to the Kitchen display:

https://docs.clover.com/docs/printing-orders-rest-api#will-online-orders-fire-to-my-kitchen-display-system-if-the-kds-is-configured-as-the-order-printer-for-the-default-firing-device

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