Create a Print Job

POST https://www.expedy.fr/api/v2/printers/{printer_uid}/print

Sends a print job to the designated cloud thermal printer.

Base URL: https://www.expedy.fr/api/v2


Authentication

This endpoint requires an Authorization header containing your SID and TOKEN, separated by a single colon.

Authorization: <SID>:<TOKEN>

⚠️ This is not a Bearer token. Do not add a Bearer or Basic prefix — send the raw SID:TOKEN value.

Authorization: 9F3K7Q2WZ1ABCDEF:b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6

Both values are available in the Expedy console under API. Requests with a missing or invalid SID:TOKEN are rejected and return an error envelope (see Errors).

All requests must be made over HTTPS (TLS).


Path parameters

Parameter Type Required Description
printer_uid string Yes UID of the target printer, found in the console under Printers (e.g. WP0RGS1SEDZ). Do not include the # symbol. Use GET /printers/all to retrieve it programmatically.

Request body

Content-Type: application/json

Parameter Type Required Description
printer_msg string Yes The content to print, built with the receipt layout tags (<C>, <BOLD>, <IMG>, <QR>, <CUT/>, …). Plain text, QR codes, images, or a PDF URL — anything supported by the printer.
origin string No A free-form label to tag the source of the job (a URI, an app name, a department…). Useful for filtering and debugging in your logs.
printer_han string No The script to compose the receipt in: cn Chinese, kr Korean, jp Japanese. Omit it for Latin scripts. See Asian characters.

Request example:

{
  "printer_msg": "<C><BOLD>ORDER #1234</BOLD></C>\n<C>Table 7</C>\n--------------------------------\n1 x Burger\n2 x Fries\n<CUT/>",
  "origin": "pos-kitchen-01"
}

cURL example:

curl -X POST "https://www.expedy.fr/api/v2/printers/WP0RGS1SEDZ/print" \
  -H "Authorization: <SID>:<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"printer_msg":"<C><BOLD>Hello</BOLD></C><CUT/>","origin":"my-app"}'

Asian characters

Chinese, Japanese and Korean need printer_han, set to the script you are printing.

Value Script
cn Chinese
kr Korean
jp Japanese

1 is still accepted as a synonym of cn.

By default the receipt is composed in single-byte mode: each character is mapped through one of the printer's code pages. No single-byte code page contains Hanzi, Kana or Hangul, so without this parameter every such character is replaced with a ? before the job even reaches the device.

{
  "printer_msg": "<C><BOLD>주문 #1234</BOLD></C>\n<CUT/>",
  "printer_han": "kr"
}

The value has to match the script. Each one selects a different encoding and they do not overlap: Korean sent as cn comes out as ?, exactly as if the parameter had been left out.

The printer has to carry the matching font. printer_han switches the data stream to multi-byte mode; the glyphs themselves come from the printer's font ROM. A model shipped without that font will not print the characters even with the right value, and a printer sold for the Chinese market carries Hanzi, which does not mean it carries Hangul or Kana. Test the exact script you need on the exact model you deploy, and contact support if the result isn't readable.

Latin text does not need it. Leave printer_han out for European languages; accented characters are handled in the default mode.

Send your content as UTF-8 in every mode. The API stores and returns exactly what it receives, so the print history in the console shows the text as it arrived, which is the quickest way to tell a data problem from a printer one.


Response 200 OK

The job was accepted and queued by the Expedy Cloud Print Server.

ℹ️ A 200 confirms server-side reception only — not that the ticket was physically printed. Printing is asynchronous: the server hands the job to the device when it next connects. A 200 does not guarantee paper output, because the printer may be offline, out of paper, powered off, or unreachable on its network/SIM at that moment. Use the returned request_uid to reference the job in your own logs and support requests.

Parameter Type Description
request_uid string Unique identifier of the accepted print job (e.g. 1X5ERXL94BYVWHP92DK3MCASUGJ).

Response example:

{
  "request_uid": "1X5ERXL94BYVWHP92DK3MCASUGJ"
}

Errors

Any non-2xx status returns a JSON envelope with a message field describing the problem:

{
  "message": "Invalid printer"
}
Status Meaning
401 / 403 Missing or invalid credentials (SID / TOKEN).
422 The request could not be processed — e.g. an unknown printer_uid or a malformed body.

Always read the message field rather than relying on the status code alone.


Good practices

  • Idempotency. Every accepted request produces a print. The endpoint does not de-duplicate, so if you retry after a network error, guard against double printing on your side (e.g. track the request_uid, or flag the order as printed once a 200 is received).
  • Test with and without images. Some printer models reject certain image types and may fail the whole job — validate before production.
  • Keep printer_msg within the paper width. 32 characters per line at 58 mm, 48 at 80 mm. See the layout reference.

List printers

To discover the printer_uid values on your account:

GET https://www.expedy.fr/api/v2/printers/all

Returns the printers attached to your account (name, paper width, UID, status), using the same Authorization: <SID>:<TOKEN> header.


SDK & examples

Prefer a ready-made client? Use the official Node.js SDK — it wraps authentication, printer listing and print jobs:

👉 github.com/ExpedyDev/expedy-sdk-node