NAV Navbar
Logo

Adobe Campaign Standard documentation
JSON collection

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:

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.

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

v1.6

v1.5

v1.4

v1.3

v1.2

v1.1

Why using Campaign Standard APIs?

Sign up landing pages provide a way for customers or prospects to register their name and email address. Once ACS captures the profile information and preferences, Campaign Standard can send personalized messages based on the person’s interests. They are built with the elements below:

  1. A registration form with campaign API listeners.

alt text

  1. Custom actions to be taken based on checkboxes. A customer selecting “Email Special Offers” would be sent a different custom mail with a gift coupon compared to normal registration process.

alt text

  1. A profile may change their details after clicking the “Update Details” link in the email. This brings the profile to the “Update your Profile and Preference Details” page. To perform the operation, the profile details (Pkey) are passed to the Campaign server and the profile is retrieved and represented. Once the profile clicks the “Update” button, the information is updated into the system (via a PATCH command).

alt text

Adobe Campaign Standard provides APIs which allow existing systems to integrate with the ACS platform to solve real-world problems in real-time.

Public websites like the sign-up or opt-out page need to connect to backend systems to store profile information. Backend systems like Adobe Campaign have the flexibility and power to ingest profile data into and to perform custom operations on it.

Here are some examples:

Use cases

Below are examples of operations you can carry out using Campaign Standard APIs. Each use case is detailed in this documentation through a step-by-step process.

Profiles

Subscriptions

Marketing history

GDPR

Transactional messaging

Workflows

Ready-to-use requests collection

alt text

A collection of requests is available to help you familiarize yourself with Campaign Standard APIs requests. This collection in JSON format provides pre-designed API requests representing common use cases.

The steps below describe a step-by-step use case to import and use the collection to create a profile in Campaign Standard database.

  1. Download the JSON collection by clicking here.

  2. Open Postman, then select the File / Import menu.

  3. Drag and drop the downloaded file into the window. Pre-designed API requests display, ready to be used.

alt text















4. Select the Creating a profile request, then update the POST request and the Headers tab with your own information (<ORGANIZATION>, <API_KEY>, <ACCESS_TOKEN>). For more on this, refer to this section.

alt text


























5. Fill in the Body tab with the information you want to add to the new profile, then click the Send button to execute the request.

alt text





























6. Once an object created, a primary key (PKey) is associated to it. It is visible in the resquest response, as well as other attributes.

alt text



























7. Open your Campaign Standard instance, then check that the profile is created, with all the information from the payload.

Must read

Technical requirements

Primary keys & collection URLs

API identifiers

$curl  
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

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 the Adobe IO documentation.

  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 request. This Access Token will have to be used in each header of your API requests.

Global Concepts

Url Patterns

Collections of resources are available using the following URL type:

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

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

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

Resources Representation

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

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, four main resources are available:

Metadata mechanism

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

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 request.

This request retrieves profile metadata:

GET /profileAndServices/resourceType/profile

The content node: this is the list of the fields with their characteristics.

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.

Primary Key

Retrieve the subscriptions for a profile using a business ID.

$curl  
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/profile/<businessID> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Perform a GET request on the subscriptions URL returned.

$curl  
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/<SUBSCRIPTION_URL> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the list of subscriptions for the profile.

