Queue a ticket on an Expedy cloud thermal receipt printer. This is the most-used endpoint of the API.
POST https://www.expedy.fr/api/v2/printers/{printer_uid}/print
Requires an Authorization header — see Authentication.
| Name | Type | Required | Description |
|---|---|---|---|
printer_uid |
string | yes | Unique ID of the target printer. Obtain it from GET /printers/all or the Expedy console. |
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
printer_msg |
string | yes | The ticket content. Plain UTF-8 text mixed with XML-like tags that drive layout, actions and printer parameters. See how to build a ticket. |
origin |
string | no | Free-form identifier echoed in the Expedy console — useful to trace which system / feature / order emitted the job (e.g. "pos/checkout", "kitchen/prep-slip"). |
printer_han |
string | no | Script used to compose the receipt: cn Chinese, kr Korean, jp Japanese (1 accepted as a synonym of cn). Omit for Latin scripts. Required for Chinese/Japanese/Korean text — without it every such character prints as ?. See Asian characters. |
printer_msg carries everything: text, line breaks, images, QR codes, cut, cash-drawer pulse, and even one-shot printer configuration (Wi-Fi, NTP, APN, keep-alive).
Full tag reference:
- Text layout tags —
<BR>,<BOLD>,<C>,<CB>,<L>,<W> - Images and logos —
<IMG> - QR code —
<QR> - EAN-13 barcode —
<EAN> - PDF —
<PDF> - Open cash drawer —
<PULSE/> - Autocut —
<CUT/> - Parameter tags: Wi-Fi, audible beep, NTP, APN, keep-alive
CJK characters need the printer_han field or they print as ? — see
Asian characters for the full explanation and examples.
await client.printers.createPrintJob(printerUid, {
printer_msg: "<C><BOLD>주문 #1234</BOLD></C><BR><CUT/>",
printer_han: "kr",
});A 200 confirms the job was accepted and queued — not that it printed. See
delivery and idempotency.
| Field | Type | Description |
|---|---|---|
request_uid |
string | Unique identifier for the queued print job. |
request_timestamp |
string | Unix timestamp (seconds) when the platform accepted the job. Returned by the API but not part of the documented response contract — treat it as optional. |
{
"request_uid": "2XVXPN95E7RHYFJZCGMK8DSB634",
"request_timestamp": "1776680582"
}curl -X POST "https://www.expedy.fr/api/v2/printers/XG9DMFPKB2C/print" \
-H "Authorization: $EXPEDY_API_SID:$EXPEDY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"printer_msg": "<C><BOLD>Order #4521</BOLD></C><BR>Coffee x1<BR>Croissant x2<BR><CUT/>",
"origin": "pos/checkout"
}'import { ExpedyClient } from "expedy-sdk-node";
const client = new ExpedyClient({
apiSid: process.env.EXPEDY_API_SID!,
apiToken: process.env.EXPEDY_API_TOKEN!,
});
const { request_uid, request_timestamp } = await client.printers.createPrintJob(
"XG9DMFPKB2C",
{
printer_msg:
"<C><BOLD>Order #4521</BOLD></C><BR>Coffee x1<BR>Croissant x2<BR><CUT/>",
origin: "pos/checkout",
},
);const response = await fetch(
`https://www.expedy.fr/api/v2/printers/${printerUid}/print`,
{
method: "POST",
headers: {
Authorization: `${process.env.EXPEDY_API_SID}:${process.env.EXPEDY_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ printer_msg: "<C>Hello</C><BR><CUT/>" }),
},
);- Printers vs. devices — when to use this endpoint instead of the USB variant.
- Asian characters —
printer_hanfor Chinese, Japanese and Korean. - Delivery and idempotency — what
200actually means, and how to avoid double prints. - Errors — status codes and the
ExpedyApiErrorshape. - Generic receipt sample — a full
printer_msgwith logo, text, QR and cut.