Skip to main content
July 16, 2020
Solved

update address1, address2, etc in the location item of Profile by API

Hello,

How to  update the item part of the Profile schem , for example  the parts of location such as address1, address2, ...and so...ZipCode.... ?

for example , in the documentation we can see an example for updating ou creating a profile, butr thi example is only about "simple" fields ::

Sample PATCH request to update a profile.
<--
-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>' \ -d '{"firstName":"Mark"',"lastName":"Smith"}'
-->

By what must i replace "firstname"  or "lastname"   to update the   location.... address1   etc?

Thanks

Franck

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SatheeskannaK
SatheeskannaKAccepted solution
Adobe Champion, Community Advisor, UG Leader
July 16, 2020

Hi @franck_buisson_gl,

 

Use PATCH request with following incase if you're updating part of the profile details. It will look like this,

 

-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-d '{
"lastName": "",
"location": {
"address1": "123 street",
"address2": "",
"address3": "",
"address4": "",
"city": "",
"countryCode": "",
"stateCode": "",
"zipCode": ""
},
"middleName": "",
"mobilePhone": ""
}'

 

Thanks, Sathees

 

 

Thanks, Sathees

2 replies

SatheeskannaK
Adobe Champion, Community Advisor, UG Leader
SatheeskannaKAdobe Champion, Community Advisor, UG LeaderAccepted solution
Adobe Champion, Community Advisor, UG Leader
July 16, 2020

Hi @franck_buisson_gl,

 

Use PATCH request with following incase if you're updating part of the profile details. It will look like this,

 

-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-d '{
"lastName": "",
"location": {
"address1": "123 street",
"address2": "",
"address3": "",
"address4": "",
"city": "",
"countryCode": "",
"stateCode": "",
"zipCode": ""
},
"middleName": "",
"mobilePhone": ""
}'

 

Thanks, Sathees

 

 

Translate
Thanks, Sathees
July 17, 2020
Thanks much Sathees
Translate