Skip to content

Resolve access credential

POST
/v1/functions/hospitality.function.resolve_access_credential/invoke
curl --request POST \
--url https://api.aerandil.com/v1/functions/hospitality.function.resolve_access_credential/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "params": { "token": "example" } }'

The name-echo half of tap-to-charge: resolve a tapped card’s opaque token to its in-house stay so staff can confirm the guest (“charging to Sam Altman, room 204 — correct?”) before post_charge_by_credential posts anything. Returns the credential, guest display name, room number, stay / folio references, and the credential’s spending caps. Fails closed with one generic error for unknown, revoked, expired, and checked-out credentials — a probing caller learns nothing from the failure mode. Read-only — emits no edits.

Media typeapplication/json
object
params
required
object
token
required
Opaque vendor token read at tap time
string
Examplegenerated
{
"params": {
"token": "example"
}
}

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
credential_id
required
string format: uuid
daily_cap
object
amount
required
string format: decimal
currency
required
string format: iso-4217
expires_at
string format: date-time
folio_id
required
string format: uuid
guest_name
string
kind
required
string
Allowed values: key_card wristband mobile_key other
per_charge_cap
object
amount
required
string format: decimal
currency
required
string format: iso-4217
room_number
string
stay_id
required
string format: uuid
token_hint
string
Example
{
"return_value": {
"kind": "key_card"
}
}
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.