"service": {
  "PKey": "@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
  "href": "/profileAndServices/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 https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/<resourceName> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Sample GET request on a record.

$curl  
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/<resourceName>/[$PKey] \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Sample POST request.

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

Sample PATCH request.

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

Sample DELETE request.

$curl
-X DELETE https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/<resourceName>/[$PKey] \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Custom resources

Sample GET request to access custom resources collections.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \

The response returns the list of custom resources linked to the Profile table. You can then use the resources URLs to perform any API task described in this documentation.

{
"apiName": "resourceType",
"cusProduct": {
        "content": {...},
        "data": "/profileAndServicesExt/cusProduct/",
        "help": "Product",
        "href": "/profileAndServicesExt/cusProduct/metadata",
        "name": "cusProduct",
        "type": "collection"
    },
"cusTransaction": {
        "content": {...},
        "data": "/profileAndServicesExt/cusProduct/",
        "help": "Product",
        "href": "/profileAndServicesExt/cusProduct/metadata",
        "name": "cusProduct",
        "type": "collection"
    },
"cusTransactionDetails": {
        "content": {...},
        "data": "/profileAndServicesExt/cusProduct/",
        "help": "Product",
        "href": "/profileAndServicesExt/cusProduct/metadata",
        "name": "cusProduct",
        "type": "collection"
    },
}

Custom resources are accessible via the /profileAndServicesExt endpoint.

You can interact with any of them, as long as they are linked to the Profile table.

For example, let's consider the tables structure below:

alt text

In that case, all resources from the Transaction, TransactionDetails and Product tables are available as long as they are linked to the Profile table.

For more information on database extension, refer to the Campaign documentation:

Data processing

Counting

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

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/byEmail?email=toto@mail.com \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the collection and the count URL. Perform a GET request on the count URL.

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

The response 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 request displaying 2 records.

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

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 https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/email?_order=email&_lineCount=10 \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Response to the request.

{
  "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 https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/email?_order=email%20desc \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Response to the request.

{
  "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 requests 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 https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response 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. The response returns the list of filters for the profile resource and the metadata associated to each filter.

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

Retrieving filters 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 request 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": "/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 request shows how to retrieve the services resources with the type "email".

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

This GET request 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 https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/byText?text=example \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

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

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

Using filters

Filtering can be done with the following request:

GET /profileAndServices/<resourceName>/filterName?filterParam=filterValue

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

GET /profileAndServices/<resourceName>/filter1name/filter2name?filter1param=filter1value&filter2param=filter2value









































This GET request shows how to retrieve the profile resources with transaction amounts of 100$ or more. The 'byAmount' filter has first been defined in the Adobe Campaign Standard interface and linked to a 'Transaction' custom table.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/profile/byAmount?amount_parameter=100 \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Custom filters

If you want to use a custom filter, you have to create and customize it in the Adobe Campaign Standard interface. For more on this, refer to the Campaign documentation.

The custom filter will then have the same behavior as out of the box filters:

GET /profileAndServicesExt/<resourceName>/customFilterName?customFilterparam=customFilterValue


























API Reference

This section provides a full description of the resources available in profileAndServices and profileAndServicesExt. For more information on other resources metadata, perform a GET request with the keyword 'resourceType'. For more on this, refer to this section.

Profile

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 the Profile resource:

For more on filtering, refer to this section.

Service

Name Type Sortable Queryable
PKey string False False
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
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 the Service resource:

For more on filtering, refer to this section.

History

Name Type Sortable Queryable
PKey string False False
age integer True True
birthDate date True True
blackList boolean True True
blackListEmail boolean True True
blackListFax boolean True True
blackListMobile boolean True True
blackListPhone boolean True True
blackListPostalMail boolean True True
blacklistPushnotification boolean True True
countBroadLogEvents integer True True
countSubHistoEvents integer True True
countryIsoA2 string True True
created date True True
email string True True
events collection True True
fax string True True
firstName string True True
gender enumeration True True
isExternal boolean True True
kpisAndChart item True True
lastModified date True True
lastName string True True
location item True True
middleName string True True
minBroadLogEvents date True True
minSubHistoEvents date True True
mobilePhone string True True
phone string True True
preferredLanguage enumeration True True
salutation string True True
thumbnail string True True
timezone enumeration True True
title string True False

Filters associated with the History resource:

For more on filtering, refer to this section.

orgUnitBase

Name Type Sortable Queryable
PKey string False False
created date True True
desc string True True
label string True True
lastModified date True True
name string True True
parentTitle string True True
title string True False

Filters associated with the orgUnitBase resource:

For more on filtering, refer to this section.

Managing profiles

Retrieving Profiles

Here is a GET request example to retrieve all profiles.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

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

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

The response 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.

Retrieving profiles is performed with a GET request.

You can add some filters, ordering and pagination. To read more information on these parameters, consult the respective sections: Filtering, Sorting and Pagination.

Fore more information on the GET request, 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 request and the "byEmail" filter.

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

Add the phone number value with a PATCH request on the profile Primary Key.

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

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 request, we use the filter "byEmail". To know more about filters and how to use them, refer to this section.

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

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

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

Creating Profiles

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile \
-H 'Content-Type: application/json' \
-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 request on the profile resource. By default, the submitted payload is in a JSON format.

By default with a simple POST request, 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 request on this new field. If the key already exists in the Standard database, the record will not be created.

Managing services and subscriptions

Creating a service

Perform a POST request with the desired attributes in the payload.

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
-i
-d {
-d "desc": "service description",
-d "label": "My newsletter",
-d "messageType": "email",
-d "name": "newsletter1",
-d "start": "2019-04-06"
-d }

The response returns the newly created service with its associated PKey and subscriptions URL.

{
  "PKey": "@OpugaVud4NmK96N2GdvhhDFEITnIdP5hSnx2diwsJCvqBJN-lPsC_HpFK1ljoS_HNK_98M1-xWrhqf8DnNHMLsMUa5Y",
  "builtIn": false,
  "created": "2019-04-08 13:50:53.817Z",
  "desc": "service description",
  "end": "",
  "geoUnit": null,
  "href": "/profileAndServicesExt/service/@OpugaVud4NmK96N2GdvhhDFEITnIdP5hSnx2diwsJCvqBJN-lPsC_HpFK1ljoS_HNK_98M1-xWrhqf8DnNHMLsMUa5Y",
  "isExternal": false,
  "isTemplate": false,
  "label": "My newsletter",
  "lastModified": "2019-04-08 13:50:53.818Z",
  "limitedDuration": false,
  "mainDate": "2019-04-06",
  "messageType": "email",
  "mode": "newsletter",
  "name": "newsletter1",
  "orgUnit": null,
  "publicLabel": "",
  "start": "2019-04-06",
  "subScenarioEventType": "",
  "subscriptions": {
    "href": "/profileAndServicesExt/service/@OpugaVud4NmK96N2GdvhhDFEITnIdP5hSnx2diwsJCvqBJN-lPsC_HpFK1ljoS_HNK_98M1-xWrhqf8DnNHMLsMUa5Y/subscriptions/"
    },
  "targetResource": "profile",
  "template": null,
  "thumbnail": "/nl/img/thumbnails/defaultService.png",
  "title": "My newsletter (newsletter1)",
  "unsubScenarioEventType": "",
  "validityDuration": "P10D"
}

Services creation is performed with a POST request on the service resource.

If you want to create the service with specific attributes, add them into the payload. Otherwise, the new service will be created with default ones.

Retrieving subscriptions

Perform a GET request to retrieve the desired service record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<SERVICE_PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the subscriptions URL for the service.

  {
    ...
    "messageType": "email",
    "name": "SVC1",
    "subscriptions": {
                "href": "/profileAndServices/service/@SDF7dqm-2EnzNnrrIo_D2y6npxqh7wpuYaaOUo_96-Wu1BdUzFcsf9-waYFH6bGYZEs0DPRGGJTyy4eycvJILM2D9Ug/subscriptions/"
    },
    ...
  },

Perform a GET request on the subscriptions URL.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/@SDF7dqm-2EnzNnrrIo_D2y6npxqh7wpuYaaOUo_96-Wu1BdUzFcsf9-waYFH6bGYZEs0DPRGGJTyy4eycvJILM2D9Ug/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": "@ZoGlEjWoU1OCr6Wu_glANQcyl7Nm-mkf5tLOcM7vwJ57Sz40E_jvN7OiXoEbEGHg9SonavQ208qzMougRBxVH7qLe9A",
        "email": "",
        "firstName": "John",
        "href": "/profileAndServices/profile/@ZoGlEjWoU1OCr6Wu_glANQcyl7Nm-mkf5tLOcM7vwJ57Sz40E_jvN7OiXoEbEGHg9SonavQ208qzMougRBxVH7qLe9A",
        "lastName": "Doe",
    },
  }

Retrieving the profiles that subscribed to a service

This is a two-steps procedure.

  1. Retrieve the subscriptions URL for the desired service.
  2. Perform a GET request on the subscriptions URL. The response returns the list of subscriptions for the service, with each associated profile.


Retrieve a profile record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PROFILE_PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the subscriptions URL for the profile.

  {
    ...
    "postalAddress":{...},
    "preferredLanguage": "none",
    "subscriptions": {
      "href": "/profileAndServices/profile/@ZoGlEjWoU1OCr6Wu_glANXasjG8E9ZRH7JJbm3zy7DuPF_Ewcr_uzlZ7RFiKqmZJC0Fx4EscwKgwfrzm_XKTYLu2nO8cfbmrP3l9gDpjry-necss/subscriptions/"
    },
    ...
  }

Perform a GET request on the subscriptions URL.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@ZoGlEjWoU1OCr6Wu_glANXasjG8E9ZRH7JJbm3zy7DuPF_Ewcr_uzlZ7RFiKqmZJC0Fx4EscwKgwfrzm_XKTYLu2nO8cfbmrP3l9gDpjry-necss/subscriptions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the list of services to which the profile subscribed.

  {
    ...
    "PKey": "@KYvRaw88wU6xvyY-qAEGjw5S5PkzIgMO10exNTqRzZU0AQhqL67dllT2XEXPbKkaXmu9zJQRYt5X0fWlsTqJFQjv0PeI1O_BfVCRNuA9AwvcR6Tf6mwbeh3FCYybGOAM0X1VyQ",
    "created": "2017-03-03 10:54:00.363Z",
    "service": {
      "PKey": "@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
      "href": "/profileAndServices/service/@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA",
      "label": "Sport Newsletter",
      "name": "SVC1",
      "title": "Sport Newsletter (SVC1)"
    },
    ...
  }



















Retrieving the services to which a profile subscribed

This is a two-steps procedure.

  1. Retrieve the subscriptions URL for a given profile.
  2. Perform a GET request on the URL. The response returns the list of subscriptions for the profile, with each associated service.

Performing Subscriptions

Retrieve the profile record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PROFILE_PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the subscriptions URL for the profile.

  {
    ...
    "postalAddress":{...},
    "preferredLanguage": "none",
    "subscriptions": {
      "href": "/profileAndServices/profile/@ZoGlEjWoU1OCr6Wu_glANXasjG8E9ZRH7JJbm3zy7DuPF_Ewcr_uzlZ7RFiKqmZJC0Fx4EscwKgwfrzm_XKTYLu2nO8cfbmrP3l9gDpjry-necss/subscriptions/"
    },
    ...
  }

Perform a POST request on the subscriptions URL with the desired service Primary Key inside the payload.

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@ZoGlEjWoU1OCr6Wu_glANXasjG8E9ZRH7JJbm3zy7DuPF_Ewcr_uzlZ7RFiKqmZJC0Fx4EscwKgwfrzm_XKTYLu2nO8cfbmrP3l9gDpjry-necss/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":"@HbXlQ9tWWjk_O49diRgL146NMSERTz1U8OJr7PPdTYvL4wVAOkTuDmGuJlnCUa368_DQchC97rdcooX0mIiplxXuxXT9xfoF1xYDDCrYu546taQb"}}'

The response returns the updated profile with the service node completed.

{
  ...
  "service": {
    "PKey": "@HbXlQ9tWWjk_O49diRgL146NMSERTz1U8OJr7PPdTYvL4wVAOkTuDmGuJlnCUa368_DQchC97rdcooX0mIiplxXuxXT9xfoF1xYDDCrYu546taQb",
    "title": "Sport Newsletter (SVC1)"
  },
  "serviceName": "",
  "subscriber": {...},
  ...
}

Method 1

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

Retrieve the service record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<SERVICE_PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the subscriptions URL for the service.

  {
    ...
    "messageType": "email",
    "name": "SVC1",
    "subscriptions": {
                "href": "/profileAndServices/service/@SDF7dqm-2EnzNnrrIo_D2y6npxqh7wpuYaaOUo_96-Wu1BdUzFcsf9-waYFH6bGYZEs0DPRGGJTyy4eycvJILM2D9Ug/subscriptions/"
    },
    ...
  },

Make a POST request on the subscriptions URL with the desired profile Primary Key inside the payload.

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign//profileAndServices/service/@SDF7dqm-2EnzNnrrIo_D2y6npxqh7wpuYaaOUo_96-Wu1BdUzFcsf9-waYFH6bGYZEs0DPRGGJTyy4eycvJILM2D9Ug/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":"@NqAgOby4EoGCAV0JZvdvcOVBZgAOwLgF_9CqofQz7EhLQi3MJPmoMBTqBUklC4P-AWa5RvnTFfhtHulNUu22NOzONwtmtNU8b_8L3vSIaV423YLB"}}'

The response returns the updated service with the subscribers node completed.

{
  ...
  "service": {...},
  "serviceName": "",
  "subscriber": {
    "PKey": "@NqAgOby4EoGCAV0JZvdvcOVBZgAOwLgF_9CqofQz7EhLQi3MJPmoMBTqBUklC4P-AWa5RvnTFfhtHulNUu22NOzONwtmtNU8b_8L3vSIaV423YLB",
    ...
  },
}






































































Method 2

The second method is to add a profile to a service's subscribers. You can follow the steps in the right panel to perform this action.

Deleting Subscriptions

Retrieve the profile record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PROFILE_PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the subscriptions URL for the profile.

  {
    ...
    "postalAddress":{...},
    "preferredLanguage": "none",
    "subscriptions": {
      "href": "/profileAndServices/profile/@ZoGlEjWoU1OCr6Wu_glANXasjG8E9ZRH7JJbm3zy7DuPF_Ewcr_uzlZ7RFiKqmZJC0Fx4EscwKgwfrzm_XKTYLu2nO8cfbmrP3l9gDpjry-necss/subscriptions/"
    },
  }

Perform a GET request on the subscriptions URL.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@ZoGlEjWoU1OCr6Wu_glANXasjG8E9ZRH7JJbm3zy7DuPF_Ewcr_uzlZ7RFiKqmZJC0Fx4EscwKgwfrzm_XKTYLu2nO8cfbmrP3l9gDpjry-necss/subscriptions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the list of subscriptions for the selected profile, with a URL (href) for each subscribed service.

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

Perform a DELETE request on the desired service URL.

$curl
-X DELETE https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/@so2OIDjwhzTn8WebURgqQD-PGbj9Y_DX9fTQWrKpMWGLz0a340snaccbwDVzOwv69wL-gD3IsldzBZyTi0IQ0V3xSJA \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

Deleting a service subscription for a specific profile

This is a three-steps procedure.

  1. Retrieve the subscriptions URL for the desired profile.
  2. Perform a GET request on the subscriptions URL.
  3. Perform a DELETE request on the desired service URL.

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

Retrieve the service record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<SERVICE_PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the subscriptions URL for the service.

{
  ...
  "messageType": "email",
  "mode": "newsletter",
  "name": "SVC3",
  "subScenarioEventType": "subscriptionEvent",
  "subscriptions": {
    "href": "/profileAndServices/service/@UnSL4DvE28SzFMu3BSyS-xB55E6q0UvvG-KMtsux0ceIm3IhspwltwoJGw5HDh_6S0vG9VVEahhXts0yM3o6PipOkis/subscriptions/"
  },
  "targetResource": "profile",
  ...
},

Perform a GET request on the subscriptions URL.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/@UnSL4DvE28SzFMu3BSyS-xB55E6q0UvvG-KMtsux0ceIm3IhspwltwoJGw5HDh_6S0vG9VVEahhXts0yM3o6PipOkis/subscriptions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the list of subscriptions for the selected service, with a URL (href) for each profile subscription.

{ "PKey": "@kaPVdLy8PBdrew9Hj8go6oM5e0X5D3zV53Db9MR67SArHeRwdcuDMXtDetCQO4vs7yg4prLnoAiD7U9ijPjC7SIALDox4DqwcuTL_a77TSBL8d0ubSZoUWtGxYe4nvTOZ-YG4e-bIICgo3LgVO_AfUm6jgk", "created": "2019-03-26 08:58:04.764Z", "email": "", "expirationDate": "", "href": "/profileAndServices/service/@UnSL4DvE28SzFMu3BSyS-xB55E6q0UvvG-KMtsux0ceIm3IhspwltwoJGw5HDh_6S0vG9VVEahhXts0yM3o6PipOkis/subscriptions/@kaPVdLy8PBdrew9Hj8go6oM5e0X5D3zV53Db9MR67SArHeRwdcuDMXtDetCQO4vs7yg4prLnoAiD7U9ijPjC7SIALDox4DqwcuTL_a77TSBL8d0ubSZoUWtGxYe4nvTOZ-YG4e-bIICgo3LgVO_AfUm6jgk", "metadata": "subscriptionRcp", "service": {...}, "serviceName": "SVC3", "subscriber": {...}, ... }

Perform a DELETE request on the desired profile subscription URL.

$curl
-X DELETE https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/@UnSL4DvE28SzFMu3BSyS-xB55E6q0UvvG-KMtsux0ceIm3IhspwltwoJGw5HDh_6S0vG9VVEahhXts0yM3o6PipOkis/subscriptions/@kaPVdLy8PBdrew9Hj8go6oM5e0X5D3zV53Db9MR67SArHeRwdcuDMXtDetCQO4vs7yg4prLnoAiD7U9ijPjC7SIALDox4DqwcuTL_a77TSBL8d0ubSZoUWtGxYe4nvTOZ-YG4e-bIICgo3LgVO_AfUm6jgk \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'























































Deleting a service subscription for a specific profile

This is a three-steps procedure.

  1. Retrieve the desired service and its subscription URL.
  2. Perform a GET request on the subscriptions URL to retrieve all profiles subscriptions.
  3. Perform a DELETE request on the desired profile subscription URL.

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

Interacting with marketing history

Retrieve the profile's marketing history with a GET request.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/History/"@g8RGFsm-BMRTgqt0DBwNhUqbb5Oy7zDKJ0Yb9OyxAXAo1XTnMiX7esgfXeTjQkKudmSjAbAAL28KyiKS9CdL78AK2DM" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The "events" node returns the URL that gives you access to the events on the profile.

$curl
{
    "PKey": "@g8RGFsm-BMRTgqt0DBwNhUqbb5Oy7zDKJ0Yb9OyxAXAo1XTnMiX7esgfXeTjQkKudmSjAbAAL28KyiKS9CdL78AK2DM",
    "age": 45,
    "birthDate": "1972-08-11",
    "blackList": false,
    "blackListEmail": false,
    "blackListFax": false,
    "blackListMobile": false,
    "blackListPhone": false,
    "blackListPostalMail": false,
    "blackListPushnotification": false,
    "countBroadLogEvents": 1,
    "countSubHistoEvents": 0,
    "countryIsoA2": "FR",
    "created": "2018-05-16 23:08:13.006Z",
    "email": "",
    "events": {
        "href": "/profileAndServices/history/@g8RGFsm-BMRTgqt0DBwNhUqbb5Oy7zDKJ0Yb9OyxAXB7xkTM79JeUrBDGksLPix8ZNLDZfQHstQ2-15Zt4rgd-s8a-E5B7bSS8y8fnaeipyMSqbH/events/",
        "metadata": "subHisto"
    },
    "fax": "",
    "firstName": "",
    "gender": "female",
    "isExternal": false,
}

Perform a GET request on the events href returned.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/history/@g8RGFsm-BMRTgqt0DBwNhUqbb5Oy7zDKJ0Yb9OyxAXB7xkTM79JeUrBDGksLPix8ZNLDZfQHstQ2-15Zt4rgd-s8a-E5B7bSS8y8fnaeipyMSqbH/events \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the list of events for the profile with links to mirror pages in the "mirrorPage" node.


    {
      "PKey": "@qTe90Fl7A_4FCSI_HKEa2aOISqjAPrQoK82tARmm0VZoFWYz3fD6kgCSKJjgsP3uVfxRmfe_riOvOFAw41njNqmm45avg1icmLx2wH1NAL5B40k0",
      "category": "email",
      "date": "2018-05-17 08:44:49.366Z",
      "href": "/profileAndServices/history/@g8RGFsm-BMRTgqt0DBwNhUqbb5Oy7zDKJ0Yb9OyxAXB7xkTM79JeUrBDGksLPix8ZNLDZfQHstQ2-15Zt4rgd-s8a-E5B7bSS8y8fnaeipyMSqbH/events/@qTe90Fl7A_4FCSI_HKEa2aOISqjAPrQoK82tARmm0VZoFWYz3fD6kgCSKJjgsP3uVfxRmfe_riOvOFAw41njNqmm45avg1icmLx2wH1NAL5B40k0",      
      "label": "Send via email",
      "metadata": "broadLog",
      "mirrorPage": {
        "href": "/profileAndServices/history/@g8RGFsm-BMRTgqt0DBwNhUqbb5Oy7zDKJ0Yb9OyxAXB7xkTM79JeUrBDGksLPix8ZNLDZfQHstQ2-15Zt4rgd-s8a-E5B7bSS8y8fnaeipyMSqbH/events/@qTe90Fl7A_4FCSI_HKEa2aOISqjAPrQoK82tARmm0VZoFWYz3fD6kgCSKJjgsP3uyd7Cj5nMVW0028sxpEx862i5ReIggfbiq4_67RKal0RY06IqAc9xjUJ8q0tqLi_CiXUTlQ/mirrorPage/"
      },
      "type": "outbound"
    }

The history endpoint lets you interact with a profile's marketing history. This way, you can, for example, easily retrieve the mirror page for a delivery that was sent to a profile. To do this, follow the steps below:

  1. Perform a GET with the history endpoint and the profile's primary key.
    GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/history/<PROFILE_PKEY>

  2. Perform a GET request on the events href returned.
    GET https://mc.adobe.io/<ORGANIZATION>/campaign/<EVENT_URL>

  3. The response returns the list of events for the profile with links to mirror pages in the mirrorPage node.
    "mirrorPage": {"href": "<MIRROR_PAGE_URL"}

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

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

Response to the GET request.

{
            "PKey": "@sLkPFi1AtCisgIteFznlHpxb2b90ffOBLPiXcjiL66GDEwW4G62hTKiWuIQM6FW8CMviRC4W-sFUJEZJnCgh4aTTM5o",
            "audit": "",
            "created": "2018-03-09 12:28:37.319Z",
            "desc": "",
            "gdprRequestData": {
                "href": "https://mc.adobe.io/organization/campaign/privacy/privacyTool/@sLkPFi1AtCisgIteFznlHpxb2b90ffOBLPiXcjiL66GDEwW4G62hTKiWuIQM6FW8CMviRC4W-sFUJEZJnCgh4aTTM5o/gdprRequestData/"
            },
            "href": "https://mc.adobe.io/organization/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"
        }

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

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

Create a new GDPR request

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

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


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

Response to the POST request.

{
    "PKey": "@BFIyt4fECUakAkBniSqSpNoMnZJ-YQP4kLpYIOPqne0xlUDH5C1WPVs3pp8DI8IEp9xkUkbVV1WDSGJbvvK4TIb8MJs",
    "audit": "",
    "created": "2018-03-21 10:41:58.570Z",
    "desc": "",
    "gdprRequestData": {
        "href": "https://mc.adobe.io/organization/campaign/head/privacyTool/@BFIyt4fECUakAkBniSqSpNoMnZJ-YQP4kLpYIOPqne0xlUDH5C1WPVs3pp8DI8IEp9xkUkbVV1WDSGJbvvK4TIb8MJs/gdprRequestData/"
    },
    "href": "https://mc.adobe.io/organization/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"
}

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

Learn more about Namespace.

The payload must have the following parameters:

Retrieve GDPR data file

Create a GDPR request with the type="access" attribute.

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

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

Perform a GET request to retrieve information about the request.

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

The response returns the privacyRequestData attribute with an associated URL.

{
    ...
    "name": "PR2",
    "namespace": {...},
    "namespaceName": "defaultNamespace1",
    "privacyRequestData": {
        "href": "/privacy/privacyTool/@oPZHTzOX8G50him0hmVB7F31tDqpG8MtPpK6fltqBLJUNunayT0SwXnE4Q3d80IzkFJBm5w34XvVwmTBl_lib2V6ZAw/privacyRequestData/"
    },
    "reconciliationValue": "johndoe@mail.com",
    "retryCount": 0,
    "status": "complete",
    "title": "EPR (PR2)",
    "type": "access"
    ...
},

Perform a POST request on the privacyRequestData URL, with the request internal name inside the payload.

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/privacy/privacyTool/@oPZHTzOX8G50him0hmVB7F31tDqpG8MtPpK6fltqBLJUNunayT0SwXnE4Q3d80IzkFJBm5w34XvVwmTBl_lib2V6ZAw/privacyRequestData \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-H 'Content-Type: application/json;charset=utf-8'
-d '{"name": "PR1"}'

The response 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>}"

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

  1. Perform a POST request to create a new request with the attribute type="access", see: Create a new GDPR request.

  2. Perform a GET request to retrieve information about the request.

  3. Retrieve the data file by performing a POST request on the returned privacyRequestData URL, with the GDPR request internal name inside the payload. Example: {"name":"PT17"}. (See Create a new GDRP request).

