NAV Navbar
Logo
shell

alt text

Introduction

Welcome to the Adobe Campaign Standard API!

Our API is aimed at letting you create integrations for Adobe Campaign Standard and build your own ecosystem by interfacing Adobe Campaign Standard with the panel of technologies that you use.

With the Adobe Campaign Standard API, you get access to the following functionalities:

The APIs we provide use standard concepts with a REST interface and JSON payloads.

All the endpoints are described extensively in this documentation with the general notions you should know for manipulating the API, the complete API reference, code examples and quick start guides.

If anything is missing or seems incorrect, please ask the community.

Documentation updates

v1.3

v1.2

v1.1

Must read

Technical requirements

Primary keys & collection URLs

API identifiers

$curl  
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServicesExt/profile"

In all the code examples, you must replace variables with your personal identifiers. For more information on the API access configuration and how to retrieve these identifiers, refer to this section.

alt text


Setting up API access

Adobe Campaign Standard API access is set up through the steps below. Each of these steps is detailed in Adobe IO documentation, in this section.

  1. Check you have a digital certificate, or create one if necessary. The public and private keys provided with the certificate are needed in the following steps.

  2. Create a new integration to Adobe Campaign Service in Adobe IO and configure it. Your credentials will then be generated (API Key, Client secret...).

  3. Create a JSON Web Token (JWT) from the credentials previously generated and sign it with your private key. The JWT encodes all of the identity and security information that is needed by Adobe to verify your identity and grant you access to the API.

  4. Exchange your JWT for an Access Token through a POST operation. This Access Token will have to be used in each header of your API requests.

Let's start with the API

Authentication

To use the Campaign Standard API, you need an Adobe I/O account. This is a mandatory first step to go forward and discover the API features. For more on this, refer to this section.

Retrieving Profiles

Retrieve the first 10 email values with a GET operation:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/email?_lineCount=10"

Returns the following values:

{
  "content": [
    "amy.dakota@mail.com",
    "kristen.smith@mail.com",
    "omalley@mail.com",
    "xander.harrys@mail.com",
    "jane.summer@mail.com",
    "gloria.boston@mail.com",
    "edward.snow@mail.com",
    "dorian.simons@mail.com",
    "peter.paolini@mail.com",
    "mingam+test08@adobe.com"
  ],
  "next": {
    "href": "/profileAndServices/profile/email?_lineCount=10&_
    lineStart=@Qy2MRJCS67PFf8soTf4BzF7BXsq1Gbkp_e5lLj1TbE7HJKqc"
  }
}

The "next" node returns the URL that gives you access to the 10 next email values.

Here is a simple GET example to retrieve the first 10 email values.

Fore more information on the GET operation, refer to this section.

For more information on the metadata of the profile API, refer to this section.

Updating Profiles

Retrieve the profile with a GET operation and the "byEmail" filter:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/byEmail?email=amy.dakota@mail.com"

Add the phone number value with a PATCH operation on the profile Primary Key:

$curl
-X PATCH \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-d "{"phone":{"3301020304"}" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/@_jKvoiXy0cwpwubaOvcBhots0PUNfzWuzD8RSsDs1
uvDiF0QzM1rwIraB7PHEdyEgPjl_5AOtO82WWAiCFlhbydsdAw"

In this example, we want to update the phone field in a profile with the email value "amy.dakota@mail.com".

  1. The first step is to retrieve the profile. To accomplish this GET operation, we use the filter "byEmail". To know more about filters and how to use them, refer to this section.

  2. Then, in a second operation, we will apply the PATCH operation on the profile with the completed phone number in the payload.

    The PATCH pattern is http://../<apiName>/<resourceName>/<PkeyValue>
    To know more about PATCH operations, refer to this section.

  3. To check if the PATCH operation has updated the profile, we can perform a final GET operation.

Global Concepts

Url Patterns

Collections of resources are available using the following URL type:

https://mc.adobe.io/<TENANT>/campaign/profileAndServices/<resourceName>/

Individual resources from a collection are available using the following URL type:

https://mc.adobe.io/<TENANT>/campaign/profileAndServices/<resourceName>/<resourceID>

Resources Representation

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/PostalAddress.json?_lineCount=1"

All API resources are available in JSON with an URL extension or inside an HTTP Accept Header.

GET /profileAndServices/<resourceName>.json

Without extension in the URL, the json format is the default one.

EndPoints

Here are the available endpoints for Adobe Campaign REST API:


For profileAndServices and profileAndServicesExt APIs, we have two major endpoints:

Primary Key

Retrieve the subscriptions for a profile using a business ID:

$curl  
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServicesExt/profile/<businessID>"

Execute a GET on the subscriptions href returned:

$curl  
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServicesExt/service/<LINK_IDENTIFIER>/subscriptions/"

Returns the list of subscriptions for the profile:

"service": {
  "PKey": "@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
  "href": "/profileAndServicesExt/service/@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
  "label": "Sport Newsletter",
  "name": "SVC1",
  "title": "Sport Newsletter (SVC1)"
}

If the profile resource has been extended with a business ID field, you can use it as key instead of the Primary Key.

GET /.../profileAndServicesExt/profile/<businessId>

Get / Post / Patch / Delete

Sample GET request on a collection:

$curl  
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/<resourceName>/"

Sample GET request on a record:

$curl  
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/<resourceName>/[$Pkey]"

Sample POST request:

$curl
-X POST \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-d '{"field":"value"}' \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/<resourceName>/"

Sample PATCH request:

