Create a Print Job

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

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"}'

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