For more on how to read information from the data file, refer to GDPR Getting Started.

Managing Transactional Messages

About transactional messaging

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 request contains a Primary Key, which allows the developer to send one or multiple requests through a GET request. This way he is able to obtain the event status.

Sending a transactional event

URL example for an Adobe instance and a cart abandonment type event.

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

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

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

The name of the Transactional Messages API endpoint depends on your instance configuration. It corresponds to the value "mc" followed by your personal organization ID . Let's take the example of the Geometrixx company, with "geometrixx" as its organization ID. In that case, the POST request would be:

POST https://mc.adobe.io/geometrixx/campaign/mcgeometrixx/<eventID>

The transactional messages API endpoint is also visible during the API preview.



Perform a POST request to send the event.

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/mcAdobe/EVTcartAbandonment \
-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'

{
  "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 request.

{
  "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":""
}



POST request 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 request 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 request sample. Refer to the Campaign documentation.

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 request

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 request:

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

Transactional event status

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

Managing Workflows

Controlling a workflow

Start a workflow.

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands \
-H 'Content-Type: application/json' \
-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/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands \
-H 'Content-Type: application/json' \
-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 request containing the workflow ID and the required execution command:

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

Four execution commands are available to control a workflow:

For more information on the execution commands, refer to the Campaign documentation.

Triggering a Signal activity

Perform a GET request on the workflow.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response 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 request on the trigger url with the "source". Add the "parameters" attributes if you want to call the workflow with parameters.

$curl
  -X POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/@19K_8ZhwSr_6KVriV4X8gw3YThAY-TAjJjV4vHmUiwTm_0kpgzQ-fa3x8KCLfb8FjjR53mJ22GYuLoaHLovKIuxoGXDvHXtuSSrLsbbT5PA9Dkezt6tzIA7hNTAR9oBun6cMHA/activities/activity/@19K_8ZhwSr_6KVriV4X8gw3YThAY-TAjJjV4vHmUiwTm_0kpgzQ-fa3x8KCLfb8FjjR53mJ22GYuLoaHLovKIgIFKtEyaPUqUf02xvnDBod6C2DYV0M8pVdXnSo-Xx2RMbKbAeJhFjtO0FUWO6WeouJQMcvkTwRhgdxyQ0nbh_jqAV11/trigger \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-i
-d '{
-d "source:":"API",
-d "parameters":{
-d    "audience":"audience",
-d    "email":"anna.varney@mail.com,
-d    "template":"05",
-d    "contentURL":"http://www.adobe.com",
-d    "test":"true",
-d    "segmentCode":"my segment",
-d    "attribute":"2019-04-03 08:17:19.100Z"}
-d  }'