$curl
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-x PATCH \
-data '{"field":"value"}' \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/<resourceName>/[$Pkey]"

Sample DELETE request:

$curl
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-x DELETE \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/<resourceName>/[$Pkey]"

Data processing

Counting

To count all the profiles that have an email value equaling to "toto@mail.com", perform a GET operation with a filter:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServicesExt/profile/byEmail?email=toto@mail.com"

Returns the collection and the count URL. Perform a GET operation on the count URL:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServicesExt/profile/byEmail/_count?email=toto@mail.com&_lineStart=@W6ccO_RJ3iFc90mlPmuxV23z9Kf6oJKcb_XmTQXu9ZDj8Mrz"

Returns the count value:

{
  "count": 10
}

The Adobe Campaign REST API can count the number of records.

Counting is often used with filters. For more on filters, refer to this section.

Pagination

GET operation displaying 2 records:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile?_lineCount=2"

By default, 25 resources are loaded in a list. The _lineCount parameter allows you to limit the number of listed records.

Sorting

Retrieve the first ten emails in the database alphabetically ordered:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/email?_order=email&_lineCount=10"

Response to the operation:

{
  "content": [
    "adam@email.com",
    "allison.durance@example.com",
    "allison.durance@example.com",
    "amy.dakota@mail.com",
    "andrea.johnson@mail.com",
    "andrea.xiuxiu@testoutlook.com",
    "audrey.davis@mail.com",
    "babel_martin@testlaposte.net",
    "barbara.cooper@mail.com",
    "bette.grant@mail.com"
  ]
  "next": {
    "href": "/profileAndServices/profile/email?_order=email&_lineCount=10&_lineStart=@Qy2MRJCS67PFf8soTf4BzF7BXsq1Gbkp_e5lLj1TbE7HJKqc"
  }
}

Retrieve the email in the database in a descending alpha order:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/email?_order=email%20desc"

Response to the operation:

{
  "content": [
    "tombinder@example.com",
    "tombinder@example.com",
    "timross@example.com",
    "massardi+test03@adobe.com",
    "massardi+test02@adobe.com",
    "massardi+test01@adobe.com",
    "john.smith@example.com",
    "jody.lucassen@example.com",
    "jade.connor@email.com",
    "dannymars@example.com",
    "clarke.mack@example.com",
    "clara.smith@example.com",
    "allison.durance@example.com"
  ]
}

Sorting is available in ascending or descending order. The '%20desc' or '%20asc' parameter needs to be added to the URL.

Sorting is available for SQL fields only. The list of SQL fields for each resource is available in this section.

Sorting is also available on every property. A specific flag is available in the resource metadata to know whether or not the property can be ordered. For more on this, refer to this section.

Filtering

The operations below show how to retrieve the 'byText' filter metadata for the 'profiles' resource.
First perform a GET request on the resource metada:

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/resourceType/profile" \

Returns the URL where the filters are described:

{
"filters": {
        "href": "/profileAndServices/resourceType/@eRLFwi-4R1EiyZSdN1WNdM1Xg_hUVd8p0YpAQJkPZbqczGmkFjbqyE8lPqsdG_lE5M0J-AQB10O5X2INB6jOShlWwE_4Kb-XT62GHjsSpZj4_DwQ/filters/"
    },
	...
  }

Perform a GET request on the URL. It returns the list of filters for the profile resource and the metadata associated to each filter:

{
    "birthday": { },
    "byEmail": { },
    "byKeysProfile": { },
    "byText": { },
    "profile": { },
    "subscribers": { }
}

Retrieving filters and metadata

Filters are available for each resource.

To identify the filters associated to the resource, you need to perform a GET request on the resource metadata. For more on metadata, refer to this section. This operation returns the URL where all of the filters are defined for a given resource.

To identify the filter metadata and determine how to use it, you have to perform a GET request on the previously returned URL.








































Filter metadata structure sample:

"byText": {
        "PKey": "...",
        "category": "99_none",
        "condition": {...},
        "data": "/rest/profileAndServices/profile/byText?text=$value",
        "formType": "none",
        "fragmentName": "",
        "label": "By name or email",
        "metadata": {...},
        "resName": "byText",
        "webPage": "",
        "webPageName": ""
    },

Filters metadata structure

The same metadata structure is available for each filter:









This GET operation shows how to retrieve the services resources with the type "email":

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/byChannel?channel=email"

This GET operation shows how to retrieve the profile resources containing "example" in the email or last name fields (the byText filter searchs into both the email and last name fields):

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/byText?text=example"

This GET operation shows how to retrieve the services resources with the type "email" and the label "sport":

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service/byChannel/byText?channel=email&text=sport"

Using filters

Filtering can be done with the following call :

GET /profileAndServices/resource/filterName?filterParam=filterValue

It is possible to combine multiple filters in a single call:

GET /profileAndServices/resource/filter1name/filter2name?filter1param=filter1value&filter2param=filter2value


























Metadata mechanism

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
"https://mc.adobe.io/<TENANT>/campaign/profileAndServices/resourceType/profile"

This JSON gives the complete description of the profile resource

{
"PKey": "yydqXKJxpCCSqfoUYSgU5JqCwCT8h39m1zPO3ygC93A",
"apiName": "resourceType",
"compatibleResources": {},
"content": {},
"data": "/profileAndServices/profile/",
"filters": {},
"help": "Identified profiles",
"href": "/profileAndServices/profile/metadata",
"label": "Profiles",
"mandatory": false,
"name": "profile",
"pkgStatus": "never",
"readOnly": false,
"schema": "nms:recipient",
"type": "item"
}

