Create a guest data extension (legacy)
Important
A newer version of this REST API (v2.1) is available. If you're new to the Guest REST API, use the new version. Alternatively, if you're already using the old version, read about the differences between v2 and v2.1 so you can upgrade.
POST /v2/guests/<guestRef>/extext
Creates a guest data extension for a guest.
In the response, the ref
key contains the data extension reference. You use the data extension reference to retrieve, update, or delete a guest data extension.
In this example, loyaltyTier
, rewardBalance
, vipMember
, and loyaltyNumber
become guest data extensions.
RequestResponse
curl -X POST '<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/extext' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '
{
"key": "default",
"loyaltyTier": "level2",
"rewardBalance": 5012.25,
"vipMember": true,
"loyaltyNumber": 3452
}'
RequestResponse
{
"href": "<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/extext/09bfc8cc-3815-5b77-b75a-d3cc6a867c1a",
"ref": "09bfc8cc-3815-5b77-b75a-d3cc6a867c1a",
"key": "default",
"createdAt": "2024-12-16T07:39:53.924Z",
"modifiedAt": "2024-12-16T07:39:53.924Z",
"vipMember": true,
"loyaltyTier": "level2",
"rewardBalance": 5012.25,
"loyaltyNumber": 3452,
"guest": {
"href": "<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03"
}
}