If one of the parameters is not declared in the External signal activity, the POST request returns the error below, indicating which parameter is missing.

RST-360011 An error has occurred - please contact your administrator.
'contentURL' parameter isn't defined in signal activity.
XTK-170006 Unable to parse expression 'HandleTrigger(@name, $(source), $({parameters}))'.
RST-360000 Error while assessing 'HandleTrigger(@name, $(source), $({parameters}))' expression ('xtk:workflow:execution/activities/signal/trigger' resource)

In an Adobe Campaign Standard workflow, there can be one or more External signal activities. These activities are 'listeners' that wait to be triggered.

Campaign Standard APIs let you trigger an External signal activity to call a workflow. The API call can include parameters that will be ingested into the workflow's events variables (an audience name to target, a file name to import, a part of message content, etc.). This way, you can easily integrate your Campaign automations with your external system.

To trigger a workflow, follow the steps below:

  1. Perform a GET request on the workflow to retrieve the External signal activity trigger URL.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>

  2. Perform a POST request on the returned URL to trigger the signal activity, with the "source" parameter in the payload. This attribute is mandatory, it lets you indicate the triggering request source.

If you want to call the workflow with parameters, add them into the payload with the "parameters" attribute. The syntax consists of the parameter's name followed by its value (the following types are supported: string, number, boolean and date/time).

