Create a customer
Adds a customer: the business whose locations and printers you manage. The
customer’s id is a short code that is also the first label of the host of
its printers. Needs a key that is not limited to one customer. The
dashboard calls it with the access token of a signed-in owner or developer
instead of a key, naming the organization in Tillcast-Organization; a
person is refused with permission_denied (a viewer),
organization_suspended, organization_required (no header) or
resource_missing (not a member of that organization).
Scope: customers:write.
Authentication
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.
The access token of a person signed in to the dashboard, from the dashboard Cognito pool. Dashboard only, except that POST /v1/customers, POST /v1/customers/{customer}/locations, POST /v1/locations/{location}/printers, PATCH /v1/printers/{printer}, DELETE /v1/printers/{printer}, POST /v1/printers/{printer}/rotate-secret and POST /v1/printers/{printer}/test-print also take it, by role (an owner or a developer, with the organization named in Tillcast-Organization).
Headers
A string of 1 to 64 visible ASCII characters that identifies this request. A retry with the same key and the same body returns the first result (200, with Idempotent-Replayed: true) instead of making a second object; the same key with a different body is an error (422). Keys are remembered for 24 hours.
Request
The id of this customer in your own system, 1 to 128 characters. It is
not unique and never refused for being used already; search for it with
GET /v1/customers?client_reference_id= before you create when you need
to find the customer you made earlier.
Response headers
true: this is the result of an earlier request with the same Idempotency-Key.
Response
A replay of an earlier request with the same Idempotency-Key.
The id of this customer in your own system, or null. Not unique: the
same value can be on many objects, and GET /v1/customers?client_reference_id=
lists every customer that carries it.
cus_ and the customer’s code, which is also the first label of the
host of its printers.
live.
active, or suspended (its printers print nothing).