Dies ist ein zweistufiges Verfahren.
Die REST-API gibt die Eigenschaft "href" zurück; diese enthält die zu verwendende URL. Nutzen Sie stets die in der Antwort enthaltene URL, um die nachfolgende API-Anfrage zu erstellen.
Beispielanfrage
Führen Sie eine GET-Anfrage aus, um den Dienst abzurufen.
-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>'
Es wird die Anmeldungs-URL für den Dienst zurückgegeben.
{
...
"messageType": "email",
"name": "SVC1",
"subscriptions": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>/subscriptions/"
},
...
},
Führen Sie eine GET-Anfrage für die Anmeldungs-URL aus.
-X GET 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>'
Eine Liste der Anmeldungen für den Dienst mit jedem zugehörigen Profil wird angezeigt.
{
...
"service": ...,
"serviceName": "SVC3",
"subscriber": {
"PKey": "<PKEY>",
"email": "",
"firstName": "John",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>",
"lastName": "Doe",
},
}
Dies ist ein zweistufiges Verfahren.
Beispielanfrage
Führen Sie eine GET-Anfrage aus, um das Profil abzurufen.
-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>'
Gibt die Anmeldungs-URL für das Profil zurück.
{
...
"postalAddress":...,
"preferredLanguage": "none",
"subscriptions": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>/subscriptions/"
},
...
}
Führen Sie eine GET-Anfrage für die Anmeldungs-URL aus.
-X GET 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>'
Es wird eine Liste der Dienste zurückgegeben, die das Profil abonniert hat.
{
...
"PKey": "<PKEY>",
"created": "2017-03-03 10:54:00.363Z",
"service": {
"PKey": "<PKEY>",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>",
"label": "Sport Newsletter",
"name": "SVC1",
"title": "Sport Newsletter (SVC1)"
},
...
}