Skip to content

Board sort

POST
/v1/functions/hospitality.function.board_sort/invoke
curl --request POST \
--url https://api.aerandil.com/v1/functions/hospitality.function.board_sort/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "params": { "board": "housekeeping_sheet", "boards": [ "housekeeping_sheet" ] }, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.property" } }'

The order the caller reads one of the property’s boards in — hubOS’s server-defined sort pattern with its per-user override: the caller’s own preference for the board when their session is a staff member who set one (set_staff_sort_preference), else the house’s active pattern (set_board_sort_pattern), else the kernel’s default (the sheet: status, priority, task type, room; the rack: floor, room; work orders: severity, due date, room; pacing: credits still to clean, name). source says which (staff, property, kernel) and pattern_id names the house’s pattern. keys is ordered, first key first, each with its direction; every ranked key (priority — a work order’s severity — task_type, status) carries values, its whole vocabulary least first: the stated order, then the rest in the kernel’s rank. A row with no value for a key sorts after the rows with one, in either direction. The kernel names the order; the client applies it to its rows. Name one board and the answer carries its board, source, pattern_id and keys beside property_id; name several as boards and boards in the answer is a map from each board to that answer, so a handset reads every board its role shows in one call. Exactly one of the two. Read-only.

Media typeapplication/json
object
params
required
object
board
The board: housekeeping_sheet, housekeeping_rack, work_orders or pacing
string
Allowed values: housekeeping_sheet housekeeping_rack work_orders pacing
boards
Several boards in one read (instead of `board`)
Array<string>
Allowed values: housekeeping_sheet housekeeping_rack work_orders pacing
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.property

Function invoked. The body carries the typed return_value shaped by the function’s declared return_type.

Media typeapplication/json
InvokeFunctionResponse

Envelope returned by the Aerandil function engine. correlation_id is the per-invocation id for trace stitching; return_value is the typed value the function computed (shape declared by the function’s return_type).

object
correlation_id
required

Per-invocation correlation id; appears on log/trace records this function emitted.

string format: uuid
return_value
required
object
board
string
Allowed values: housekeeping_sheet housekeeping_rack work_orders pacing
boards
object
housekeeping_rack
object
board
required
string
Allowed values: housekeeping_sheet housekeeping_rack work_orders pacing
keys
required
Array<object>
object
direction
required
string
Allowed values: asc desc
key
required
string
Allowed values: priority room_number floor task_type status due_at credits arrival_time departure_time pending_credits target_percent name
values
Array<string>
pattern_id
string format: uuid
source
required
string
Allowed values: staff property kernel
housekeeping_sheet
object
board
required
string
Allowed values: housekeeping_sheet housekeeping_rack work_orders pacing
keys
required
Array<object>
object
direction
required
string
Allowed values: asc desc
key
required
string
Allowed values: priority room_number floor task_type status due_at credits arrival_time departure_time pending_credits target_percent name
values
Array<string>
pattern_id
string format: uuid
source
required
string
Allowed values: staff property kernel
pacing
object
board
required
string
Allowed values: housekeeping_sheet housekeeping_rack work_orders pacing
keys
required
Array<object>
object
direction
required
string
Allowed values: asc desc
key
required
string
Allowed values: priority room_number floor task_type status due_at credits arrival_time departure_time pending_credits target_percent name
values
Array<string>
pattern_id
string format: uuid
source
required
string
Allowed values: staff property kernel
work_orders
object
board
required
string
Allowed values: housekeeping_sheet housekeeping_rack work_orders pacing
keys
required
Array<object>
object
direction
required
string
Allowed values: asc desc
key
required
string
Allowed values: priority room_number floor task_type status due_at credits arrival_time departure_time pending_credits target_percent name
values
Array<string>
pattern_id
string format: uuid
source
required
string
Allowed values: staff property kernel
keys
Array<object>
object
direction
required
string
Allowed values: asc desc
key
required
string
Allowed values: priority room_number floor task_type status due_at credits arrival_time departure_time pending_credits target_percent name
values
Array<string>
pattern_id
string format: uuid
property_id
required
string format: uuid
source
string
Allowed values: staff property kernel
Example
{
"return_value": {
"board": "housekeeping_sheet",
"boards": {
"housekeeping_rack": {
"board": "housekeeping_sheet",
"keys": [
{
"direction": "asc",
"key": "priority"
}
],
"source": "staff"
},
"housekeeping_sheet": {
"board": "housekeeping_sheet",
"keys": [
{
"direction": "asc",
"key": "priority"
}
],
"source": "staff"
},
"pacing": {
"board": "housekeeping_sheet",
"keys": [
{
"direction": "asc",
"key": "priority"
}
],
"source": "staff"
},
"work_orders": {
"board": "housekeeping_sheet",
"keys": [
{
"direction": "asc",
"key": "priority"
}
],
"source": "staff"
}
},
"keys": [
{
"direction": "asc",
"key": "priority"
}
],
"source": "staff"
}
}
Cache-Control
string

Always no-store — function results are time-sensitive and never cacheable.

Function or target object not found.

Parameter validation or domain-rule violation.