-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/<TRIGGER_URL> -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' \ -i -d { -d "source:":"<SOURCE>", -d "parameters":{ -d "<PARAMETER_NAME":"<PARAMETER_VALUE>", -d "<PARAMETER_NAME":"<PARAMETER_VALUE>", -d "<PARAMETER_NAME":"<PARAMETER_VALUE>", -d "<PARAMETER_NAME":"<PARAMETER_VALUE>" -d } -d }

Managing Organizational Units

The orgUnitBase endpoint lets you interact with Organizational units, enabling you, for example, to update their attributes or update a profile's Organizational unit. For more on Organizational units in Campaign, refer to the Campaign documentation.

The Organizational unit field is added to a profile when extending the profile resource. As a result, remember to always use the profileAndServicesExt endpoint to interact with Geographical units. For more on the profile's resource extension, refer to the Campaign documentation.

Retrieving a profile's Organization unit

Retrieve the profile record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@8s2cgz4Y3DXZQzbowPFW7YrJg7GxC03mPjp_MuaulNVRDe2AbzSHvAT-B6ejT5pCj5Ca-BRu2AMcwjnwL8xfdr_Ic_s \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the orgUnit URL for the profile.

{
  ...
  "orgUnit": {
    "PKey": "@zYV4vIjP1wpBebml6s71hjGiDhs4_gHgbC_UhuJFk8h7XTZxZ5QnZrPnQPEfB__TxwR2ge6sz61D8RR4zvD75CLDZtc",
    "href": "/profileAndServicesExt/orgUnitBase/@zYV4vIjP1wpBebml6s71hjGiDhs4_gHgbC_UhuJFk8h7XTZxZ5QnZrPnQPEfB__TxwR2ge6sz61D8RR4zvD75CLDZtc",
    "title": "All (all)"
    },
  ...
}