In the content node, each field of the profile resource is described. For example, the email field:

"email": {
      "PKey": "@vCTlznJfcV7qup-eGkA9hX6fkJ0e9L6jMGNixfphqFYVLKr4qCvdVJjHREoVxY7Kf-Gi-G07JNMqnemCxJJ3Ym8sn88_QWsTXC57uoW8B91v0Htqo7V105ux76Sa9opG2oLFxQ",
      "apiName": "email",
      "category": "03_emails",
      "dataPolicy": "email",
      "desc": "",
      "displayFormat": "",
      "help": "",
      "label": "Email",
      "lazyLoaded": false,
      "length": "128",
      "mandatory": false,
      "metadata": "attribute",
      "privacy": "firstParty",
      "queryable": true,
      "readOnly": false,
      "resName": "",
      "resType": "string",
      "sortable": true,
      "type": "string"
    }

All of the resources have available metadata accessible with the keyword 'resourceType' in a GET operation.

This operation retrieves profile metadata:

GET /profileAndServices/resourceType/profile

The content node: this is the list of the fields with their characteristics. Refer to this section to view the complete table.

The data node returns the URL to retrieve the associated data.

The filters node returns the URL to retrieve the associated filters. See [Filters]

All other fields are descriptive or internal.

For each field in the content node, we can find the following fields:

If type is completed with the value "link" or "collection", the resTarget value is the name of the resource targeted by the link.

If type is completed with the value "enumeration", a values field is added and each enumeration value are detailed in the values node.

API Reference

Profiles

Name Type Sortable Queryable
PKey string False False
age integer False True
birthDate date False True
blackList boolean False True
blackListEmail boolean False True
blackListFax boolean False True
blackListMobile boolean False True
blackListPhone boolean False True
blackListPostalMail boolean False True
created date False True
cryptedId string False False
domain string False True
email string False True
emailFormat enumeration False True
fax string False True
firstName string False True
gender enumeration False True
lastModified date False True
lastName string False True
location item False True
middleName string False True
mobilePhone string False True
phone string False True
postalAddress item False True
salutation string False True
subscriptions collection True True
thumbnail string False True
title string False False

Filters associated with Profile Resource:

Services

Name Type Sortable Queryable
geoUnit link False True
orgUnit link False True
PKey string False False
appSubscriptions collection False True
builtIn boolean True True
created date True True
desc string True True
end date True True
isTemplate boolean True True
label string True True
lastModified date True True
limitedDuration boolean True True
mainDate date False True
messageType enumeration True True
mobileApps collection False True
mode enumeration True True
name string True True
publicLabel string True True
start date True True
subScenarioEventType string False True
subscriptions collection False True
targetResource string True True
thumbnail string True True
title string False True
unsubScenarioEventType string False True
validityDuration number True True

Filters associated with Service Resource:

GDPR API

The GDPR API groups features that allows the automatic process of GDPR requests. To read global information on Adobe Campaign Standard and GDPR compliance, consult the GDPR getting started.

The GDPR API endpoint is /privacy/privacyTool

PrivacyTool resource description and associated filters are available in the resource metadata. See Metadata Mechanism.

Retrieve information on GDPR request

This GET call allows you to monitor information about a created GDPR request.

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-H "Content-Type: application/json;charset=utf-8" \
"https://mc.adobe.io/<TENANT>/campaign/privacy/privacyTool"

Response to the GET operation:

{
            "PKey": "@sLkPFi1AtCisgIteFznlHpxb2b90ffOBLPiXcjiL66GDEwW4G62hTKiWuIQM6FW8CMviRC4W-sFUJEZJnCgh4aTTM5o",
            "audit": "",
            "created": "2018-03-09 12:28:37.319Z",
            "desc": "",
            "gdprRequestData": {
                "href": "https://mc.adobe.io/tenant/campaign/privacy/privacyTool/@sLkPFi1AtCisgIteFznlHpxb2b90ffOBLPiXcjiL66GDEwW4G62hTKiWuIQM6FW8CMviRC4W-sFUJEZJnCgh4aTTM5o/gdprRequestData/"
            },
            "href": "https://mc.adobe.io/tenant/campaign/privacy/privacyTool/@sLkPFi1AtCisgIteFznlHpxb2b90ffOBLPiXcjiL66GDEwW4G62hTKiWuIQM6FW8CMviRC4W-sFUJEZJnCgh4aTTM5o",
            "label": "Delete customer profile",
            "lastModified": "2018-03-09 12:39:21.232Z",
            "name": "GDPR6",
            "namespace": {
                "PKey": "@RVlWdCr-HbTNtVN5SXdfbVJwVJHPlmPuuk9co3rW5WIfZEvh4G5WRUii4IelXP9QdDDAk9wbNdHKX8ErVk3Heb7bTwS7L6Fd2ZktAqs9roXDccmM",
                "title": "Email (defaultNamespace1)"
            },
            "namespaceName": "defaultNamespace1",
            "reconciliationValue": "customers@adobe.com",
            "retryCount": 0,
            "status": "errorDataNotFound",
            "title": "Delete customer profile (GDPR6)",
            "type": "delete"
        }

The status list description is available in the GDPR getting started.

Create a new GDPR request

Based on an existing namespace, you can create a GDPR request with a POST call.

Learn more about Namespace.

The payload must have the following parameters:

