Uppdatera en profils geografiska enhet updating-a-geographical-unit

  1. Utför en GET-förfrågan på geoUnitBase resurs för att hämta den geografiska enheten PKey.
  2. Utför en PATCH-begäran på profilen PKey, med den önskade geografiska enheten PKey i nyttolasten.

Exempelbegäran

Hämta listan med geografiska enheter.

-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>'

Den returnerar alla geografiska enheter. Hämta PKey för den enhet som du vill tilldela profilen till.

{
 "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)"
},

Utför en PATCH-begäran på profilen med PKey för den önskade geografiska enheten i nyttolasten.

-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>'
-i
-d {
-d "geoUnit":{
-d    "PKey":"<PKEY>"
-d  }
-d }
recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff