Migrating from Customer Profile API v1 to v2
To read more about the two versions of the Customer Profile API, see the OpenAPI specifications provided here:
Pre-requisites​
Before you start the migration process, ensure that you have:
- Checked current API calls to
customer_profile v1
from your integration - Found the impacted fields as listed in the sections below.
List of changes​
Authentication​
The authentication process for V2 is different then v1. Check the following links to get started with it:
Request customer profile deletion​
To request a customer profile deletion in v2
you'll use need to use this POST method
instead of this POST method in v1
.
with the following body:
{
"operation": "delete"
}
Tokenize and Detokenize endpoints replaced by the Tokens method​
Tokenize
and detokenize
methods have been replaced by the v2
tokens method.
Tokens method​
The endpoint receives operation
as query parameter. The possible operation values are:
Tokenize
Tokenizes PII data that is not related to a profile, tokens are only valid for 30 days. This is the operation you should use to replace the old tokenize endpoint.
Detokenize
Detokenizes a list of tokens for profiles, addresses, or data entries. This is the operation you should use to replace the old detokenize endpoint.
Some minor changes to the request body and response. It receives a data
attribute for both operations and returns data
and errors
attributes for both operations.
The request body is:
{
"data": {
"key1": "foo",
"key2": "bar"
}
}
The request response is:
{
"data": {
"key1": "john.doe@example.org"
},
"errors": {
"key2": "token_not_found_error"
}
}
Related topics