Skip to content

Search Proposed action

POST
/v1/object-types/hospitality.proposed_action/search
curl --request POST \
--url https://api.aerandil.com/v1/object-types/hospitality.proposed_action/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "cursor": "example", "filters": [ { "property": "id", "type": "eq", "value": "example" } ], "limit": 1, "order": "asc", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope": { "level": "tenant" }, "sort_by": "created_at" }'

Search for instances. Filters eq, contains, gte and lte AND-compose; or / not are additive follow-ups. Pages with an opaque cursor; the +1 fetch returns has_more without a second round-trip. Ordered by sort_by (default created_at) in order (default ascending), id breaking ties; rows with no value for a property key sort last.

A frozen, auditable record of an action an agent intends to fire, surfaced for human/guest confirmation. Carries the target action name, the frozen proposed parameters, the rationale, and the context the agent saw. On confirm_proposed_action the kernel — not the agent — fires the chained typed action through the normal scope-checked, idempotency-keyed action surface; the agent never touches state directly (single-write-surface honesty, proposal 0030 §1). The decision_* / applied_* fields mutate exactly once on the transition out of proposed. Supersession is on the proposed_action_superseded_by self-link.

Media typeapplication/json
object
branch

Optional open-branch id. Search composes that branch’s copy-on-first-write overlay instead of main, so a preview reads its own hypothetical writes. Omit to read main.

string format: uuid
cursor

Opaque cursor from a prior response’s next_cursor. Pass back verbatim; do not introspect.

string
filters

Conjunctive list of predicates. Empty or omitted matches every row in scope, capped by limit.

Array
One of:
object
property
required
Allowed value: id
type
required
Allowed value: eq
value
required
string
limit

Page size. Server defaults to 50, silently clamps at 500 (AIP-158 §3).

integer
>= 1 <= 500
order

Direction of sort_by: asc (oldest / smallest first) or desc. A cursor is bound to the sort_by and order it was minted under; another pair is refused (422).

string
default: asc
Allowed values: asc desc
property_id

The house a desk stands in: keeps this property’s rows (property- or venue-scoped there) and every row scoped to no property (tenant, brand, portfolio), and drops a sibling house’s — the meaning property_id has on the event tail.

string format: uuid
scope
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
sort_by

What the page is ordered by: the row’s created_at or updated_at, or a property whose type orders — strings, enums and dates as text, ints, decimals and durations as numbers, datetimes as instants. Rows with no value sort last in either direction. A property the caller is not cleared to read is refused (403).

string
default: created_at
Allowed values: created_at updated_at id proposed_by target_action subject_kind subject_ref rationale_text confidence requires_confirmation_from expires_at decision_status decided_at decided_by applied_action_correlation_id applied_target_ref rejection_reason

Search results, ordered by (sort_by, id) in the requested order (ascending by default).

Media typeapplication/json
object
data
required
Array<object>
object
created_at
required
string format: date-time
id
required
string format: uuid
object_type
required
Allowed value: hospitality.proposed_action
properties
required
object
applied_action_correlation_id
The chained typed action's correlation id — the audit-trail join
string
applied_params
The params actually fired on `applied` — may differ from `target_params_snapshot` when the confirmer edited them (the edit-rate trust signal, §7)
applied_target_ref
Id of the object the chained action created/modified
string
confidence
required
Agent confidence in the proposal
string
Allowed values: low medium high
context_snapshot
Frozen context the agent saw (the guest request, the disruption); bounded excerpts only — full content stays in the system of record
decided_at
Set on exit from `proposed`
string format: date-time
decided_by
Principal::stable_id() of the confirming principal (guest surface, staff member, approval gate, or the expiry sweep)
string
decision_status
required
Frozen-artefact lifecycle status
string
Allowed values: proposed applied rejected expired superseded
expires_at
required
When an unconfirmed proposal sweeps to `expired` (default 24h)
string format: date-time
id
required
Proposal id
string
proposed_by
required
Principal::stable_id() of the proposing agent — the audit anchor
string
rationale_text
Human-readable 'why', surfaced at confirmation time
string
rejection_reason
Set on `rejected`
string
requires_confirmation_from
required
Who must confirm before the kernel fires the action
string
Allowed values: guest staff approval_gate
subject_kind
required
The object class the action targets
string
Allowed values: reservation person folio charge stay venue other
subject_ref
required
Id of the subject object (resolved against `subject_kind`)
string
target_action
required
The registered action this proposal intends to fire (ApiName form); validated against the registry
string
target_params_snapshot
Frozen proposed parameters for `target_action` — the audit-grade record of what the agent wanted to do
provenance

Per-property source attribution and pins. An entry under properties means the property’s current value came from that source (on the source’s own clock, source_updated_at); an entry under pins is a human override protecting the property from sourced writes.

object
pins
object
key
additional properties
object
pinned_at
string format: date-time
pinned_by
object
reason
required
string
properties
object
key
additional properties
object
external_id
string
recorded_at
required
string format: date-time
source
required
string
source_updated_at
string format: date-time
stream
string
scope
required
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
tenant_id
required
string format: uuid
updated_at
required
string format: date-time
version
required
integer
>= 1
has_more
required
boolean
next_cursor

Cursor for the next page; omitted when the result set is exhausted.

string
Example
{
"data": [
{
"object_type": "hospitality.proposed_action",
"properties": {
"confidence": "low",
"decision_status": "proposed",
"requires_confirmation_from": "guest",
"subject_kind": "reservation"
},
"scope": {
"level": "tenant"
}
}
]
}

Validation error — unknown property or filter type mismatch.