source_id on the guest profile or the reservation. This guide shows how to
find the master profile — the golden record for that guest.
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 one of these from the PMS:
- The guest profile ID (
source_idonGET /v1/guests) - The reservation ID (
source_idonGET /v1/reservations)
source_id. If the guest
lookup returns no rows, use the reservation path.
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:reservations. - 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.
You can send X-Property-Id here too. The list then includes only mappings
for that property.
5. Find the master profile
Use one of the paths below.Path A — PMS guest profile ID
Call this when the PMS gives you a stable guest ID.data
array.
master_profile_id. Then get the master profile.
If data is empty, that PMS may not store a guest source_id. Use Path B.
If master_profile_id is null, identity resolution has not merged this
guest yet. You still have the guest profile. You do not have a master yet.
Path B — PMS reservation ID
Call this when you have the PMS reservation ID. This path also works when the PMS has no guestsource_id.
Search reservations with the same integration_id:
GET /v1/master-profiles accepts reservation_id. That parameter is the
Casa Layer reservation ID, not the PMS source_id.
id.
You can also load the guest, then read master_profile_id:
Get the master profile
Use the Casa Layer master profile ID from Path A or Path B.attribute_sources, guest_profile_ids, and guest_profiles.
See Master profiles and the
API reference.
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, not a display number. - Confirm ingest has finished for that guest or reservation.
- Remove
X-Property-Idand try the group-wide call. - For a guest ID, switch to the reservation path.
Errors
A
source_id miss on a list endpoint is not 404. The list is empty.
Related
Partner API credentials
Create, rotate, and revoke the credential.
Data model
Guest profiles, master profiles, and reservations.
List integrations
Public roster of
integration_id values.Search master profiles
Search by email or Casa Layer reservation ID.
Guest event log
Read the event log for a guest or master from a PMS source ID.