This POST call creates a GDPR request based on a email reconciliation key defined in the namespace AMCDS2:

$curl
-X POST \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-H "Content-Type: application/json;charset=utf-8" \
"https://mc.adobe.io/<TENANT>/campaign/privacy/privacyTool"


{
"name":"PT11832",
"namespaceName": "AMCDS2",
"reconciliationValue": "customers@adobe.com",
"label":"Delete customers",
"type":"delete"
}



Response to the POST operation:

{
    "PKey": "@BFIyt4fECUakAkBniSqSpNoMnZJ-YQP4kLpYIOPqne0xlUDH5C1WPVs3pp8DI8IEp9xkUkbVV1WDSGJbvvK4TIb8MJs",
    "audit": "",
    "created": "2018-03-21 10:41:58.570Z",
    "desc": "",
    "gdprRequestData": {
        "href": "https://mc.adobe.io/tenant/campaign/head/privacyTool/@BFIyt4fECUakAkBniSqSpNoMnZJ-YQP4kLpYIOPqne0xlUDH5C1WPVs3pp8DI8IEp9xkUkbVV1WDSGJbvvK4TIb8MJs/gdprRequestData/"
    },
    "href": "https://mc.adobe.io/tenant/campaign/privacy/privacyTool/@BFIyt4fECUakAkBniSqSpNoMnZJ-YQP4kLpYIOPqne0xlUDH5C1WPVs3pp8DI8IEp9xkUkbVV1WDSGJbvvK4TIb8MJs",
    "label": "Delete customers",
    "lastModified": "2018-03-21 10:41:58.570Z",
    "name": "PT11832",
    "namespace": {
        "PKey": "@Cdq6t_WOoILFRv3XoLcZpo1sWy4vbB-nKFz8tKx3RvZlMApoaMrhT-CPL80IqJj0iwT-0F3U5rBSknaQhKakMwaZPlE",
        "title": "Doc (AMCDS2)"
    },
    "namespaceName": "AMCDS2",
    "reconciliationValue": "customers@adobe.com",
    "retryCount": 0,
    "status": "new",
    "title": "Delete customers (PT11832)",
    "type": "delete"
}

Retrieve GDPR data file

To retrieve the file that contains all the information associated to a reconciliation value, follow this three-steps procedure:

1) Perform a POST call to create a new Request with the type="access", see: Create a new GDRP request

2) Perform a GET call to retrieve completed request information

$curl
-X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-H "Content-Type: application/json;charset=utf-8" \
"https://mc.adobe.io/<TENANT>/campaign/privacy/privacyTool"














3) Perform a POST call on the returned URL available in the gdprRequestData attribute with in the payload the gdpr request internal name. Example: {"name":"PT17"}. See: Create a new GDRP request

The POST call returns the file content

"{data:<gdprRequestData _cs=\" ()\" id=\"8565163\" reconciliationValue=\"'customer@adobe.com'\">\n  <table name=\"nms:recipient\">\n    <row>id='8569152'\n\t\tlastName='customer'\n\t\tfirstName='customer'\n\t\tgender='1'\n\t\temail='customer@adobe.com'\n\t\tcreatedBy-id='8565162'\n\t\tmodifiedBy-id='8565162'\n\t\tlastModified='2018-03-15 13:54:28.708Z'\n\t\tcreated='2018-03-15 13:54:28.708Z'\n\t\tthumbnail='/nl/img/thumbnails/defaultProfil.png'\n\t\temailFormat='2'</row>\n  </table>\n  <table name=\"nms:broadLogRcp\">\n    <row>deliveryLabel='Send via email'\n\t\tdeliveryType='0'\n\t\tcontactDate='2018-03-15 13:58:31.667Z'\n\t\tid='8003'\n\t\taddress='customer@adobe.com'\n\t\tstatus='1'\n\t\tmsg-id='1194'\n\t\teventDate='2018-03-15 13:58:34.726Z'\n\t\tlastModified='2018-03-15 13:59:02.008Z'\n\t\tvariant='default'\n\t\tdelivery-id='8569153'\n\t\tpublicId='1'\n\t\tprofile-id='8569152'</row>\n  </table>\n  <table name=\"nms:trackingLogRcp\">\n    <row>deliveryLabel='Send via email'\n\t\tdeliveryType='0'\n\t\tcontactDate='2018-03-15 13:58:31.667Z'\n\t\turlLabel='Open'\n\t\turlSource=''\n\t\tuserAgent='-1178080215'\n\t\ttrackedDevice='pc'\n\t\tid='5000'\n\t\tlogDate='2018-03-15 14:00:51.650Z'\n\t\tsourceType='html'\n\t\tuserAgent='-1178080215'\n\t\turl-id='1'\n\t\tdelivery-id='8569153'\n\t\tbroadLog-id='8003'\n\t\trecipient-id='8569152'</row>\n    <row>deliveryLabel='Send via email'\n\t\tdeliveryType='0'\n\t\tcontactDate='2018-03-15 13:58:31.667Z'\n\t\turlLabel='Open'\n\t\turlSource=''\n\t\tuserAgent='0'\n\t\ttrackedDevice=''\n\t\tid='6000'\n\t\tlogDate='2018-03-15 16:00:41.110Z'\n\t\tsourceType='html'\n\t\turl-id='1'\n\t\tdelivery-id='8569153'\n\t\tbroadLog-id='8003'\n\t\trecipient-id='8569152'</row>\n  </table>\n</gdprRequestData>}"

See GDPR getting started to read information about the file content.

