Skip to main content
The guest event log is the append-only history Casa Layer stores for a guest. Each row is one change to one entity. Use it to replay what Casa Layer saw. You can read the log at two grains:
  • Guest profile — one source system’s record
  • Master profile — the golden record after identity resolution
Both paths start with a PMS source ID. The event log does not accept 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.
  1. Open Integrations → Partner credentials → Custom Integration.
  2. Name the credential.
  3. Select read:properties, read:guests, and read:events.
  4. Click Create credentials.
  5. Copy the client ID and client secret.
Casa Layer shows the client secret once. Store it with the partner.

2. Get an access token

Exchange the client ID and client secret for a short-lived access token.
Read 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.
Each row has an id and a name. Use id as X-Property-Id when you want one property only.
The property must belong to the credential’s group. A property outside the group returns 403. Skip the header to search the whole group.

4. Get integration IDs

A PMS source_id is unique only inside one integration. List the roster first.
Each row is one source system mapped to a property: Pick the row for the PMS and property you will query. Copy id.
GET /v1/guests rejects source_id without integration_id. The error is 400.

5. Resolve the guest from the PMS source ID

The response is a list. A match has one row. No match has an empty data array.
Read two Casa Layer IDs from the guest row: 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 send guest_profile_id and master_profile_id together. Both filters combine with AND.

Path A — guest profile (one source system)

Use the guest id from step 5. This log is one sub-profile only.
Use this path when you want what one PMS said about the guest.

Path B — master profile (resolved guest)

Use master_profile_id from step 5. This log covers every clustered member sub-profile of that master.
Use this path when you want the full history for the real guest. The master filter matches guest profiles whose 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.
Walk a timeline with limit and cursor. Default limit is 100. The maximum is 500. See Pagination.
Send the last 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 a GuestEventLogEntry: entity_type values include guest_profile, reservation, transaction, action, loyalty_program, membership, review, channel, space, consent, and consent_retract.
On Path B, rows can show different guest_profile_id values. Each value is one clustered member.

If the lookup is empty

Work through this list:
  1. Confirm integration_id matches that PMS and property.
  2. Confirm the PMS ID is the source_id Casa Layer ingested.
  3. Confirm ingest has finished for that guest.
  4. Remove X-Property-Id and try the group-wide guest lookup.
  5. If the guest list is empty, resolve the guest from a reservation.
  6. For Path B, confirm master_profile_id is not null.
  7. For Path B, confirm the guest is clustered. Unclustered guests need Path A.
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

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.