Skip to content

Open shift for staff

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

A staff member’s open shift — the one clock_in opened and clock_out has not closed — or none (shift absent). The shift’s id (the target set_shift_credit_target and clock_out take), its house, the business date its hours will report under (the property-local day of its start, as clock-out stamps it), its scheduled and actual start and scheduled end, and the housekeeping credit target the pacing report counts the attendant against. The times and the target are staff data: a reader without that clearance gets the shift without them. Read-only.

Media typeapplication/json
object
params
required
object
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.staff_member

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
shift
object
actual_start
string format: date-time
business_date
string format: date
credit_target
string format: decimal
id
required
string format: uuid
property_id
string format: uuid
scheduled_end
string format: date-time
scheduled_start
string format: date-time
staff_member_id
required
string format: uuid
Examplegenerated
{
"correlation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"return_value": {
"shift": {
"actual_start": "2026-04-15T12:00:00Z",
"business_date": "2026-04-15",
"credit_target": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"scheduled_end": "2026-04-15T12:00:00Z",
"scheduled_start": "2026-04-15T12:00:00Z"
},
"staff_member_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
}
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.