question

yangscalvin avatar image
yangscalvin asked yangscalvin commented

REST API for remote printing of orders, unable to print order numbers (serial numbers starting from 1)

I attempted to use the REST API to create an order without transferring the State and title, but the Clover device will not display this order.

Only by calling the print API will the device appear, but the printed order ticket will not display the order serial number.

Only by manually printing on the Clover device will the order serial number be displayed. I don't understand why.

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.

parquet76 avatar image
parquet76 answered

What API are you using? If you are using the v3/orders API (https://docs.clover.com/docs/creating-custom-orders) you need to set the state to open or the order will not be displayed on the device (https://docs.clover.com/docs/creating-custom-orders#set-order-state).

I would recommend that you use the Atomic order endpoints (https://docs.clover.com/docs/working-with-orders#atomic-order-requests), not the v3/orders 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.

yangscalvin avatar image
yangscalvin answered yangscalvin commented

Yes, I am using a custom Order Api(https://docs.clover.com/docs/creating-custom-orders). If I set the state to open, the order serial number will not be automatically generated when the order appears on the POS device.

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.

parquet76 avatar image parquet76 commented ·
Order serial number?
0 Likes 0 ·
yangscalvin avatar image yangscalvin parquet76 commented ·

The title on the top of the receipt ORDER: XXXX, it is automatically incremented from 1

0 Likes 0 ·
dalton85 avatar image
dalton85 answered yangscalvin commented

Here is a possible explanation for why this is happening:

  • Clover devices require the State and Title fields to display an order.
  • If these fields are not transferred, the device will not display the order.
  • The print API will force the device to display the order, but the order serial number will not appear.
  • The only way to get the order serial number to appear is to manually print the ticket from the Clover device.

In short, the State and Title fields are required for an order to be displayed on a Clover device. If these fields are not transferred, the device will not be able to find the order and will not display it. The only way to get the order serial number to appear on the printed order ticket is to manually print the ticket from the Clover device.

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.

yangscalvin avatar image yangscalvin commented ·

Quite right, the two are conflicting and I don't understand why this is the case

0 Likes 0 ·
yangscalvin avatar image yangscalvin commented ·

Now I'm in a dilemma, I want to print the order through the Api interface, but the printed ticket does not have the order number, do you have a better solution?

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