Use the locate guests function in Sitecore CDP REST API

Abstract

Provides a cURL command to locate guests in Sitecore CDP REST API (Data model 2.1).

You can use the Guest REST API to perform the locate guests function to return guests using their email address or other identifying information. After you perform the  locate guests function, you can use the guestRef included in the response to retrieve the full guest record.

To locate a guest in Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/guests

Attribute

Description

Type

email

The email addresses for the guest.

string

identifiers.provider

The provider of the identifiers.

string

identifiers.id

The ID of the identifiers.

string

The following is a cURL command for locating guests using the email attribute.

$ curl -H "Accept: application/json" \
        "https://{apiEndpoint}/v2/guests?email=jack.smith@boxever.com"

The following is the JSON response for locating guests using the email attribute.

{
    "href": "https://{apiEndpoint}/v2/guests?email=jack.smith@gmail.com",
    "offset": 0,
    "limit": 10,
    "items": [{
        "href": "https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46"
    }]
}

The following is a cURL command for locating guests using the identifiers attribute.

$ curl -H "Accept: application/json" \
"https://api.boxever.com/v2/guests/?identifiers.provider=MY_ACCOUNT_ID&identifiers.id=jack123"

The following is a JSON response for locating guests using the identifiers attribute.

{
    "href": "https://{apiEndpoint}/v2/guests/?identifiers.provider=MY_ACCOUNT_ID&identifiers.id=jack123",
    "offset": 0,
    "limit": 10,
    "items": [{
        "href": "https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46"
    }]
}

You can expand the collection resource when using the  locate guests function. The following pagination parameters are not supported using the  locate guests function:

  • offset

  • limit

  • support

You can use the following search parameters:

  • FIRST_NAME

  • LAST_NAME

  • PHONE_NUMBER

  • EMAIL

  • EMAIL.UNTOUCHED

  • IDENTIFIERS.PROVIDER

  • IDENTIFIERS.ID