Get GPRS Printers Queue

API Endpoint uses to obtain the last order made in the business to print.

The printers functionality explained:

Prerequisites

  1. A business must have enabled the "Accept GPRS printer" option and a printer model selected.
2084
  1. The GPRS printers basically fetch new orders from the URL that is set up in the printer. You can change the URL and configure correctly on your GPRS printer, the link that must be added to GET new orders is https://apiv4.ordering.co/v{version}/{language}/{project}/business/{business_id}/queue and the link that must be added to accept or reject the orders is https://apiv4.ordering.co/v{version}/{language}/{project}/business/{business_id}/queue/confirm, this URL allows to confirm the order, reject the order and even add printer comments, like for example estimated delivery time in minutes.

Steps for an order to be printed and confirmed or rejected

Step 1: Whenever an order is placed to that business if the business has enabled a GPRS printer, then, the order will be registered on the database with the to_print = true option and adds the order to queue.

Step 2: The GPRS printer reads the queue and detects a new order, the printer will normally start beeping to notify about the new order. If there are many orders placed and not printed, then they are placed in a queue, the printer would start printing the order that was placed first.

1888

An order for the printer looks like this.

Step 3: The GPRS printer can accept or reject the order. After the order is accepted or rejected, then on the database it changes the value to_print to false. And that will help identify the next order with the to_print = true and continue with the queue.

The parameters required are:
o: Order ID
ak: Text status description Ex. Rejected
And the comment is optional.
m: Comment.

Accept order example
If the parameter ak is set as "Confirm" then the order status will change to status 5 (Accepted by business).
The accept URL would be similar to this one https://apiv4.ordering.co/v400/en/demo/business/41/queue/confirm?ak=Confirm&o=7

Reject order example
If the ak parameter is set as "Rejected" the order status will change to 7 (Rejected by business).
The reject URL would be similar to this one
https://apiv4.ordering.co/v400/en/demo/business/41/queue/confirm?ak=Rejected&o=9

1768

📘

Only Users level 0 (Type: administrator) and level 2 (Type: business owner) can make this request.

Language
Credentials
Header
Click Try It! to start a request and see the response here!