Skip to navigation

Create a location

View as Markdown

Adds a location (a hotel, a venue) to a customer. The customer must be active. 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

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.

OR
AuthorizationBearer

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).

Path parameters

customerstringRequired
The customer's id.

Headers

Idempotency-Keystring or nullOptional

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

This endpoint expects an object.
namestringRequired1-128 characters
1 to 128 characters.
addressstring or nullOptional1-200 characters
Up to 200 characters. Do not put guests' data here.
client_reference_idstring or nullOptional1-128 characters

The id of this location 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/locations?client_reference_id=.

timezonestring or nullOptionalformat: "^[A-Za-z0-9_+-]+(/[A-Za-z0-9_+-]+)*$"1-64 characters

An IANA time zone name, such as Europe/Warsaw.

Response headers

Idempotent-ReplayedstringOptional

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.

client_reference_idstring or null
created_atstring
customerstring
The id of the customer the location belongs to.
idstring
namestring
objectstring
printer_countlong>=0
statestring

active, or suspended (paused).

addressstring or nullOptional

Only in the answer to a single location; lists leave it out.

timezonestring or nullOptional
An IANA time zone name. Only in the answer to a single location.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error