This is a two-steps procedure.
The REST API returns the “href” property, which contains the URL to use. Always use the URL contained in the response to make the subsequent API request.
Sample request
Perform a GET request to retrieve the 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>'
It returns the subscriptions URL for the service.
{
...
"messageType": "email",
"name": "SVC1",
"subscriptions": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>/subscriptions/"
},
...
},
Perform a GET request on the subscriptions URL.
-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>'
The list of subscriptions for the service displays, with each associated profile.
{
...
"service": ...,
"serviceName": "SVC3",
"subscriber": {
"PKey": "<PKEY>",
"email": "",
"firstName": "John",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>",
"lastName": "Doe",
},
}
This is a two-steps procedure.
Sample request
Perform a GET request to retrieve the profile.
-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>'
It returns the subscriptions URL for the profile.
{
...
"postalAddress":...,
"preferredLanguage": "none",
"subscriptions": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>/subscriptions/"
},
...
}
Perform a GET request on the subscriptions URL.
-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>'
It returns the list of services to which the profile subscribed.
{
...
"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)"
},
...
}