Perform a GET request on the URL to retrieve more information.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/@zYV4vIjP1wpBebml6s71hjGiDhs4_gHgbC_UhuJFk8h7XTZxZ5QnZrPnQPEfB__TxwR2ge6sz61D8RR4zvD75CLDZtc \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns the details below.

{
  "PKey": "@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk",
  "created": "2019-04-02 22:36:13.252Z",
  "desc": "",
  "label": "Brand 4",
  "lastModified": "2019-04-03 08:17:19.100Z",
  "name": "brand4",
  "parentTitle": "All (all)",
  "title": "Brand 4 (brand4)"
}
  1. Perform a GET request on the profile PKey to retrieve the orgUnit URL.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/profile/<PROFILE_PKEY>

  2. Perform a GET request on the URL to retrieve more details about the Organizational unit.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/<ORG_UNIT_URL>

Updating a profile's Organizational unit

Retrieve the list of Organizational units.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/orgUnitBase/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns all Organizational units. Retrieve the PKey of the unit to which you want to assign the profile.

{
  "PKey": "@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk",
  "created": "2019-04-02 22:36:13.252Z",
  "desc": "",
  "href": "/profileAndServicesExt/orgUnitBase/@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk",
  "label": "Brand 4",
  "lastModified": "2019-04-03 07:34:56.579Z",
  "name": "brand4",
  "parentTitle": "All (all)",
  "title": "Brand 4 (brand1)"
},

