/api/v1/businesses/:businessId/print/tills
auth: jwt (administrator)List every registered till for the business — name, machine id, `IsDefault`, `IsOnline`, `LastSeenAt`, and optional `LocationId`.
handlers: PrintController.listTills
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. `requireBusinessAccess` enforces this matches the JWT. |
APIResponseDataList<TillDTO>/api/v1/businesses/:businessId/print/tills/:tillId/name
auth: jwt (administrator)Rename a till. Fires `TILL_RENAMED` audit (resource type `TILL`).
handlers: PrintController.renameTill
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId pathuuid | yes | — | Target till UUID. |
tillName bodystring | yes | — | New display name (1–500 chars). |
APIResponseDataObject<TillDTO>APIError/api/v1/businesses/:businessId/print/tills/:tillId/test
auth: jwt (administrator)Dispatch a test PrintJob (`type='TEST'`) to the till. The agent picks it up on its next poll or via the SSE wake stream. Fires `TEST_PRINT_SENT` audit.
handlers: PrintController.testPrint
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId pathuuid | yes | — | Target till UUID. |
APIResponseDataObject<{ printJobId: number }>APIError/api/v1/businesses/:businessId/print/tills/setup-token
auth: jwt (administrator)Generate a one-time setup token used by the print agent's first-run wizard to claim a permanent TillToken. Optionally binds the resulting till to a specific Location (TAXCORE-246) — single-location merchants omit and the claim resolves to the business default. Fires `TILL_SETUP_TOKEN_GENERATED` audit.
handlers: PrintController.generateSetupToken
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
locationId bodyuuid | no | — | Optional Location to bind the till to. Validated against the business — invalid → 422 LOCATION_NOT_FOUND. |
APIResponseDataObject<{ setupToken: string }>APIError/api/v1/businesses/:businessId/print/default-till
auth: jwt (administrator)Set the default till for the business. Future auto-print jobs that don't carry an explicit till routing key target this till. Fires `TILL_DEFAULT_SET` audit.
handlers: PrintController.setDefaultTill
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId bodyuuid | yes | — | Till UUID to mark default. |
APIResponseDataObject<TillDTO>APIError/api/v1/businesses/:businessId/print/jobs
auth: jwt (administrator)List print jobs for the business, optionally filtered by status.
handlers: PrintController.listPrintJobs
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
status query'PENDING' | 'PRINTED' | 'FAILED' | 'STALE' | no | — | Filter by `Status`. |
APIResponseDataList<PrintJobDTO>/api/v1/businesses/:businessId/print/jobs/:id/retry
auth: jwt (administrator)Reset a `FAILED` or `STALE` print job back to `PENDING` so the agent will pick it up again. Fires `PRINT_JOB_RETRIED` audit.
handlers: PrintController.retryPrintJob
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
id pathinteger | yes | — | PrintJobId (BIGINT IDENTITY, coerced from string digits). |
APIResponseDataObject<PrintJobDTO>APIError/api/v1/businesses/:businessId/print/tills/:tillId/pos-register-id
auth: jwt (administrator)Manually point a claimed till at a physical register, or clear the assignment with an explicit null. The value is free text (max 100 chars) and is not validated against any provider device. Fires `TILL_REGISTER_ASSIGNED` audit.
handlers: PrintController.assignTillPosRegisterId
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId pathuuid | yes | — | Target till UUID. |
posRegisterId bodystring | null | yes | — | Register identifier (trimmed, 1–100 chars), or null to clear. The key must be present; omitting it is a 422. |
APIResponseDataObject<TillDTO>APIErrorAPIError/api/v1/businesses/:businessId/print/tills/:tillId/devices/:tillDeviceId
auth: jwt (administrator)Dismiss a stale device from a till's device list. Soft operation: the row is kept with `ForgottenAt` set, removes no access, and is revived if the device heartbeats again. Fires `TILL_DEVICE_FORGOTTEN` audit.
handlers: PrintController.forgetTillDevice
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId pathuuid | yes | — | Target till UUID. |
tillDeviceId pathuuid | yes | — | Target till device UUID. |
emptyAPIErrorAPIError/api/v1/businesses/:businessId/print/tills/:tillId/devices/:tillDeviceId/disconnect
auth: jwt (administrator)Cut one OAuth-paired (`mcp`) device off by revoking every live grant its client holds, so it stops collecting receipts until paired again. Unbinds the till if it still names that client, and retires the till's push registration when no other device remains attached. The device row is kept (use the DELETE route to forget it). Revoking zero grants is still a success. Fires `TILL_DEVICE_DISCONNECTED` audit.
handlers: PrintController.disconnectTillDevice
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId pathuuid | yes | — | Target till UUID. |
tillDeviceId pathuuid | yes | — | Target till device UUID. |
emptyAPIErrorAPIErrorAPIError/api/v1/businesses/:businessId/print/tills/:tillId/revoke-setup-token
auth: jwt (administrator)Revoke a claimed till's TillToken and issue a fresh one-time setup token, forcibly cutting off a running print agent (lost device, reinstall, suspected leak). Fires `TILL_TOKEN_REVOKED` and `TILL_SETUP_TOKEN_GENERATED` (mode `revoke_and_reissue`) audits.
handlers: PrintController.revokeAndReissueSetupToken
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId pathuuid | yes | — | Target till UUID. |
APIResponseDataObject<SetupToken>APIErrorAPIError/api/v1/businesses/:businessId/print/jobs/retry-all
auth: jwt (administrator)Reset every failed (`FAILED` / `STALE`) print job for one till back to pending. Scoped to a till, not the business. Zero matches is not an error. Fires `PRINT_JOBS_BULK_RETRIED` audit.
handlers: PrintController.retryPrintJobsForTill
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId bodyuuid | yes | — | Till whose failed jobs are targeted. |
APIResponseDataObject<{ tillId: string; affected: number }>APIError/api/v1/businesses/:businessId/print/jobs/dismiss-all
auth: jwt (administrator)Soft-dismiss every failed print job for one till so they leave the failed list. Zero matches is not an error. Fires `PRINT_JOBS_BULK_DISMISSED` audit.
handlers: PrintController.dismissPrintJobsForTill
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
tillId bodyuuid | yes | — | Till whose failed jobs are targeted. |
APIResponseDataObject<{ tillId: string; affected: number }>APIError/api/v1/businesses/:businessId/print/jobs/:id/dismiss
auth: jwt (administrator)Soft-dismiss one failed print job (status becomes `DISMISSED`, still listable via the status filter). A print job is not a fiscal record, so this only means the paper receipt did not print. Fires `PRINT_JOB_DISMISSED` audit.
handlers: PrintController.dismissPrintJob
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
id pathinteger | yes | — | PrintJobId (BIGINT IDENTITY, coerced from string digits). |
APIResponseDataObject<{ printJobId: number }>APIError