question

rbokajr avatar image
rbokajr asked rbokajr commented

Trigger Printing from the Orders REST API

Hi,

Is it possible to trigger a receipt to print to the Kitchen printer when an order is set through the Orders REST API? If not, is there a way to set the tablet to listen for an event (like receiving a new order from the REST API) so that when an order is put through (online), it is printed to the kitchen?

Thanks, Rob

Print
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

Mark R avatar image
Mark R answered rbokajr commented

Try listening for a web hook event and call the fire event on your android app for that order. Web hook event will have the clover order id and app id, so you can differentiate which order was created from your web REST API calls. Once you get the order id, initiate a order fire call from your android app

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

rbokajr avatar image rbokajr commented ·

Would this be done through an android app? I've been working on the web side of things.

0 Likes 0 ·
Mark R avatar image Mark R commented ·

Yes, receipt connectors are available only on SDK. I have not seen anything on clover web api to do so. So you will need to have an android app to initiate order fire call. -- I edited my previous response to make it more clear to understand.

0 Likes 0 ·
rbokajr avatar image rbokajr commented ·

Is it possible to just write a non-UI based android app to handle this? This is really for an internal tool that I don't mean to distribute outside of our own store.

0 Likes 0 ·
Mark R avatar image Mark R commented ·

Removing the activity with the android.intent.category.LAUNCHER from android manifest file should do it. Implementing a background application strongly depends on what you want to do. I was able to do test app like that on clover dev kit. But haven't tried uploading such an app to clover app market.

0 Likes 0 ·
rbokajr avatar image rbokajr commented ·

Thanks. I guess I could build a simple UI to just pull orders from clover that are from my website. Thanks for the guidance. I haven't written much in Android in a couple years so hopefully I can figure this out!

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community