Skip to content

Stays and check-in

The stays routes are the front-desk side of the Concierge API: check a guest in and out, edit a stay, set the welcome screen the room TV shows, and set up a hotel with all its rooms in one call. For sign-in and calling see the Concierge API.

Endpoints at a glance (3)
POST/staff/stays/
PATCH/staff/stays/:id/checkoutOnly an active stay (409 otherwise).
GET/staff/rooms

Resources

Resource What it is
Venue The top of the place tree. Any venue can do check-in, not only hotels.
Hotel A venue with a hotel record. Optional for check-in.
Room A space somewhere below the venue (venue > building > floor > space).
Endpoint The slot a TV sits in, one per room.
Stay A guest's booking of a room. Belongs to a room, never to a device.
Welcome message The one-time greeting the room TV shows, set per venue or per room.

A TV finds its stay through the room it is placed in: device, then the room, then the room's active stay.

The stay anchor

Every stay has an establishmentId. Outlets, guide content, policies and the venue's welcome message are keyed by it. When a stay is created the server picks it: a venue with a hotel record uses the hotel's ID; a venue without one is its own anchor (the venue ID) and its content falls back to the shared defaults.

Authentication and permissions

All staff routes need Authorization: Bearer <ACCESS_TOKEN>; the organization comes from the token and every query is limited to it. TV routes need the device token.

Action Permission
/staff/stays…, /staff/rooms, /staff/welcome-config, welcome photos A staff access token of the organization
List stays of a workspace (GET /staff/{workspaceId}/stays) workspace:pms:view
Edit, check out or set a password on a stay of a workspace workspace:pms:manage
List hotels of a workspace, read one workspace:devices:view
Create, rename or delete a hotel, add rooms Organization owner or admin

Base path

https://<API_HOST>/api/v1/concierge/…        stays, welcome screen
https://<API_HOST>/api/v1/hotels/{workspaceId}/…   hotel set-up

Both are served by CoreAPI.

Capabilities

  • Check in, create an upcoming booking, check out, edit and activate a stay
  • A welcome message per venue and per room, in seven languages, with four layouts
  • Hotel set-up: hotel, buildings, floors, rooms and one endpoint per room in one call
  • Add rooms to an existing hotel
  • Rename or delete single rooms, floors or buildings (planned)
  • Import rooms from a file (planned)

Object model

Stay statuses

upcoming, then active, then checked_out. A room can have only one active stay at a time.

Staff routes: stays

All under /api/v1/concierge, all need a staff login (RS256). The org comes from the token; every query is limited to that org. Response envelope {success, data} / {success:false, error}.

Method + path Purpose
POST /staff/stays/ Check in (or create an upcoming booking)
GET /staff/stays/ List the org's stays. Query: status, q (room or guest name), limit (1-500, default 100). Newest check-in first.
PATCH /staff/stays/:id Edit guest name, country, dates, password; reset the welcome flag
POST /staff/stays/:id/activate Upcoming → active (check in now)
PATCH /staff/stays/:id/checkout Active → checked out
GET /staff/stays/:id/welcome Preview the welcome payload for this stay (does not mark it viewed)
POST /staff/stays/:id/welcome/viewed Mark it viewed, as the TV would
GET /staff/rooms What a booking form picks from (below)

Check in: POST /staff/stays/

{
  "venueId": "<venue location id>",
  "spaceId": "<room location id>",
  "roomNumber": "203",
  "guestName": "Aiko Sato",
  "country": "JP",
  "checkInAt": "2026-10-28T14:00:00Z",
  "checkOutAt": "2026-10-31T11:00:00Z",
  "password": "optional"
}

