Skip to content

Repository files navigation

expedy-sdk-node

npm version license: MIT types: TypeScript

Official Node.js SDK + API documentation for the Expedy Print API v2. Send print jobs to Expedy cloud thermal receipt printers and to Raspberry Pi gateways driving third-party USB printers (labels, inkjet, laser, photo). Alternative to Google Cloud Print.

  • Printers (printers) — Expedy cloud thermal receipt printers (product page).
  • Devices (devices) — Expedy Raspberry Pi gateways (product page) driving USB printers.

displays and medias are out of scope for this repository — they will be documented separately.

Install

npm install expedy-sdk-node

Requires Node.js ≥ 18.

Quickstart

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 } = await client.printers.createPrintJob(
  process.env.EXPEDY_PRINTER_UID!,
  {
    printer_msg: "<C><BOLD>Hello, Expedy!</BOLD></C><BR><BR><CUT/>",
    origin: "quickstart",
  },
);

console.log(`Queued job ${request_uid}`);

Full walkthrough: docs/getting-started/quickstart.md.

Documentation

The complete reference lives under docs/. Key entry points:

SDK surface

client.printers.list();
client.printers.createPrintJob(printerUid, { printer_msg, origin? });

client.devices.list();
client.devices.get(deviceUid);

client.devices.system.ping(deviceUid);
client.devices.system.update(deviceUid);
client.devices.system.reboot(deviceUid);
client.devices.system.shutdown(deviceUid);

client.devices.usb.getConfiguration(deviceUid);
client.devices.usb.scan(deviceUid);
client.devices.usb.readScan(deviceUid);
client.devices.usb.createPrintJob(deviceUid, usbPort, { usb_msg, notification_url?, origin? });

client.devices.wifi.getConfiguration(deviceUid);
client.devices.wifi.addSsid(deviceUid, { wifi_ssid, wifi_psk });
client.devices.wifi.deleteSsid(deviceUid, wifiId);
client.devices.wifi.applyUpdate(deviceUid);

Runnable examples live under examples/.

Compatibility

The Expedy tag language targets Expedy cloud thermal printers and ESC/POS-compatible printers. Other brands may be compatible through the Raspberry Pi gateway — the supported list will be completed over time. See docs/concepts/compatibility.md.

Supply chain

Releases are published from GitHub Actions with npm provenance — a signed attestation linking each version to its source commit and build. Verify it with:

npm audit signatures

License

MIT

About

Cloud Print API SDK for Node.js – Send print jobs to remote printers (receipts, tickets) via Expedy API. Alternative to Google Cloud Print.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages