Updating a profile’s Geographical unit

Last update: 2021-09-13
  • Topics:
  • API
    View more on this topic
  • Created for:
  • Experienced
  1. Perform a GET request on the geoUnitBase resource to retrieve the Geographical unit PKey.
  2. Perform a PATCH request on the profile PKey, with the desired Geographical unit PKey in the payload.

Sample request

Retrieve the list of Geographical units.

-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/geoUnitBase/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns all Geographical units. Retrieve the PKey of the unit to which you want to assign the profile.

 "PKey": "<PKEY>",
 "created": "2019-04-06 22:36:19.089Z",
 "desc": "",
 "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/geoUnitBase/<PKEY>",
 "label": "Europe",
 "lastModified": "2019-04-06 22:36:19.086Z",
 "name": "eu",
 "parentTitle": "All (all)",
 "title": "Europe (eu)"

Perform a PATCH request on the profile, with the PKey of the desired Geographical unit in the payload.

-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/profile/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
-d {
-d "geoUnit":{
-d    "PKey":"<PKEY>"
-d  }
-d }

On this page