- Guest profile — one source system’s record
- Master profile — the golden record after identity resolution
source_id. Resolve the Casa Layer ID first. Then send that ID to
GET /v1/events.
Use a partner API credential. Do not use a personal
API key for a third-party system.
What you need
Select these scopes on the credential:
You also need the PMS guest ID. Casa Layer stores it as
source_id on the
guest profile.
If the guest lookup is empty, use the PMS reservation ID instead. See
Searching for a master profile using PMS identifiers.
1. Create partner credentials
Create the credential in the Casa Layer app. See Partner API credentials for the full steps.- Open Integrations → Partner credentials → Custom Integration.
- Name the credential.
- Select
read:properties,read:guests, andread:events. - Click Create credentials.
- Copy the client ID and client secret.
2. Get an access token
Exchange the client ID and client secret for a short-lived access token.access_token from the response. Cache it until exp. Do not mint a
token on every Casa Layer call.
Send the token as a bearer credential on every request below:
3. Get property context
List the properties in the credential’s group.id and a name. Use id as X-Property-Id when you want
one property only.
403.
Skip the header to search the whole group.
4. Get integration IDs
A PMSsource_id is unique only inside one integration. List the roster
first.
Pick the row for the PMS and property you will query. Copy
id.
5. Resolve the guest from the PMS source ID
data
array.
If
data is empty, that PMS may not store a guest source_id. Resolve the
guest from a reservation instead. Then use the reservation’s
guest_profile_id.
If master_profile_id is null, identity resolution has not clustered this
guest. You can still read the guest event log. You cannot read a master
event log yet.
6. Read the event log
Send one filter. Do not sendguest_profile_id and master_profile_id
together. Both filters combine with AND.
Path A — guest profile (one source system)
Use the guestid from step 5. This log is one sub-profile only.
Path B — master profile (resolved guest)
Usemaster_profile_id from step 5. This log covers every clustered member
sub-profile of that master.
master_profile_id equals
that ID. An unclustered guest does not match. If step 5 returned
master_profile_id: null, use Path A.
One guest source_id is enough for Path B. After you have the master ID,
the log includes the other clustered sub-profiles too.
master_profile_id on GET /v1/events is a Casa Layer UUID. It is not a
PMS ID.Modes
GET /v1/events has two modes.
latest is not a merged entity snapshot. It is the last observed change for
each entity.
rollup is a deprecated alias for latest. The response mode is always
timeline or latest.
timeline with limit and cursor. Default limit is 100. The
maximum is 500. See Pagination.
next_cursor as cursor until next_cursor is null.
Optional entity filters
Narrow the page after you pick a grain:
These filters still require
guest_profile_id or master_profile_id when
you want one guest.
What a row contains
Each event is aGuestEventLogEntry:
entity_type values include guest_profile, reservation, transaction,
action, loyalty_program, membership, review, channel, space,
consent, and consent_retract.
guest_profile_id values. Each value is
one clustered member.
If the lookup is empty
Work through this list:- Confirm
integration_idmatches that PMS and property. - Confirm the PMS ID is the
source_idCasa Layer ingested. - Confirm ingest has finished for that guest.
- Remove
X-Property-Idand try the group-wide guest lookup. - If the guest list is empty, resolve the guest from a reservation.
- For Path B, confirm
master_profile_idis notnull. - For Path B, confirm the guest is clustered. Unclustered guests need Path A.
source_id miss on GET /v1/guests is not 404. The list is empty.
An event filter that matches nothing is also an empty list, not 404.
Errors
Related
Partner API credentials
Create, rotate, and revoke the credential.
Data model
Guest event log grain and modes.
Guest event log
GET /v1/events reference.Search by PMS identifiers
Resolve a guest or master from a PMS ID.