We haven't covered CDP + Personalize much on the blog, but we'll start sharing tips regularly. Although an overview of the product would be ideal, we'll begin by sharing tips. First, we'll use Postman to create and update profiles.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1poJOqjOXna8R4m9NdXHXf%2F9885eb7fde3230e4752cf1512311ed33%2Fmika-baumeister-WOn90Iui_08-unsplash.jpg&w=3840&q=75)
Postman Configuration
The API for processing data against a Sitecore CDP varies by Region. In this case, I will use https://api-engage-ap.sitecorecloud.io because I have an Asian CDP instance. The URL of the server is specified in the following page.
For authentication, basic authentication is provided, and an API is provided from the CDP administration screen.
![cdppostman01.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7lsR9LCwHx9Gh1WIPzhjeq%2F170e8a347cc7306565311f7c908f9acb%2Fcdppostman01.png&w=3840&q=75)
When you get to the API access screen, you can check your Client Key and API Token, where Client Key is your user name and API Token is your password.
![cdppostman02.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1tH5HYllPZVpKr6uZyKFa7%2Faa69f72f6021651538c48351795f9264%2Fcdppostman02.png&w=3840&q=75)
Start Postman and create a new HTTP request. At this time, use the settings on the Auth tab to create the basic authentication settings.
![cdppostman03.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1X8ViAPZROSYzzwR7tmfvi%2Fa92ba0acaafedc311da14f4a3d1210fb%2Fcdppostman03.png&w=3840&q=75)
You are now ready to go. Open the profile registered as a sample and execute data acquisition using the key used in the URL. The result is as follows, which was obtained as Json data.
![cdppostman04.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F2eB0mbu754pcD7R8E6MGzn%2F386bae84be98537eedab46dd069f0704%2Fcdppostman04.png&w=3840&q=75)
Create a profile
Access to data creation through the API is described in the following page.
Now, let's start creating the post using Postman. The difference from the last time is that since we are not taking data, we choose POST for HTTP processing and pass the following Json data to /v2/guests.
{
"guestType": "顧客",
"title": "Mr",
"firstName": "Shinichi",
"lastName": "Haramizu",
"gender": "male",
"dateOfBirth": "1971-12-08T00:00:00.000Z",
"emails": [
"haramizu@outlook.com"
],
"phoneNumbers": [
"0345236900"
],
"nationality": "Japan",
"city": "Minato-ku",
"country": "JP",
"postCode": "1070062",
"state": "Tokyo"
}
The screen looks like this
![cdppostman05.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FySqYrf1XJQcU6b4GtSJYp%2F8e6e79d43f98cbd5fdf86ad1fe6d3ddd%2Fcdppostman05.png&w=3840&q=75)
The result will return Json data in the following form.
![cdppostman06.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F3A8uOyWRPOShxiWUvdDOLO%2Fe056ef639ed6904aa12b1468e3644791%2Fcdppostman06.png&w=3840&q=75)
If you go to browse the guest list from the administration screen, you will see that a new profile has been created.
![cdppostman07.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1ZWfKBQAMXcJbw1ilSLetA%2F1e0e71ea02e70d099eb8089739ce3308%2Fcdppostman07.png&w=3840&q=75)
Search profiles
In the first step of this article, we used the user's key to get the data, but in reality, we need to look up the key by email address or other means. So this time, we will use the email address to retrieve the key. To actually access the key, use Query Params and specify the email address used in the registration as the email address. Then some data is returned in the following form.
![cdppostman08.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F462Td4x2eqbOR5lsEggpkJ%2Fb90d77cfb0147e85213192ac7ba6ca27%2Fcdppostman08.png&w=3840&q=75)
A key is displayed in the items : href field in the result, and this key can be used to retrieve detailed information about this user。
![cdppostman09.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6vz5hW7d2JdA0Jx0Fakrma%2F06a897793ab203b56523755ff8db4b39%2Fcdppostman09.png&w=3840&q=75)
Update Profile
To update the guest list, use the key obtained in the previous step to update the guest list. In actuality, the key is entered in /v2/guests/guestRef and the post is made. In this case, specify only the items you wish to update in Json.
{
"firstName": "真一",
"lastName": "原水",
"postCode": "107-0062"
}
Postman allows you to see the results of the execution in the following form.
![cdppostman10.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F2osXNjJTsKrh8GAncr3HeE%2Fafcf0da5c4ad77c70d030454a6b44a7d%2Fcdppostman10.png&w=3840&q=75)
The management screen will confirm that the name has been updated.
![cdppostman11.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5qwKXbLltJ2pfwuIpTwMJQ%2F88dd2adf01e043e4aafbece941c7e522%2Fcdppostman11.png&w=3840&q=75)
Deleting a created profile
Profiles that have been created for verification purposes, such as this one, can be deleted using Postman. Deletion is very easy, and can be done by specifying Delete instead of Get / Post.
![cdppostman12.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F3H8uCtXeT11drkyahhRhOR%2Fce78aefacb28d433d8c620618c977b58%2Fcdppostman12.png&w=3840&q=75)
If a result of 200 is displayed after execution, the data has been deleted.
Summary
In this case, we used Postman to perform the process of creating, verifying, and updating a new profile. We have shown that it is possible to create and update profiles in such a simple procedure.