Rules:

  • spaceId, roomNumber and one of venueId / establishmentId are required (400 otherwise). establishmentId is the older field; a venue id sent in it is accepted too.
  • The venue (or hotel) must belong to the caller's org (404).
  • The room must be a location of the caller's org (404), must be a space (400), and must sit inside the chosen venue (400 "that room is not in the selected venue"). A room tagged with the hotel's establishment_id also counts.
  • checkInAt omitted or not in the future: the stay is active now. A future checkInAt creates an upcoming booking.
  • A new active stay on a room that already has one: 409.
  • checkOutAt omitted: 72 hours after check-in. It must be after check-in.
  • country (ISO 3166 alpha-2) sets the stay's welcome language (see below).
  • password, if given, is stored hashed; the guest app's room login uses it.

Check out: PATCH /staff/stays/:id/checkout

Only an active stay (409 otherwise). It sets checked_out and check_out_at = now, revokes the stay's guest sessions (paired phones can no longer drive the TV), and tells the room's screens to clear the outgoing guest's state. Telling the screens is best effort: the check-out is already saved.

Edit and activate

  • PATCH /staff/stays/:id takes any of guestName, country (empty string clears country and language), checkInAt, checkOutAt (RFC 3339), password, and welcomeViewed: false (clears the viewed flag so the welcome plays again). An empty body is a 400.
  • POST /staff/stays/:id/activate needs an upcoming stay (409 otherwise) and no other active stay in the room (409). It sets check_in_at = now; if the planned check-out is already past it becomes now + 72 hours.

Room picker: GET /staff/rooms

{
  "venues": [
    { "id": "…", "name": "Grand Hotel", "anchorId": "<establishment id>", "hotel": true,
      "spaces": [ { "id": "…", "name": "203", "path": "Tower A > Floor 2", "customWelcome": false } ] },
    { "id": "…", "name": "Lobby Café", "anchorId": "<the venue id>", "hotel": false, "spaces": [] }
  ],
  "establishments": [ { "id": "…", "name": "Grand Hotel" } ],
  "spaces": [ { "id": "…", "name": "203" } ],
  "languages": ["en", "ms", "zh", "ja", "ko", "th", "vi"],
  "layouts": ["classic", "glass", "minimal", "banner"],
  "greetings": { "en": "Welcome, {name}! …" }
}

venues is what new clients should use: every venue of the org with the spaces below it, path for the picker's label, anchorId (the id the stay and the venue's welcome message are keyed by) and customWelcome (the room has its own welcome message). The flat establishments / spaces lists are kept for older clients.

Lists

Stay lists are not paginated by page. GET /staff/stays and GET /staff/{workspaceId}/stays take only limit and return a bare array in data ([] when empty), with no meta.

List Order and limit
GET /staff/stays Newest check-in first. limit 1-500, default 100; a value outside the range falls back to 100.
GET /staff/{workspaceId}/stays limit default 200.
curl "https://<API_HOST>/api/v1/concierge/staff/stays?status=active&limit=100" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
{
  "success": true,
  "data": [
    {
      "id": 17,
      "createdAt": "2026-10-28T13:00:00Z",
      "updatedAt": "2026-10-28T14:00:00Z",
      "deletedAt": null,
      "organizationId": "4f0c2a9e-1b7d-4e55-9a3c-2d8e6f1a7b90",
      "establishmentId": "4c1f8b2e-7d3a-4e9b-a0c5-3b6d9e1f2a84",
      "spaceId": "9a0d6e2f-1b4c-4a7e-8f35-6c2b0d1e9a77",
      "roomNumber": "203",
      "guestName": "Aiko Sato",
      "depositAmount": 0,
      "checkInAt": "2026-10-28T14:00:00Z",
      "checkOutAt": "2026-10-31T11:00:00Z",
      "status": "active",
      "country": "JP",
      "language": "ja",
      "welcomeViewCount": 1
    }
  ]
}

Welcome screen

When a guest's TV starts, it can show a one-time greeting ("Welcome, Aiko! Room 203 is ready for you."). The server owns the "viewed" flag on the stay (welcome_viewed_at, welcome_view_count), so the TV keeps no copy of its own.

Where the message comes from