Transactional Messages API

Introduction

Once you have created an event, you will have to integrate the triggering of this event into your website.

For example, you want a "Cart abandonment" event to be triggered whenever one of your clients leaves your website before purchasing the products in their cart. To do this, your web developer must use the REST Transactional Messages API.

  1. The developer sends a request according to the POST method, which triggers the sending of the transactional event.

  2. The response to the POST operation contains a Primary Key, which allows the developer to send one or multiple requests through a GET operation. This way he is able to obtain the event satus.

Sending a transactional event

Call up URL sample for an Adobe instance and a cart abandonment type event:

https://mc.adobe.io/<TENANT>/campaign/mcAdobe/EVTcartAbandonment

The transactional event is sent through a POST operation with the following URL structure:

POST https://mc.adobe.io/<TENANT>/campaign/<transactionalAPI>/<eventID>

Sample event sent by the POST operation

$curl
-X POST \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-H "Content-Type: application/json;charset=utf-8" \
-H "Content-Length:79" \
"https://mc.adobe.io/<TENANT>/campaign/mcAdobe/EVTcartAbandonment"

{
  "email":"test@example.com",
  "scheduled":"2017-12-01 08:00:00.768Z",
  "expiration":"2017-12-31 08:00:00.768Z",
  "ctx":
  {
    "cartAmount": "$ 125",
    "lastProduct": "Leather motorbike jacket",
    "firstName": "Jack"
  }
}

Response to the POST operation

{
  "PKey":"aXe86Qkq_-OqaAnWN6Q96mOfd0TuO9nxAT09PkAuxEU",
  "ctx":
  {
    "cartAmount": "",
    "lastProduct": "",
    "firstName": ""
  }
  "email":"",
  "scheduled":"2017-12-01 08:00:00.768Z",
  "expiration":"2017-12-31 08:00:00.768Z",
  "href":"mcAdobe/EVTcartAbandonment/aXe86Qkq_-OqaAnWN6Q96mOfd0TuO9nxAT09PkAuxEU",
  "serverUrl":" https://myserver.com ",
  "status":"pending",
  "type":""
}

GET operation to retrieve the event status

$curl
-X GET\
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Cache-Control: no-cache" \
-H "X-Api-Key: <API_KEY>" \
-H "Content-Type: application/json;charset=utf-8" \
-H "Content-Length:79" \
"https://mc.adobe.io/<TENANT>/campaign/mcAdobe/EVTcartAbandonment/aXe86Qkq_-OqaAnWN6Q96mOfd0TuO9nxAT09PkAuxEU"

Response to the GET operation:

{
  "PKey":"aaXe86Qkq_-OqaAnWN6Q96mOfd0TuO9nxAT09PkAuxEU",
  "ctx":
  {
    "cartAmount": "",
    "lastProduct": "",
    "firstName": ""
  }
  "email":"test@example.com",
  "scheduled":"2017-12-01 08:00:00.768Z",
  "expiration":"2017-12-31 08:00:00.768Z",
  "serverUrl":"",
  "status":"pending",
  "type":"EVTcartAbandonment"
}

POST operation header

The request must contain a "Content-Type: application/json" header.

You must add a charset, for example utf-8. Note that this value depends on the REST application you are using.

-X POST \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -H "Cache-Control: no-cache" \ -H "X-Api-Key: <API_KEY>" \ -H "Content-Type: application/json;charset=utf-8" \ -H "Content-Length:79" \

POST operation body

The event data are contained inside the JSON POST body. The event structure depends on its definition. The API preview button in the resource definition screen provides a call sample. Refer to this section.

The following optional parameters can be added to the event content to manage the sending of transactional messages linked to the event:

Response to the POST operation

The POST response returns the transactional event status at the time it was created.

To get its current status (event data, event status...), use the Primary Key returned by this POST response in a GET operation:

GET https://mc.adobe.io/<TENANT>/campaign/<transactionalAPI>/<eventID>/

Transactional event status

In the response, the "status" field allows you to know whether the event has been processed or not:

Workflows and API

Controlling a workflow

Start a workflow

$curl
-X POST https://mc.adobe.io/<TENANT>/campaign/workflow/execution/<workflowID>/commands
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"
-i
-d {"method":"start"}

Stop a workflow

$curl
-X POST https://mc.adobe.io/<TENANT>/campaign/workflow/execution/<workflowID>/commands
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"
-i
-d {"method":"stop"}

You can control a workflow directly from the Rest API, through a POST operation containing the workflow ID and the required execution command:

POST https://mc.adobe.io/<TENANT>/campaign/workflow/execution/<workflowID>/commands

Four execution commands are available to control a workflow:

For more information on the execution commands, refer to this page.

Triggering a Signal activity

GET operation on the workflow:

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/workflow/execution/<workflowInternalName>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

Returns the workflow signal activity and the associated trigger url:

{
"PKey": "@19K_8ZhwSr_6KVriV4X8gw3YThAY-TAjJjV4vHmUiwTm_0kpgzQ-fa3x8KCLfb8FjjR53mJ22GYuLoaHLovKIuxoGXDvHXtuSSrLsbbT5PA9Dkezt6tzIA7hNTAR9oBun6cMHA",
"activities": {
  "activity": {
    "signal1": {
      ...
      "trigger": {
        "href": "/workflow/execution/@19K_8ZhwSr_6KVriV4X8gw3YThAY-TAjJjV4vHmUiwTm_0kpgzQ-fa3x8KCLfb8FjjR53mJ22GYuLoaHLovKIuxoGXDvHXtuSSrLsbbT5PA9Dkezt6tzIA7hNTAR9oBun6cMHA/activities/activity/@19K_8ZhwSr_6KVriV4X8gw3YThAY-TAjJjV4vHmUiwTm_0kpgzQ-fa3x8KCLfb8FjjR53mJ22GYuLoaHLovKIgIFKtEyaPUqUf02xvnDBod6C2DYV0M8pVdXnSo-Xx2RMbKbAeJhFjtO0FUWO6WeouJQMcvkTwRhgdxyQ0nbh_jqAV11/trigger/"
        },
        ...
      }
    }
  }
}

