Skip to main content

Using the retrieve guest data extension function in Sitecore CDP REST API

Abstract

Provides details on retrieving the full guest record using information from a data extension in Sitecore CDP (Data model 2.0).

You can use the Guest REST API to perform the retrieve guest data extension function to return a full guest record using identifying information stored in a data extension. To do this, you need the guestRef returned when locate a guest data extension.

To retrieve a full guest record using information from a data extension in the Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/guests/guestRef/extdataExtensionName/dataExtensionRef

Attribute

Description

Type

guestRef

The unique ID of the guest generated by Sitecore CDP.

string

dataExtensionName

The provider of the identifiers.

string

dataExtensionRef

The reference of the data extension.

string

The key attribute in the body of the POST request is the data extension key with a string type.

$ curl -H "Accept: application/json" \
    "https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46/extPreferences/0349654D-5DB7-4103-8C9E-88953648EE1

The following is a 200 response:

{
    "href": "https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46/extPreferences/0349654D-5DB7-4103-8C9E-88953648EE18",
    "ref": "0349654D-5DB7-4103-8C9E-88953648EE18",
    "createdAt": "2010-03-07T16:15:11.000Z",
    "modifiedAt": "2012-08-23T16:17:16.000Z",
    "key": "email",
    "format": "HTML",
    "acceptedTermsAndConditions": true,
    "shortDescription": "The email preferences for this guest",
    "longDescription": "The email preferences for this guest"
}