Two kinds of message exist: the venue's (what every room without its own shows) and a room's own. Each holds template, bgType (gradient or image), bgValue (a CSS gradient or an image URL), translations (JSON object of per-language texts) and layout.

Resolution for a stay, in order: the room's own message → the venue's → the built-in default. The payload's source field says which one was used (room, venue or default).

Languages and placeholders

  • Supported languages: en, ms, zh, ja, ko, th, vi.
  • The stay's language comes from its country: MY, BN → ms; CN, TW, HK, SG, MO → zh; JP → ja; KR → ko; TH → th; VN → vi; anything else or no country → en.
  • {name} and {room} in a template are replaced with the guest name (Guest if empty) and the stay's room number.
  • Text selection: a translations entry for the guest's language wins. If the template is still the built-in English default, the built-in greeting for that language is used. Otherwise a custom English template is shown as is and the payload says translated: false.
  • Layouts: classic (default), glass, minimal, banner. The client draws them; the server only sends the id.

Staff API: welcome config

Method + path Purpose
GET /staff/welcome-config?establishmentId=&spaceId= The config to edit. With spaceId: the room's own (scope: "room") or, if it has none, the venue's (scope: "venue", inherited). scope: "default" when nothing is saved.
PUT /staff/welcome-config Save. Body: establishmentId (the venue's anchor id) and template required, bgType, bgValue, translations, layout; add spaceId to save for that one room only.
DELETE /staff/welcome-config?spaceId= Remove a room's own message: the room goes back to the venue's. 404 if the room has none. The venue's message cannot be deleted this way.

PUT validation: bgType must be gradient or image, bgValue is required, layout must be one of the four ids. For a room, the space must be a space of the caller's org inside the venue named by establishmentId.

TV API

Both calls take the TV's device token (Authorization: Bearer …) and work out the room and its active stay from it; no workspace or user token.

Method + path Answers
GET /concierge/tv/welcome 200 with the payload; 401 without a valid device token; 404 if the device has no room or the room has no active stay
POST /concierge/tv/welcome/viewed {viewed: true, viewCount, viewedAt}. Safe to call twice: viewedAt is set on the first call, viewCount goes up every time.
{
  "greeting": "ようこそ、Aiko Sato様。203号室のご用意ができております。…",
  "language": "ja", "country": "JP", "translated": true,
  "bgType": "gradient", "bgValue": "linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%)",
  "layout": "classic", "guestName": "Aiko Sato", "roomNumber": "203",
  "viewed": false, "viewCount": 0, "source": "venue"
}

Client flow: call GET /tv/welcome; on 404 or any error, show the normal home screen (the welcome is optional). If viewed is false, draw the greeting, then POST /tv/welcome/viewed once it is actually on screen. Staff replay it with PATCH /staff/stays/:id {"welcomeViewed": false}.

CoreAPI also serves a ready-made room screen at /welcome/?token=<device token> that does exactly this.


Hotel set-up API: /api/v1/hotels/{ws}

Creates a hotel and its whole room tree in one transaction, instead of building venue, buildings, floors and rooms one by one. The workspace is a path segment, the org comes from the login token; client identity headers are ignored.

Method + path Permission Notes
GET /hotels/{ws} workspace:devices:view Hotels this workspace shows, with counts. ?type=all includes other establishment types.
GET /hotels/{ws}/{hotelId} workspace:devices:view Tree: buildings > floors > rooms, each room with its endpoint and seated device
POST /hotels/{ws} org admin Create hotel + tree + endpoints (201)
POST /hotels/{ws}/{hotelId}/rooms org admin Add rooms, optionally creating a floor (201)
PATCH /hotels/{ws}/{hotelId} org admin {name}: renames the hotel and its venue
DELETE /hotels/{ws}/{hotelId} org admin Delete an unused hotel

Creating a hotel is org-level work (it creates a top-level venue), hence the org-admin rule for every change.

Create

{
  "name": "Grand Hotel", "type": "Hotel", "spaceType": "", "endpoints": true,
  "extraWorkspaceIds": [],
  "buildings": [ { "name": "Tower A", "floors": [
    { "name": "Floor 1", "range": { "from": 101, "to": 110 } },
    { "name": "Floor 2", "rooms": ["201", "202", "Suite"], "range": { "prefix": "B", "from": 1, "to": 3 } }
  ] } ]
}

What it creates:

  • the hotel (type default Hotel, status Active);
  • the venue, buildings, floors and rooms of the tree;
  • with endpoints (default true), one endpoint per room, named TV <room>, code EP-<room>, status Vacant, landscape;
  • links from every node to {ws} and to each of extraWorkspaceIds (which must be workspaces of the same organization).

A range expands without padding: {from: 101, to: 110} is 101…110, {prefix: "B", from: 1, to: 3} is B1, B2, B3. Explicit rooms come first.

Limits: 20 buildings, 200 floors and 2,000 rooms per hotel, 1,000 rooms per range; names up to 120 characters (rooms up to 50); room names unique in the hotel (case-insensitive); type letters and spaces only. Every validation problem is returned at once (400, errors is a list). The same name and type already in the org: 409.

A hotel shows in a workspace when its venue is linked to that workspace.

Add rooms

Body: floorId, or buildingId + floorName (the floor is created if the building has none of that name, case-insensitive), plus rooms and/or range, and optional endpoints (default true). Rooms that already exist in the hotel: 409 with details.existing listing them. New rooms are linked to every workspace that shows the hotel.

Delete

Refused with 409 (and the reasons in details) while the hotel still has any of:

  • stays (on the hotel or in any of its rooms);
  • devices seated on its endpoints, or devices registered in its rooms;
  • concierge content keyed by the hotel: outlets, departments, policy entries, TV channels;
  • other establishments on the same venue.

Otherwise it deletes the hotel with its endpoints, workspace links, welcome message and locations, and returns the counts of what was removed. This cannot be undone.

Not built yet: renaming or deleting single rooms, floors or buildings, and bulk import from a file. To put a TV in a room, use the venue endpoints' assign-device route.


Errors

Status When What to do
400 Missing or invalid field; the room isn't in the chosen venue; an empty PATCH body; invalid hotel plan (all problems are listed in errors) Fix the request.
401 No valid token Sign in again.
403 Not an organization admin on a hotel change, or missing workspace:pms:… Ask for the permission.
404 The venue, room or stay isn't in your organization; no active stay for the TV's room Check the IDs.
409 The room already has an active stay; the stay is not in the right status; a hotel with that name and type exists; a hotel still has stays, devices or content (reasons in details) Resolve it, then retry.

Bodies as returned:

{ "success": false, "error": "checkOutAt must be after check-in" }

400. Others: checkInAt must be RFC3339, invalid id param.

{ "message": "Unauthorized - No token provided" }

401 on the staff routes.

{ "success": false, "error": "caller has no organization" }

403. A workspace route without the workspace:pms:… permission answers { "message": "Forbidden - Insufficient permissions" }.

{ "success": false, "error": "stay not found" }

404.

{ "success": false, "error": "this room already has an active stay" }

409. Another: stay is not active.

Endpoints

The tables above list every route. Stay lists and edits by workspace:

Method and path Permission What it does
GET /staff/{workspaceId}/stays workspace:pms:view Stays of the hotels given to the workspace. ?status= (default active), ?limit= (default 200).
PATCH /staff/{workspaceId}/stays/{id} workspace:pms:manage Set the stay's language: one of en, th, ko, zh, ja, vi, ms.
POST /staff/{workspaceId}/stays/{id}/checkout workspace:pms:manage End an active stay. 409 if it belongs to a reservation: check it out from the front desk.
POST /staff/{workspaceId}/stays/{id}/room-password workspace:pms:manage Set the room login password (shown once in the response).