To trigger a signal activity, perform a POST operation on the trigger url:

$curl
  -X POST https://mc.adobe.io/<TENANT>/campaign/workflow/execution/@19K_8ZhwSr_6KVriV4X8gw3YThAY-TAjJjV4vHmUiwTm_0kpgzQ-fa3x8KCLfb8FjjR53mJ22GYuLoaHLovKIuxoGXDvHXtuSSrLsbbT5PA9Dkezt6tzIA7hNTAR9oBun6cMHA/activities/activity/@19K_8ZhwSr_6KVriV4X8gw3YThAY-TAjJjV4vHmUiwTm_0kpgzQ-fa3x8KCLfb8FjjR53mJ22GYuLoaHLovKIgIFKtEyaPUqUf02xvnDBod6C2DYV0M8pVdXnSo-Xx2RMbKbAeJhFjtO0FUWO6WeouJQMcvkTwRhgdxyQ0nbh_jqAV11/trigger
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"
-i
-d {"source":"theSource"}

In an Adobe Campaign Standard workflow, there can be one or more Signal activities. The Signal activities are 'listeners' that wait to be triggered. A detailed documentation on the Signal activity is accessible in this section.

To trigger the signal activity:

  1. Perform a GET operation on the workflow in order to retrieve the signal activity trigger url.

GET https://mc.adobe.io/<TENANT>/campaign/workflow/execution/<workflowInternalName>

2. Perform a POST operation on the returned url to trigger the signal activity.

Quick Starts

How to create a profile?

$curl
-X POST https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"
-i
-d {"email":"test@adobe.com"}

This action can be done with a simple POST operation on the profile resource. By default, the submitted payload is in a JSON format.

By default with a simple POST operation, it's possible to create duplicate entries in the Standard database.

If you want to manage duplicates entries you have to extend the profile resource with a new field. This new field must have the type 'key'.

Then you should perform the POST operation on this new field. If the key already exists in the Standard database, the record will not be created.

How to update an email recipient?

$curl
-X PATCH https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<PROFILE_PKEY>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"
-i
-d "{"mobilePhone":"0102030405"}"

This action can be done with a PATCH operation on the profile resource. The payload contains the list of fields to update in a JSON format. The Primary Key of the profile must be integrated to the called URL.

If the profile resource has been extended with a business ID field, you can use it as key instead of the Primary Key. For more information, consult this section.

How to list all profiles?

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

This action can be done with a GET operation on the profile resource. You can add some filters, ordering and pagination. To read more information on these parameters, consult the respective sections: Filtering, Sorting and Pagination.

How to list the profiles subscribed to a service ?

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service/
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

Answer contains the subscription url

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service/<LINK_IDENTIFIER>/subscriptions/
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

This is a two-steps procedure.

  1. First, you need to retrieve the URL of the subscriptions and then perform a GET operation on the subscriptions collection.

  2. The second GET operation will return the list of the available services.

How to perform a profile subscription? (Method n°1)

Retrieve the subscription URL for a given profile

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<PROFILE_PKEY>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

Then retrieve the Primary Key of a service

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

then update the profile subscription URL with service Primary Key inside the payload.

$curl
-X POST https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<PROFILE_>/subscriptions
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"
-i
-d "{"service":{"PKey":"@so2OIDjwhzTn8WebURgqQBRQAkbWqvvmg7Gi5KLUtb40-aewGugmZ8Y_RdzSNMmNuFKoevO_DMDjUDbaUa7rn280rn8"}}"

The POST operation returns the updated profile with the service node completed

{
  "PKey": "@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZXEGAgeA9x1lrtDqd4nlEZ_Op8ADEy5Mnd-81S8PneTZTU-pHfeXKrdvlKHGzuPzzf058oq_-o3w7uNpKX6rMzc1rmyGA",
  "created": "2017-03-03 10:50:55.621Z",
  "email": "",
  "expirationDate": "",
  "href": "/profileAndServices/profile/@ErI2qvtJeKgoTt8sgCkkX6NGhjiOSnX4REgvkGU08oNvMsHe-tw314YvJa3R9JEMQvCy1J0Al0W34vRva6iRWoeUte0/subscriptions/@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZXEGAgeA9x1lrtDqd4nlEZ_Op8ADEy5Mnd-81S8PneTZTU-pHfeXKrdvlKHGzuPzzf058oq_-o3w7uNpKX6rMzc1rmyGA",
  "mobilePhone": "",
  "service": {
    "PKey": "@HbXlQ9tWWjk_O49diRgL146NMSERTz1U8OJr7PPdTYvL4wVAOkTuDmGuJlnCUa368_DQchC97rdcooX0mIiplxXuxXT9xfoF1xYDDCrYu546taQb",
    "title": "Sport Newsletter (SVC1)"
  },
  "serviceName": "",
  "subscriber": {
    "PKey": "@NqAgOby4EoGCAV0JZvdvcIjnMUtNeoIoT2N5iRonOsPNnYL9kkNcg2cDYUfqUx-s6kH23IvKGPOQdQZI1V9PBw_k_5faL0YQQ4INfrMGJGqKk_Ko",
    "title": "Test Profile (test@adobe.com)"
  },
  "title": ""
}

