Skip to content

Record checkpoint

POST
/v1/actions/hospitality.action.record_checkpoint/apply
curl --request POST \
--url https://api.aerandil.com/v1/actions/hospitality.action.record_checkpoint/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "params": { "completed_at": "2026-04-15T12:00:00Z", "items": [ { "code": "example", "ok": true, "text": "example", "value": "example" } ], "observations": "example", "position": 1, "raise_fault": { "area_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "category": "hvac", "description": "example", "room_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "severity": "cosmetic", "title": "example" }, "result_id": "example", "started_at": "2026-04-15T12:00:00Z" }, "return_modified": false, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.inspection_round" } }'

Record one checkpoint of an open round — hubOS’s ‘submit checkpoint’. position names the checkpoint in the round’s own list; items answer its items by code (each at most once; a code it does not have refuses): a check needs ok, a reading its value, a text its text, a photo nothing (its photo attaches to the result), a section heading takes no answer, and any item may say ok: false. A reading with limits that the walker does not judge is judged by them: ok within min / max, an anomaly outside; the walker’s own ok always stands. result_id is the result’s id when the walker mints it (a v4 or v7 UUID — a handset with no signal queues the checkpoint’s photo against it): the same id again is this result, an id another result holds is refused as a duplicate, and a checkpoint recorded already under another id is refused naming it. anomalies is derived — the items answered not ok — and the round’s totals are re-folded from its results. The result is linked to the checkpoint’s room or asset and to the staff member behind the session. One write per checkpoint: recording it again replaces the result in place while the round is open, and an identical repeat writes nothing (even after the round has closed). raise_fault raises a work order through create_work_order’s own path — in the public area raise_fault.area_id names (never with a room_id), else against raise_fault.room_id, else the checkpoint’s room, else the room its asset stands in, and for the checkpoint’s asset — linked to the round (work_order_from_round) and the checkpoint (work_order_from_checkpoint) and counted on both; a fault with the title of one already raised from this checkpoint is that fault, not another. Photos attach to the result (host_kind = checkpoint_result). Emits inspection_round.checkpoint_recorded.

Effects: create hospitality.checkpoint_result; modify hospitality.checkpoint_result; modify hospitality.inspection_round; link hospitality.link.checkpoint_result_in_round; link hospitality.link.checkpoint_result_for_room; link hospitality.link.checkpoint_result_for_asset; link hospitality.link.checkpoint_result_recorded_by; unlink hospitality.link.checkpoint_result_recorded_by; link hospitality.link.work_order_from_round; link hospitality.link.work_order_from_checkpoint; create hospitality.work_order; link hospitality.link.work_order_from_triage; link hospitality.link.work_order_for_room; link hospitality.link.work_order_assigned_to; create hospitality.room_status_block; link hospitality.link.room_status_block_for_room; link hospitality.link.work_order_holds_block; modify hospitality.availability_day; link hospitality.link.work_order_for_asset; link hospitality.link.work_order_reported_by_stay; link hospitality.link.work_order_of_fault_type; link hospitality.link.work_order_for_area.

Media typeapplication/json
object
branch

Apply against an open branch’s overlay view instead of the canonical (main) plane. The action’s writes land in the branch’s copy-on-first-write overlay, its events in the branch’s own stream, and the invocation is journaled for merge-by-replay. Branch writes are action-only, so this is the write-side entry point to a branch (POST /v1/branches forks one).

string format: uuid
params
required
object
completed_at
When the checkpoint was finished (defaults to now)
string format: date-time
items
required
Checkpoint answers
Array<object>
object
code
required
string
ok
boolean
text
string
value
string format: decimal
observations
What the walker noticed at the checkpoint
string
position
required
The checkpoint's position in the round
integer
raise_fault
Checkpoint fault
object
area_id
string format: uuid
category
required
string
Allowed values: hvac plumbing electrical furniture fixtures networking audio_visual structural exterior safety other
description
string
room_id
string format: uuid
severity
required
string
Allowed values: cosmetic minor major blocking safety
title
required
string
result_id
The result's id, minted by the walker (a v4 or v7 UUID)
string
started_at
When the walker began the checkpoint
string format: date-time
return_modified

When true, the response carries modified_objects and modified_links projections — the engine reads the event log inside the same transaction so the projection observes the handler’s own writes.

boolean
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.inspection_round

Action applied. modified_objects and modified_links populated when return_modified: true was supplied.

Media typeapplication/json
ApplyActionResponse

Envelope returned by the Aerandil action engine. correlation_id ties every event emitted by this invocation; modified_objects and modified_links project the events the handler emitted (per the action’s declared effects); warnings carries any non-blocking soft-validator observations.

object
correlation_id
required

Per-invocation correlation id; matches events.correlation_id for every event this action appended.

string format: uuid
modified_links
required

Links established or removed by this invocation. Empty when the caller did not request return_modified.

Array<object>
object
from_id
required
string format: uuid
from_type
required
string
kind
required
Allowed values: linked unlinked end_dated
link_type
required
Allowed values: hospitality.link.checkpoint_result_in_round hospitality.link.checkpoint_result_for_room hospitality.link.checkpoint_result_for_asset hospitality.link.checkpoint_result_recorded_by hospitality.link.work_order_from_round hospitality.link.work_order_from_checkpoint hospitality.link.work_order_from_triage hospitality.link.work_order_for_room hospitality.link.work_order_assigned_to hospitality.link.room_status_block_for_room hospitality.link.work_order_holds_block hospitality.link.work_order_for_asset hospitality.link.work_order_reported_by_stay hospitality.link.work_order_of_fault_type hospitality.link.work_order_for_area
to_id
required
string format: uuid
to_type
required
string
modified_objects
required

Objects created, modified, or soft-deleted by this invocation. Empty when the caller did not request return_modified.

Array<object>
object
id
required
string format: uuid
kind
required
Allowed values: created modified
object_type
required
Allowed values: hospitality.checkpoint_result hospitality.inspection_round hospitality.work_order hospitality.room_status_block hospitality.availability_day
warnings

Non-blocking soft-validator observations emitted during this invocation (e.g. comp-authority over-limit, recipe pour-cost over sell-price). Absent when no warnings were emitted.

Array<object>
object
message
required

Human-readable summary, suitable for logging or operator-UI surfacing.

string
object_type
required

Object type the warning was raised against.

string
property

Property the warning anchors to, when a single field is the locus. Absent for multi-field rules.

string
rule
required

Stable kebab-case rule identifier (e.g. comp-authority-over-limit).

string
Example
{
"modified_links": [
{
"kind": "linked",
"link_type": "hospitality.link.checkpoint_result_in_round"
}
],
"modified_objects": [
{
"kind": "created",
"object_type": "hospitality.checkpoint_result"
}
]
}

Conflict — concurrent modification or unique constraint violation.

Validation error — parameter validation or business-rule violation.