Exécutez une requête GET pour récupérer le profil.
-X GET 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>'
Elle renvoie l’URL des abonnements du profil.
{
...
"postalAddress":...,
"preferredLanguage": "none",
"subscriptions": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>/subscriptions/"
},
...
}
Exécutez une requête POST sur l’URL des abonnements avec la clé primaire du service dans la payload.
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>/subscriptions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-i
-d '{"service":{"PKey":"<PKEY>"}}'
Elle renvoie le profil mis à jour avec le nœud de service complété.
{
...
"service": {
"PKey": "<PKEY>",
"title": "Sport Newsletter (SVC1)"
},
"serviceName": "",
"subscriber": ...,
...
}
Exécutez une requête GET pour récupérer le service.
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
Elle renvoie l’URL des abonnements du service.
{
...
"messageType": "email",
"name": "SVC1",
"subscriptions": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>/subscriptions/"
},
...
},
Exécutez une requête POST sur l’URL des abonnements avec la clé primaire du profil souhaité dans la payload.
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign//profileAndServices/service/<PKEY>/subscriptions/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-i
-d '{"subscriber":{"PKey":"<PKEY>"}}'
Elle renvoie le service mis à jour avec le nœud de abonnés complété.
{
...
"service": ...,
"serviceName": "",
"subscriber": {
"PKey": "<PKEY>",
...
},
}