The first method starts from a Profile and the action consists to add a subscription to this profile for a given service. Follow the steps on the right panel.

How to perform a profile subscription? (Method n°2)

First, you need to retrieve the Primary Key of a profile.

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

Then retrieve the service endpoint URL.

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

It returns the subscription URL:

...

      "subscriptions": {
        "href": "/profileAndServices/service/@so2OIDjwhzTn8WebURgqQBRQAkbWqvvmg7Gi5KLUtb6_GuN766u3vhMiiYOssx-1L9gEidPkNl-mcgR-_QbPe22dSkc/subscriptions/"
      },
...

And then, make a POST operation on the service endpoint with the Primary Key value in the payload.

$curl
-X POST https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service/@so2OIDjwhzTn8WebURgqQBRQAkbWqvvmg7Gi5KLUtb6_GuN766u3vhMiiYOssx-1L9gEidPkNl-mcgR-_QbPe22dSkc/subscriptions/
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"
-i
-d "{"subscriber":{"PKey": "<Profile_>"}}"

It returns:

{
  "PKey": "@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZXnHIyLN97QA7bPi1Udci7e48Gj_jES1eqyP2x_OxAgz4LUiXGwQ0cawUWxxhYrd5n1yeiGy-QuiDmjUPhIFWxhKA13uQ",
  "created": "2017-03-15 08:32:01.847Z",
  "email": "",
  "expirationDate": "",
  "href": "/profileAndServices/service/@so2OIDjwhzTn8WebURgqQBRQAkbWqvvmg7Gi5KLUtb6_GuN766u3vhMiiYOssx-1L9gEidPkNl-mcgR-_QbPe22dSkc/subscriptions/@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZXnHIyLN97QA7bPi1Udci7e48Gj_jES1eqyP2x_OxAgz4LUiXGwQ0cawUWxxhYrd5n1yeiGy-QuiDmjUPhIFWxhKA13uQ",
  "mobilePhone": "",
  "service": {
    "PKey": "@HbXlQ9tWWjk_O49diRgL146NMSERTz1U8OJr7PPdTYvL4wVAOkTuDmGuJlnCUa368_DQchC97rdcooX0mIiplxXuxXT9xfoF1xYDDCrYu546taQb",
    "title": "Sport Newsletter (SVC1)"
  },
  "serviceName": "",
  "subscriber": {
    "PKey": "@NqAgOby4EoGCAV0JZvdvcOVBZgAOwLgF_9CqofQz7EhLQi3MJPmoMBTqBUklC4P-AWa5RvnTFfhtHulNUu22NOzONwtmtNU8b_8L3vSIaV423YLB",
    "title": "Test  ()",
  },
  "title": ""
}

The second method is to add a subscription to a service for a given profile. You can also follow the steps in the right panel to execute this action.

How to retrieve the list of subscriptions for a profile?

Retrieve a profile record

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<PROFILE_>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

Execute a GET on the subscriptions href returned.

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service/<LINK_IDENTIFIER>/subscriptions/
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

It returns the list of subscriptions for a given profile:

{
  "content": [
    {
      "PKey": "@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZU0AQhqL67dllT2XEXPbKkaXmu9zJQRYt5X0fWlsTqJFQjv0PeI1O_BfVCRNuA9AwvcR6Tf6mwbeh3FCYybGOAM0X1VyQ",
      "created": "2017-03-03 10:54:00.363Z",
      "email": "",
      "expirationDate": "",
      "href": "/profileAndServices/profile/@ErI2qvtJeKgoTt8sgCkkX6NGhjiOSnX4REgvkGU08oNvMsHe-tw314YvJa3R9JEMQvCy1J0Al0W34vRva6iRWoeUte0/subscriptions/@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZU0AQhqL67dllT2XEXPbKkaXmu9zJQRYt5X0fWlsTqJFQjv0PeI1O_BfVCRNuA9AwvcR6Tf6mwbeh3FCYybGOAM0X1VyQ",
      "metadata": "subscription",
      "mobilePhone": "",
      "service": {
        "PKey": "@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
        "href": "/profileAndServices/service/@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
        "label": "Sport Newsletter",
        "name": "SVC1",
        "title": "Sport Newsletter (SVC1)",
      },
      "serviceName": "SVC1",
      "subscriber": {
        "PKey": "@ErI2qvtJeKgoTt8sgCkkXzYkOR7UWa1D6RKGWCSXtnmtxYO6A_7sE68TV15UqVhfozzWiNSa4cxHTNJ9tGlNggli5yg",
        "email": "demo@adobe.com",
        "firstName": "Demo",
        "href": "/profileAndServices/profile/@ErI2qvtJeKgoTt8sgCkkXzYkOR7UWa1D6RKGWCSXtnmtxYO6A_7sE68TV15UqVhfozzWiNSa4cxHTNJ9tGlNggli5yg",
        "lastName": "Demo",
        "title": "Demo Demo (demo@adobe.com)",
      },
      "title": "Sport Newsletter (SVC1) / Demo Demo (demo@adobe.com)"
    }
  ],
  "count": {
    "href": "/profileAndServices/profile/@ErI2qvtJeKgoTt8sgCkkX6NGhjiOSnX4REgvkGU08oNvMsHe-tw314YvJa3R9JEMQvCy1J0Al0W34vRva6iRWoeUte0/subscriptions/_count?_lineStart=@QOvMafjR1qavxAfSzQd2fkdMfqyxebvd-kTnoCsZqyD1TTfo",
    "value": 1
  },
  "serverSidePagination": true
}

