Reliability

Printing is physical infrastructure. We treat it that way.

Machines sleep, networks drop, and someone always unplugs the label printer to charge a phone. This page describes exactly how RocketPrint behaves when that happens — including the failures we cannot see.

Job states

A job is a record with an identity, not a fire-and-forget request.

Every job you create is persisted before we try to print it, so there is always something to query — even if every downstream thing fails.

pendingdispatchingsentprintingcompleted
pending
Validated and persisted. A job sits here when its station is offline — this is the queue.
dispatching
Atomically leased by a single dispatcher. This state exists so that two dispatchers can never hand the same job to an agent twice.
sent
Delivered over the open connection to the agent that owns the target printer.
printing
The agent handed the job to the operating system's print system, which accepted it.
completed
The print command succeeded. See the boundary below for what this does not cover.
failed
The job carries an error describing the cause. Failed jobs are never billed.
canceled
Canceled by you while still pending. Terminal states never transition back.

Transitions are one-way. A completed job cannot become printing again, and a failed job cannot become completed — enforced in the service, not by convention.

Offline queueing

A disconnected station is not a failed order.

This is the behavior that separates a print API from a print request. If the station is not there when you call, the job waits for it.

What happens when you POST to an offline printer

The request succeeds. The job is persisted as pending and your application carries on. There is nothing to retry and no error to handle.

When the agent reconnects and re-registers its printers, queued jobs dispatch automatically in the order they were created.

What this protects you from

  • A station rebooting for updates during a shift
  • A laptop lid closing at the pack bench
  • A brief loss of internet at one location
  • A warehouse machine that is simply slower to wake than your order webhook

What it does not protect you from is a station that has been off for hours — that becomes a flood of stale labels on reconnect. Cancel what you do not want first.

Idempotency

A retried request never becomes a second label.

Duplicate prints are the most expensive failure mode in fulfillment — two labels on one box is a mis-ship. Idempotency is enforced twice, in two different places.

bash — the same request, twice
$ curl -X POST https://rocketprint.io/api/v1/print-jobs \
    -H "X-API-Key: $ROCKETPRINT_KEY" \
    -H "Idempotency-Key: order-1042-label" \
    -H "Content-Type: application/json" \
    -d '{"printerId":"prn_x1","contentType":"raw_base64","content":"XlhBLi4uXlha"}'

HTTP/1.1 201 Created
{ "id": "job_abc123", "status": "sent" }

# your worker times out and retries the identical request
HTTP/1.1 200 OK
Idempotency-Replayed: true
{ "id": "job_abc123", "status": "printing" }   # the same job — nothing printed twice

Server-side

An Idempotency-Key is scoped to your organization and API key. An identical retry returns the original job with 200 and Idempotency-Replayed: true. A different payload under a key you already used is rejected with 409 rather than silently printing something new.

Send the header on every create. It costs nothing when it is not needed.

Agent-side

The agent keeps its own ledger of jobs it has claimed and finished, and that ledger survives a restart. If the same job arrives again — after a reconnect, a crash, or a redelivery — the agent replays its recorded outcome instead of printing again.

This is the layer that protects you when the failure is in the middle of the system rather than in your worker.

Limits and back-pressure

Predictable behavior under load.

Rate limits

300 requests per minute per API key, with a burst allowance of 30. Over the limit you get 429 and a Retry-After header telling you when to come back — not a dropped request.

Payload size

Content is capped at 10 MiB, and the request body at 14 MiB. Oversized requests return 413 immediately rather than failing halfway through a print.

Ordering

Jobs dispatch to a station in creation order. Two jobs sent to the same printer within milliseconds print in the order the API accepted them.

Listing and pagination

GET /v1/print-jobs returns newest-first with a default of 50 and a maximum of 200 per request, filterable by status and printer.

Blind spots

What we cannot see, stated plainly.

Every print system has these. Most vendors do not write them down.

Paper, ribbon, and jams

The print command succeeds before the media runs out. completed cannot tell you that the last label came out blank.

Print quality

A dirty printhead produces an unscannable barcode and a perfectly successful job. Only a scanner downstream will catch it.

Someone taking the label

We can tell you a label printed. We cannot tell you it made it onto the right box.

Driver-side surprises

For PDF and text, the station's own driver decides scaling and margins. Raw content avoids this entirely — which is why we recommend it for labels.

See which formats avoid driver behavior →

Questions

Operational questions.

What happens to a job if the station goes offline mid-print?

The job stays in its last known state until the agent reconnects and reports the outcome. On reconnect the agent consults its local ledger: a job it already completed is reported as completed rather than printed again.

Do queued jobs expire?

Queued jobs persist until they are dispatched or canceled. If a station is down for a day, a day of jobs will print when it comes back — which is usually not what you want for time-sensitive labels. Cancel what is stale before bringing a long-offline station back online.

Can I cancel a job?

Yes, while it is still pending. Once a job has been dispatched to an agent it is no longer cancelable and the request returns a conflict.

What does a failure look like?

The job moves to failed and carries an error string describing what happened — the queue rejected it, the printer was unreachable, the format was not supported by that device. The job stays queryable so you can build alerting on it.

Is there a webhook when a job finishes?

Not yet. Job status is polled today, either directly or with the Node SDK's waitFor helper. Webhooks are on the roadmap; we will announce them on the changelog when they ship.

Build against the real contract

The failure modes are documented because you will hit them.

Every state, header, and limit on this page is in the API reference too.