Perform a PATCH request on the profile, with the PKey of the desired Organizational unit in the payload.

$curl
-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@8s2cgz4Y3DXZQzbowPFW7YrJg7GxC03mPjp_MuaulNVRDe2AbzSHvAT-B6ejT5pCj5Ca-BRu2AMcwjnwL8xfdr_Ic_s \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
-i
-d {
-d "orgUnit":{
-d    "PKey":"@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk"
-d  }
-d }
  1. Perform a GET request on the orgUnitBase resource to retrieve the Organizational unit PKey.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/

  2. Perform a PATCH request on the profile PKey, with the desired Organizational unit PKey in the payload.

    PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/profile/<PROFILE_PKEY>
    {
    "orgUnit": {
    "PKey": "@MFGpiPYktSYP49LxAHOLXKk6t4tehPIq2Cj2upGJ4QaGdMINROecOgMBWPHNQT_7qe_PRjB1G7TaPQ0zqgUJ9wAQVlY"
    }
    }

Updating an Organizational unit attributes

Retrieve the list of Organizational units.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/orgUnitBase/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns all Organizational units. Retrieve the PKey of the desired unit.

{
  "PKey": "@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk",
  "created": "2019-04-02 22:36:13.252Z",
  "desc": "",
  "href": "/profileAndServicesExt/orgUnitBase/@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk",
  "label": "Brand 4",
  "lastModified": "2019-04-03 07:34:56.579Z",
  "name": "brand4",
  "parentTitle": "All (all)",
  "title": "Brand 4 (brand1)"
},

Perform a PATCH request on the Organizational unit, with the attributes to update in the payload.

$curl
-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/orgUnitBase/@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
-i
-d {
-d "label":"brand1",
-d "name":"brand1"
-d }
  1. Perform a GET request on the orgUnitBase resource to retrieve the Organizational unit PKey.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/

  2. Perform a PATCH request on the Organizational unit, with the attributes to update in the payload.

    PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/<ORG_UNIT_PKEY>
    {
    "<ATTRIBUTE_NAME>":"<ATTRIBUTE_VALUE>"
    }

Managing Geographical Units

The geoUnitBase endpoint lets you interact with Geographical units, enabling you, for example, to update their attributes or update a profile's Geographcal unit.

The Geographcal unit field is added to a profile when extending the profile resource. As a result, remember to always use the profileAndServicesExt endpoint to interact with Geographical units. For more on the profile's resource extension, refer to the Campaign documentation.

Retrieving a profile's Geographical unit

Retrieve the profile record.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@8s2cgz4Y3DXZQzbowPFW7YrJg7GxC03mPjp_MuaulNVRDe2AbzSHvAT-B6ejT5pCj5Ca-BRu2AMcwjnwL8xfdr_Ic_s \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the geoUnit URL for the profile.