This is a two-steps procedure. First, you need to retrieve the URL of the subscriptions for a given profile and then perform a GET operation on the subscriptions collection. The second GET operation will return the list of the subscriptions for a profile.

How to delete a profile subscription for a specific service?

Retrieve a profile record

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<PROFILE_>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

Execute a GET on the subscriptions href returned.

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service/<LINK_IDENTIFIER>/subscriptions/
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

It returns the list of subscriptions for a given profile:

...
"service": {
  "PKey": "@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
  "href": "/profileAndServices/service/@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
  "label": "Sport Newsletter",
  "name": "SVC1",
  "title": "Sport Newsletter (SVC1)"
},
...

Execute a DELETE on the desired service href:

$curl
-X DELETE https://mc.adobe.io/<TENANT>/campaign/profileAndServices/service/<LINK_IDENTIFIER>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

This is a three-steps procedure. First you need to retrieve the URL of the subscriptions for a given profile. Then a second GET operation on the subscriptions collection. And finally, a DELETE operation on the selected service URL.

If the delete operation is successful, the response status is 204 No Content.

How to delete a service subscription for a specific profile?

Retrieve a profile record

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<PROFILE_>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

Execute a GET on the subscriptions href returned.

$curl
-X GET https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<LINK_IDENTIFIER>/subscriptions/
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

It returns the list of subscriptions for a given profile (@href):

"content": [
    {
        "PKey": "@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZU0AQhqL67dllT2XEXPbKkaXmu9zJQRYt5X0fWlsTqJFQjv0PeI1O_BfVCRNuA9AwvcR6Tf6mwbeh3FCYybGOAM0X1VyQ",
        "created": "2017-10-20 14:15:59.165Z",
        "email": "",
        "expirationDate": "",
        "href": "/profileAndServices/profile/@ErI2qvtJeKgoTt8sgCkkX6NGhjiOSnX4REgvkGU08oNvMsHe-tw314YvJa3R9JEMQvCy1J0Al0W34vRva6iRWoeUte0/subscriptions/@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZU0AQhqL67dllT2XEXPbKkaXmu9zJQRYt5X0fWlsTqJFQjv0PeI1O_BfVCRNuA9AwvcR6Tf6mwbeh3FCYybGOAM0X1VyQ",
        "metadata": "subscription",
        "mobilePhone": "",
        "service": {
          ...
        }
        ...
      }
]

Execute a DELETE on the desired service href:

$curl
-X DELETE https://mc.adobe.io/<TENANT>/campaign/profileAndServices/profile/<LINK_IDENTIFIER>
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Cache-Control: no-cache"
-H "X-Api-Key: <API_KEY>"

This is a three-steps procedure. First you need to retrieve the URL of the profile and then performs a GET operation on the subscriptions collection for a given profile. Finally, perform a DELETE operation on the subscription endpoint returned by the second GET operation.

If the delete operation is successful, the response status is 204 No Content.

Troubleshooting

You can only create API Keys for the IMS organizations you are admin of. If this message is displayed and you want to create API Keys and you want to ask one of the administrator of the IMS organization.

$curl
-X GET
-H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-H "Cache-Control: no-cache"
-H "X-Api-Key:xxxxxxxxxxxxxxxxxxxxxxxxxx"
"https://mc.adobe.io/{tenant_id}/campaign/profileAndServices/profile"

Returns the following error:

{"error_code":"403023","message":"Profile is not valid"}

Check your IMS profile with this request:

$curl
-X "GET" \
-H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Cache-Control: no-cache" "https://ims-na1.adobelogin.com/ims/profile/v1"

And in the response, the tenant_id value must be the same in your first GET operation:

{
  "countryCode": "FR",
  "mrktPermEmail": null,
  "projectedProductContext": [
    {
    "prodCtx": {
      "statusCode": "ACTIVE",
      "geo": "emea",
      "ident": "ZQ9FRQK7BF09YXAESFY9DDQP1G",
      "modDts": 1448307260000,
      "tenant_id": "actest",
      "owningEntity": "6096892F54B5819E0A4C98A2@AdobeOrg",
      "serviceCode": "dma_tartan",
      "label": "Adobe Marketing Cloud",
      "serviceLevel": "standard",
      "createDts": 1421181343000,
      "deal_id": " "
      }
    }
  ]
}

This means that there is an issue with the IMS provisioning of your specific Campaign product: the IMS team needs to fix it.

To get more details you can call the IMS API with your token to see what your IMS profile looks like: You need to have a prodCtx where the tenant_id is the same as the one you put in you URL for Adobe.io to be able to route your request. If it is missing the IMS provisioning needs to be fixed.












































Adobe.io declares your unvalid URI: most likely the URI you are requesting is not valid. On Adobe.io when you select the Campaign service you get a picker with a list of possible tenant-ids. You need to check that the one you choose is the one you put in your URL.

Either your token is invalid (improper IMS call used to generate a token) or your token has expired.

Depending on the instance configuration, the created profile needs to be associated to an orgUnit and an geoUnit. To understand how to add these fields in your creation, consult this section.