Skip to navigation

Move a printer

View as Markdown

Moves a printer to another location of your organization. Inside a customer the URL stays and the device needs no change. To another customer the host of the URL changes, so the answer carries a new URL (shown only here) and the old one stops working at once. Jobs waiting for the printer are never carried to the new place: without cancel_pending_jobs a printer with jobs waiting is not moved. The allowed device stays with the printer, to another customer too.

Scope: printers:write.

Authentication

AuthorizationBearer

A restricted API key, tc_rk_live_ and 32 characters. Send it as Authorization: Bearer <key>. A key lists its scopes, and each operation below names the one it needs; a key may also be limited to one customer. An owner or a developer of the organization makes a key in the dashboard, under API keys, after a code sent to their e-mail. The key is shown once, when it is made. An owner or a developer can revoke it there, and a revoked key stops working within a minute.

Path parameters

printerstringRequired
The printer's id.

Request

This endpoint expects an object.
locationstringRequired

The location to move to: any location of your organization.

cancel_pending_jobsboolean or nullOptional

Cancel the jobs that are waiting. Without it a printer with jobs waiting is not moved (409 pending_jobs): a receipt for one place must never print in another.

Response

The printer at its new location.
allowed_macstring or null

The one device allowed to use this printer’s address; null means that any device that holds the address is accepted. See allowed_mac of the request that sets it.

auth_error_atstring or null

When a refused request last left a hint: wrong_host (the host is not the printer’s) or mac_mismatch (the address names an allowed device and another device connected). null when there is none.

brandstring or nullRead-only<=64 characters

Read from the printer itself; null until it has connected and answered. It cannot be set through the API. Text the printer sent, kept to ASCII letters, digits and . _ - + ( ) /: a claim of whoever holds the printer’s address, not verified. Treat it as untrusted text.

client_reference_idstring or null

The id of this printer in your own system, such as kitchen-1, or null. Not unique: the same value can be on many objects, and GET /v1/printers?client_reference_id= lists every printer that carries it. null for every printer made before the field existed.

conditionlist of strings

What the printer reports is wrong: paper_low, paper_out, cover_open, jam or error.

connectionstring

never_connected, connected or disconnected (the printer has connected and has not polled for about 4 minutes: its status is offline unless a suspension or a refused request comes first).

created_atstring
customerstring
idstring
locationstring
macstring or null

The MAC address the printer reported on its last accepted poll. For display only: it never addresses or authenticates a printer, and it is a claim by whoever polled with the address secret, not a verified fact. null until the first poll, and for a printer that does not report one.

modestring
modelstring or nullRead-only<=64 characters

Read from the printer itself; null until it has connected and answered. It cannot be set through the API. Text the printer sent, kept to ASCII letters, digits and . _ - + ( ) /: a claim of whoever holds the printer’s address, not verified. Treat it as untrusted text.

namestring
objectstring
pending_jobsinteger>=0
Jobs waiting for the printer that have not expired.
reported_macstring or null

While status is mac_mismatch: the MAC address of the device that was refused, taken from the refused request. Also a claim: compare it with the label of your printer before you allow it. null otherwise.

statusstring

never_connected, online, offline (the printer has connected and has not polled for about 4 minutes), wrong_host, mac_mismatch (the address names an allowed device and another device connected), customer_suspended or location_suspended.

status_codestring or null

The printer’s last status code, such as 200 OK.

vendorstring

star or epson: set when the printer is made and never changed (see vendor of the request that adds a printer), with one exception: a printer made with paper_width and no maker reads star until its first connection names the maker, once (vendor_source says which case it is).

cancelled_jobslist of strings
Jobs that left the printer's queue and were cancelled.
jobs_leftlist of strings

Jobs that left the queue and could not be cancelled (the printer may be printing one). They finish or expire on their own.

urlstring or null

The new URL, only for a move to another customer; the old one stops working at once. null inside a customer, where the URL stays.

detectionstring or nullOptional

What is left for the server to settle on the printer. pending: it was made with paper_width and nothing that names its maker, and has not been settled yet (its maker is set by its first connection, and a Star’s width by what the printer reports). undetected: a Star reported something Tillcast cannot print on yet (Star Line mode, 104 mm paper), or nothing usable, so it prints with the default of its paper. done: every other printer, one made before this field included. A plain string and not an enum. Only in the answer to a single printer, not in a list.

domainstring or nullOptional

The printer domain the printer’s URL is on: print.tillcast.com, or a domain that Tillcast has set up for your organization. The host of the URL is <code of the customer>.<domain>: the code is Tillcast’s own random code of the customer (the part of the customer’s id after cus_), never an id of yours. It is recorded when the printer is made and kept when its secret is replaced. Only in the answer to a single printer, not in a list.

last_seen_atstring or nullOptional
When the printer last polled us. Only in the answer to a single printer.
paper_widthstring or nullOptional

The paper the printer was made for: 58mm, 80mm, or null when it was made without paper_width. Set when the printer is made and never changed. Only in the answer to a single printer, not in a list.

print_optionsobject or nullOptional

What can be set on top of a profile, each field optional. A field left out keeps the profile’s own value. The ranges are checked when the printer is made or changed: a value outside its range, or an encoding the profile does not take, is 422 print_options_invalid naming the field.

profilestring or nullOptional

The profile documents are rendered for (command set, paper width in characters and text encoding): the id of a preset, the one set with profile or, while none is set, the default of the printer’s vendor (star-starprnt-utf8-80mm for a star printer, epson-80mm-48 for an epson one). It is the profile the printer prints with, also for a printer made before profiles could be chosen, and, for a printer made with paper_width and no profile, the one detected from the printer or confirmed on paper (profile_source says which). A plain string and not an enum, so that a profile that is retired never breaks a client; x-tillcast-profiles of the contract lists the ones a printer can be set to. Only in the answer to a single printer, not in a list.

profile_sourcestring or nullOptional

Where profile comes from. default: nobody chose, so the default of the paper and the maker applies. detected: a Star’s own report chose the width. confirmed: a calibration code chose it. explicit: a request or an edit named it, and every printer made before this field existed. A plain string and not an enum, so that a word added later never breaks a client. Only in the answer to a single printer, not in a list.

vendor_sourcestring or nullOptional

Where vendor comes from. default: no maker was named, so the printer reads star until its first connection names the maker. detected: the first connection decided it. explicit: the request that made the printer named it, or the printer was made without paper_width, or before that field existed: the server never changes an explicit maker. A plain string and not an enum, so that a word added later never breaks a client. Only in the answer to a single printer, not in a list.

welcome_printboolean or nullOptional

Whether the printer prints a welcome receipt on its first connection. An epson printer prints none: it reads false. Only in the answer to a single printer.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error