{
  ...
  "geoUnit": {
    "PKey": "@zYV4vIjP1wpBebml6s71hjGiDhs4_gHgbC_UhuJFk8h7XTZxZ5QnZrPnQPEfB__TxwR2ge6sz61D8RR4zvD75CLDZtc",
    "href": "/profileAndServicesExt/orgUnitBase/@zYV4vIjP1wpBebml6s71hjGiDhs4_gHgbC_UhuJFk8h7XTZxZ5QnZrPnQPEfB__TxwR2ge6sz61D8RR4zvD75CLDZtc",
    "title": "All (all)"
    },
  ...
}

Perform a GET request on the URL to retrieve more information.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/geoUnitBase/@zYV4vIjP1wpBebml6s71hjGiDhs4_gHgbC_UhuJFk8h7XTZxZ5QnZrPnQPEfB__TxwR2ge6sz61D8RR4zvD75CLDZtc \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns the details below.

{
  "PKey": "@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk",
  "created": "2019-04-02 22:36:13.252Z",
  "desc": "Default geographical entity (accessible to everyone)",
  "label": "All",
  "lastModified": "2019-04-03 08:17:19.100Z",
  "name": "all",
  "parentTitle": "",
  "title": "All (all)"
}
  1. Perform a GET request on the profile PKey to retrieve the geoUnit URL.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/profile/<PROFILE_PKEY>

  2. Perform a GET request on the URL to retrieve more details about the Geographical unit.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/<GEO_UNIT_URL>

Updating a profile's Geographical unit

Retrieve the list of Geographical units.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/geoUnitBase/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns all Geographical units. Retrieve the PKey of the unit to which you want to assign the profile.

{
 "PKey": "@pEDOODaCO6llPCHjh2Hor6CEcrS97EgGNnF57-COEUBC8nUpSvuwK0s28UJpmp-2av-06NR4wTh6AwGq6fMmp_Rg2fA",
 "created": "2019-04-06 22:36:19.089Z",
 "desc": "",
 "href": "/profileAndServicesExt/geoUnitBase/@pEDOODaCO6llPCHjh2Hor6CEcrS97EgGNnF57-COEUBC8nUpSvuwK0s28UJpmp-2av-06NR4wTh6AwGq6fMmp_Rg2fA",
 "label": "Europe",
 "lastModified": "2019-04-06 22:36:19.086Z",
 "name": "eu",
 "parentTitle": "All (all)",
 "title": "Europe (eu)"
},

Perform a PATCH request on the profile, with the PKey of the desired Geographical unit in the payload.

$curl
-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@8s2cgz4Y3DXZQzbowPFW7YrJg7GxC03mPjp_MuaulNVRDe2AbzSHvAT-B6ejT5pCj5Ca-BRu2AMcwjnwL8xfdr_Ic_s \
-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":"@pEDOODaCO6llPCHjh2Hor6CEcrS97EgGNnF57-COEUBC8nUpSvuwK0s28UJpmp-2av-06NR4wTh6AwGq6fMmp_Rg2fA"
-d  }
-d }
  1. Perform a GET request on the geoUnitBase resource to retrieve the Geographical unit PKey.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/geoUnitBase/

  2. Perform a PATCH request on the profile PKey, with the desired Geographical unit PKey in the payload.

    PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/profile/<PROFILE_PKEY>
    {
    "geoUnit": {
    "PKey": "@MFGpiPYktSYP49LxAHOLXKk6t4tehPIq2Cj2upGJ4QaGdMINROecOgMBWPHNQT_7qe_PRjB1G7TaPQ0zqgUJ9wAQVlY"
    }
    }

Updating a Geographical unit attributes

Retrieve the list of Geographical units.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/geoUnitBase/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns all Geographical units. Retrieve the PKey of the desired unit.

{
 "PKey": "@pEDOODaCO6llPCHjh2Hor6CEcrS97EgGNnF57-COEUBC8nUpSvuwK0s28UJpmp-2av-06NR4wTh6AwGq6fMmp_Rg2fA",
 "created": "2019-04-06 22:36:19.089Z",
 "desc": "",
 "href": "/profileAndServicesExt/geoUnitBase/@pEDOODaCO6llPCHjh2Hor6CEcrS97EgGNnF57-COEUBC8nUpSvuwK0s28UJpmp-2av-06NR4wTh6AwGq6fMmp_Rg2fA",
 "label": "Europe",
 "lastModified": "2019-04-06 22:36:19.086Z",
 "name": "eu",
 "parentTitle": "All (all)",
 "title": "Europe (eu)"
},

Perform a PATCH request on the Geographical unit, with the attributes to update in the payload.

$curl
-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/orgUnitBase/@lmEonuGgkfhPNfVxdiMpUPyDWxZOwSjDj8fHtPbj6K4TY_IEhKkDNXqya5OZMCGEOvnc-P4fN3aMlMbm-_l1RpzbtRk \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
-i
-d {
-d "label":"Asia",
-d "name":"asia"
-d }
  1. Perform a GET request on the geoUnitBase resource to retrieve the Geographical unit PKey.

    GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/

  2. Perform a PATCH request on the Geographical unit, with the attributes to update in the payload.

    PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/geoUnitBase/<GEO_UNIT_PKEY>
    {
    "<ATTRIBUTE_NAME>":"<ATTRIBUTE_VALUE>"
    }

Troubleshooting

$curl
-X GET https://mc.adobe.io/{ORGANIZATION}/campaign/profileAndServices/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

The response returns the following error.

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

Check your IMS profile with this request.

$curl
-X GET https://ims-na1.adobelogin.com/ims/profile/v1 \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

In the response, the ORGANIZATION_ID value must be the same in your first GET request.

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

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.

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 organization_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 organization_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. To understand how to add this field in your creation, consult this section.