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

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

Privacy

Transactional messaging

Workflows

Ready-to-use Postman 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.

Setting up API access

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

Each request must contain the <ORGANIZATION> element. It is your personal ORGANIZATION ID and is provided by Adobe. This parameter has an URL syntax, for example: https://mc.adobe.io/myInstance.adobe.com/campaign/

Each request must contain the parameters below:

alt text


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

Technical requirements

Primary keys & URLs

Resources representation

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile.json \
-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

Endpoints

Here are the available endpoints for Adobe Campaign REST API:


By default, the main resources are available for the profileAndServices and profileAndServicesExt APIs:

Primary Key

Retrieve the subscriptions for a profile using a custom key.

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

It returns the list of subscriptions for the profile.

"service": {
  "PKey": "<PKEY>",
  "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>",
  "label": "Sport Newsletter",
  "name": "SVC1",
  "title": "Sport Newsletter (SVC1)"
}

If the profile resource has been extended with a custom key field, you can use this field as a key instead of the automatic Primary Key generated by Adobe Campaign.

GET /.../profileAndServicesExt/profile/<customKey>

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

It returns the complete description of the profile resource.

{
...
"content": {
  "email": {
      "PKey": "<PKEY>",
      "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"
    },
    ...
    },
"data": "/profileAndServices/profile/",
"filters": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/<PKEY>"
    },
"help": "Identified profiles",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/metadata",
"label": "Profiles",
"mandatory": false,
"name": "profile",
"pkgStatus": "never",
"readOnly": false,
"schema": "nms:recipient",
"type": "item"
}

You can retrieve the resources metadata using 'resourceType' in a GET request.

Here is an example to retrieves the metadata from a resource:

GET /profileAndServices/resourceType/<resourceName>

It returns the main metadata form a resource:

Content: returns the resource's fields. For each field in the content node, we can find the following fields:

Filters: returns the URL to retrieve the associated filters. See Filters

All other fields are descriptive or internal.

GET / POST / PATCH / DELETE verbs

Sample GET request on the profile collection:

$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>'

It returns an array of profiles.


{
    "content": [
        {
            "PKey": "<PKEY>",
            "age": 34,
            ...
        },
        {
            "PKey": "<PKEY>",
            "age": 30,
            ...
        }
      ],
    "count": {
      "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile//_count?_lineStart=@iKTZ2q3IiSEDqZ5Nw1vdoGnQCqF-8DAUJRaVwR9obqqTxhMy"
    },
    "next": {
      "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/?_lineStart=@iKTZ2q3IiSEDqZ5Nw1vdoGnQCqF-8DAUJRaVwR9obqqTxhMy"
    },
    "serverSidePagination": true
}

Sample GET request on a specific profile.

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

It returns the requested profile.

{
    "PKey": "<PKEY>",
    "age": 34,
    "birthDate": "1985-08-17",
    "blackList": false,
    "blackListAllLastModified": "",
    "blackListEmail": false,
    "blackListEmailLastModified": "",
    "blackListFax": false,
    "blackListFaxLastModified": "",
    "blackListLastModified": "",
    "blackListMobile": false,
    "blackListMobileLastModified": "",
    "blackListPhone": false,
    "blackListPhoneLastModified": "",
    "blackListPostalMail": false,
    "blackListPostalMailLastModified": "",
    "blackListPushnotification": false,
    "blackListPushnotificationLastModified": "",
    "created": "2019-09-25 00:19:14.569Z",
    "email": "johndoe@mail.com",
    ...
}

Sample POST request to create a profile.

$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>' \
-d '{"lastName":"Doe"}'

It returns the profile. <!-- returns le profil avec tous les champs par défaut . >


{
    ...
    "gender": "unknown",
    "lastModified": "2019-09-25 08:25:12.234Z",
    "lastName": "Doe",
    ...
}

Sample PATCH request to update a profile.

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

It returns the PKEY and URL to retrieve the updated profile.

{
    "PKey": "<PKEY>",
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>"
}

Sample DELETE request to delete a profile.

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

The request returns a 200 response, confirming that the profile has been deleted.

Available verbs to perform operations on the resources are:

Custom resources

Sample GET request to access the extended profileAndServicesExt resource.

$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>' \

It returns the list of all linked custom resources. 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": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/cusProduct/metadata",
        "name": "cusProduct",
        "type": "collection"
    },
"cusTransaction": {
        "content": {...},
        "data": "/profileAndServicesExt/cusTransaction/",
        "help": "Product",
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/cusTransaction/metadata",
        "name": "cusProduct",
        "type": "collection"
    },
"cusTransactionDetails": {
        "content": {...},
        "data": "/profileAndServicesExt/cusTransactionDetails/",
        "help": "Product",
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/cusTransactionDetails/metadata",
        "name": "cusProduct",
        "type": "collection"
    },
}

Adobe Campaign comes with a pre-defined data model, where data is defined through different resources. You can enrich the data model that is provided by extending the resources to add your own custom fields, such as purchase or product tables.

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

Custom resources are accessible using the /profileAndServicesExt endpoint, and the custom resource name.

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

You can perform any operation with custom resources, 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.

Additional operations

When using the GET verb, you can perform additional operations in order to refine your requests.

To count all the services that have a messageType value equaling to "sms", perform a GET request with the byChannel filter.

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

It returns the services corresponding to the filter in the content node, and the URL to retrieve the number of results in the count node.

{
    "content": [
        {
            ...
            "messageType": "sms",
            "mode": "newsletter",
            "name": "SVC6",
            ...
        },
        {
            ...
            "messageType": "sms",
            "mode": "newsletter",
            "name": "SVC7",
            ...
        },
        ...
    ],
    "count": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/byChannel/_count?channel=sms&_lineStart=@iKTZ2q3IiSEDqZ5Nw1vdoGnQCqF-8DAUJRaVwR9obqqTxhMy"
    },
    "serverSidePagination": true
}

Perform a GET request on the count URL.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/byChannel/_count?channel=sms&_lineStart=@iKTZ2q3IiSEDqZ5Nw1vdoGnQCqF-8DAUJRaVwR9obqqTxhMy \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns the number of results in the "count" attribute.

{
    "count": 26
}

Counting

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

Sample GET request to display 1 record of the profile resource.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile?_lineCount=1 \
-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": [
        {
            "PKey": "<PKEY>",
            "age": 85,
            "birthDate": "1933-10-24",
            ...
        }
    ],
    "count": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile//_count?_lineCount=1&_lineStart=@vnxw2tye3sTSnooV6nR7SMh_y1e-MMtR6FOEOVXjiItJq5XA"
    },
    "next": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/?_lineCount=1&_lineStart=@vnxw2tye3sTSnooV6nR7SMh_y1e-MMtR6FOEOVXjiItJq5XA"
    },
    "serverSidePagination": true
}

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

Always use the URL value returned in the next node to perform a pagination request. The _lineStart request is calculated and must always be used within the URL returned in the next node.




































Sorting

Sample GET request to retrieve emails in the database alphabetically ordered.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/email/email?_order=email \
-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",
    "amy.dakota@mail.com",
    "andrea.johnson@mail.com",
    "audrey.davis@mail.com",
    "barbara.cooper@mail.com",
    "bette.grant@mail.com"
    ...
  ]
  "next": {
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/email?_order=email&_lineStart=@sL3AJfHiOJZzn9Ytm0OSduPdEz_kYoaflOEfSS1N2-ttAfLl"
  }
}

Sample GET request to 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",
    "john.smith@example.com",
    "jody.lucassen@example.com",
    "jade.connor@email.com",
    "dannymars@example.com",
    ...
  ]
}

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

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



































































Filtering

The sample payloads below show how to retrieve the "byText" filter metadata for the "profile" resource.
First perform a GET request on the "profile" 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>'

It returns the URL where the filters are described.

{
"filters": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/<PKEY>/filters/"
    }
  }

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

{
"birthday": {
        "PKey": "@FL-CbDFXbnHbXcVpeCGWL46VXJLn1LqxLMPagt2vz8sCxQ52lvB15KiUaxXkxJYQw-tZXYrgUWG6K8QcB4gxVY9RKoba5bRFY3294YFshDmorRr8",
        "category": "0150_profile",
        "condition": {...},
        "data": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/birthday?type=$value&precision=$value&operator=$value&day=$value&month=$value&includeStart=$value&endDay=$value&endMonth=$value&includeEnd=$value&relativeValue=$value&nextUnitsValue=$value&previousUnitsValue=$value",
        "formType": "webPage",
        "fragmentName": "",
        "label": "Birthday",
        "metadata": {...},
        "resName": "birthday",
        "webPage": "...",
        "webPageName": ""},
    "byEmail": {...},
    "byKeysProfile": {...},
    "byText": {...},
    "profile": {...},
    "subscribers": {...}
}

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

The same metadata structure is available for each filter:














Sample GET request to retrieve the "service" resources with the type "email".

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/byChannel?channel=email \
-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": [
        {
            "PKey": "<PKEY>",
            "builtIn": false,
            "created": "2019-09-25 23:20:35.000Z",
            "desc": "test description",
            "end": "",
            "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/@I_FIiDush4OQPc0mbOVR9USoh36Tt5CsD35lATvQjdWlXrYc0lFkvle2XIwZUbD8GqTVvSp8AfWFUvjkGMe1fPe5nok",
            "isExternal": false,
            "isTemplate": false,
            "label": "QA Marketing Newsletter bjuiwdsod",
            "lastModified": "2019-09-25 23:20:35.000Z",
            "limitedDuration": false,
            "mainDate": "2019-09-25",
            "messageType": "email",
            "mode": "newsletter",
            ...
        },
        {
            "PKey": "<PKEY>",
            "builtIn": false,
            "created": "2019-09-25 23:33:17.488Z",
            "desc": "test description",
            "end": "",
            "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/@wuKK4-SmPSzNZGhQnqSZRYC8affVMqKeqjsr_mmtmW6qG8R5BQqfbrXNaxyBxGVm_Qu6OLHKPLvMHyhyWNLPovWohvU",
            "isExternal": false,
            "isTemplate": false,
            "label": "QA Marketing Newsletter dvsxmzwpg",
            "lastModified": "2019-09-25 23:33:17.488Z",
            "limitedDuration": false,
            "mainDate": "2019-09-25",
            "messageType": "email",
            "mode": "newsletter",
            ...
        },
        ...
    ],
    "count": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service//byChannel/_count?channel=email&_lineStart=@sL3AJfHiOJZzn9Ytm0OSduPdEz_kYoaflOEfSS1N2-ttAfLl",
        "value": 12
    },
    "serverSidePagination": true
}

Sample GET request to retrieve the "profile" resources containing "Doe" 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=Doe \
-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": [
        {
            ...
            "email": "john.doe@mail.com",
            "emailFormat": "unknown",
            "externalId": "",
            "fax": "",
            "firstName": "John",
            "gender": "unknown",
            "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>",
            "isExternal": false,
            "lastModified": "2019-09-26 09:30:52.940Z",
            "lastName": "Doe",
            ...
        }
        ...
    ],
    "count": {...},
    "serverSidePagination": true
}

Sample GET request 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>'

Response to the request.

{
    "content": [
        {
            "PKey": "<PKEY>",
            "builtIn": false,
            "created": "2019-09-26 09:36:01.014Z",
            "desc": "",
            "end": "",
            "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>",
            "isExternal": false,
            "isTemplate": false,
            "label": "sport",
            "lastModified": "2019-09-26 09:36:01.014Z",
            "limitedDuration": false,
            "mainDate": "2019-09-26",
            "messageType": "email",
            "mode": "newsletter",
            "name": "SVC13",
            ...
        }
    ],
    "count": {...},
    "serverSidePagination": true
}

Filtering can be done with the following request:

GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/<resourceName>/by<filterName>?<filterParam>=<filterValue>

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

GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/<resourceName>/<filter1name>/<filter2name>?<filter1param>=<filter1value>&<filter2param>=<filter2value>


















































































































































Sample GET request 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 the "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>'

If you want to use a custom filter, you have to create and customize it in the Adobe Campaign Standard interface.

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

GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/<resourceName>/by<customFilterName>?<customFilterparam>=<customFilterValue>

For more on this, refer to the Campaign Standard documentation:

Managing profiles

Retrieving Profiles

Sample GET request 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>'

Response to the request.

{
    "content": [
        {
            "PKey": "<PKEY>",
            "age": 85,
            "birthDate": "1933-10-24",
            "blackList": false,
            "blackListAllLastModified": "",
            ...
        },
        {...},
        {...},
        {...}
    ],
    "count": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile//_count?_lineStart=@sL3AJfHiOJZzn9Ytm0OSduPdEz_kYoaflOEfSS1N2-ttAfLl"
    },
    "next": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/?_lineStart=@sL3AJfHiOJZzn9Ytm0OSduPdEz_kYoaflOEfSS1N2-ttAfLl"
    },
    "serverSidePagination": true
}

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.

Sample GET request 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>'

It 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": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/email?_lineCount=10&_
    lineStart=@Qy2MRJCS67PFf8soTf4BzF7BXsq1Gbkp_e5lLj1TbE7HJKqc"
  }
}

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

Updating Profiles

Sample GET request to retrieve the profile with the "amy.dakota@mail.com" email address.

$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>'

Response to the request.

{
    "content": [
        {
            ...
            "domain": "mail.com",
            "email": "john.doe@mail.com",
            "emailFormat": "unknown",
            "externalId": "",
            "fax": "",
            "firstName": "",
            "gender": "unknown",
            "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@2v1dr3ZKJveMDhAdh0MPnh9hNQQ93qb7AW6BNVVKknjwXvTZRBAgUqz1SNcB4ZndgjqOofx3BwBZYBftlmObISoM3rs",
            "isExternal": false,
            "lastModified": "2019-09-26 11:49:48.817Z",
            ...
        }
    ],
    "count": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile//byEmail/_count?email=john.doe@mail.com&_lineStart=@sL3AJfHiOJZzn9Ytm0OSduPdEz_kYoaflOEfSS1N2-ttAfLl",
        "value": 1
    },
    "serverSidePagination": true
}

Sample PATCH request to update the "phone" attribute.

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

It returns the PKEY and URL to retrieve the updated profile.

{
    "PKey": "<PKEY>",
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/@2v1dr3ZKJveMDhAdh0MPnh9hNQQ93qb7AW6BNVVKknjwXvTZRBAgUqz1SNcB4ZndgjqOofx3BwBZYBftlmObISoM3rs"
}

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 https://mc.adobe.io/<ORGANIZATION>/campaign/<apiName>/<resourceName>/<PKEY>


To know more about PATCH requests, refer to this section.

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

Creating Profiles

Sample POST request to create a profile with the email "john.doe@mail.com".

$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":"john.doe@mail.com"}'

It returns the newly created profile, with the "john.doe@mail.com" email address.

{
    ...
    "created": "2019-09-26 11:49:48.817Z",
    "cryptedId": "u5e+EEGhALYQwgQJpsEIZy+NYz5KFCHy++ckfwZ+okq05UpQ6mWOP+U/KUh2slJFcwqarw==",
    "domain": "mail.com",
    "email": "john.doe@mail.com",
    "emailFormat": "unknown",
    "externalId": "",
    "fax": "",
    "firstName": "",
    "gender": "unknown",
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/>PKEY>",
    ...
}

This action can be done with a simple POST request on the profile resource.

Managing services and subscriptions

Creating a service

Sample POST request to create a service with specific attributes.

$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 "label": "My newsletter",
-d "messageType": "email",
-d "name": "email_newsletter",
-d "start": "2019-10-06"
-d }

It returns the newly created service with the updates attributes.

{
    "PKey": "<PKEY>",
    "builtIn": false,
    "created": "2019-09-26 12:00:37.005Z",
    "desc": "",
    "end": "",
    "href": "https://mc.adobe.io/<ORGANIZATION>/profileAndServices/service/@NLscZuVHxdVu9rPftvrMWFfR1zRIxQGswSOmGLrK09JTF_iWhB0JCUHEndA_vvy__k9mzOYa5NVkcWDcrK8qGh0wygahX9kRcD44kiWWSEceShn3",
    "isExternal": false,
    "isTemplate": false,
    "label": "My newsletter",
    "lastModified": "2019-09-26 12:00:37.005Z",
    "limitedDuration": false,
    "mainDate": "2019-10-06",
    "messageType": "email",
    "mode": "newsletter",
    "name": "email_newsletter",
    "publicLabel": "",
    "start": "2019-10-06",
    "subScenarioEventType": "",
    "subscriptions": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/profileAndServices/service/@NLscZuVHxdVu9rPftvrMWFfR1zRIxQGswSOmGLrK09JTF_iWhB0JCUHEndA_vvy__k9mzOYa5NVkcWDcrK8qGh0wygahX9kRcD44kiWWSEceShn3/subscriptions/"
    },
    "targetResource": "profile",
    "template": null,
    "thumbnail": "/nl/img/thumbnails/defaultService.png",
    "title": "My newsletter (email_newsletter)",
    "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

Retrieving the profiles that subscribed to a service

The sample payloads below show how to retrieve the profiles that subscribed to a specific service.
First perform a GET request to retrieve the service.

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

It returns the subscriptions URL for the service.

  {
    ...
    "messageType": "email",
    "name": "SVC1",
    "subscriptions": {
                "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>/subscriptions/"
    },
    ...
  },

Perform a GET request on the subscriptions URL.

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

The list of subscriptions for the service displays, with each associated profile.

  {
    ...
    "service": {...},
    "serviceName": "SVC3",
    "subscriber": {
        "PKey": "<PKEY>",
        "email": "",
        "firstName": "John",
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>",
        "lastName": "Doe",
    },
  }

This is a two-steps procedure.

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
































































Retrieving the services to which a profile subscribed

The sample payloads below show how to retrieve a profile and all its subscribed services.
First perform a GET request to retrieve the profile.

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

It returns the subscriptions URL for the profile.

  {
    ...
    "postalAddress":{...},
    "preferredLanguage": "none",
    "subscriptions": {
      "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>/subscriptions/"
    },
    ...
  }

Perform a GET request on the subscriptions URL.

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

It returns the list of services to which the profile subscribed.

  {
    ...
    "PKey": "<PKEY>",
    "created": "2017-03-03 10:54:00.363Z",
    "service": {
      "PKey": "<PKEY>",
      "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>",
      "label": "Sport Newsletter",
      "name": "SVC1",
      "title": "Sport Newsletter (SVC1)"
    },
    ...
  }

This is a two-steps procedure.

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

Performing Subscriptions

Method 1

The sample payloads below show how to subscribe a profile to a service.
First perform a GET request to retrieve the profile.

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

It returns the subscriptions URL for the profile.

  {
    ...
    "postalAddress":{...},
    "preferredLanguage": "none",
    "subscriptions": {
      "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>/subscriptions/"
    },
    ...
  }

Perform a 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/<PKEY>/subscriptions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-i
-d '{"service":{"PKey":"<PKEY>"}}'

It returns the updated profile with the service node completed.

{
  ...
  "service": {
    "PKey": "<PKEY>",
    "title": "Sport Newsletter (SVC1)"
  },
  "serviceName": "",
  "subscriber": {...},
  ...
}

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






































































Method 2

The sample payloads below show how to add a profile to a service's subscribers.


First perform a GET request to retrieve the service.

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

It returns the subscriptions URL for the service.

  {
    ...
    "messageType": "email",
    "name": "SVC1",
    "subscriptions": {
                "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>/subscriptions/"
    },
    ...
  },

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/<PKEY>/subscriptions/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-i
-d '{"subscriber":{"PKey":"<PKEY>"}}'

It returns the updated service with the subscribers node completed.

{
  ...
  "service": {...},
  "serviceName": "",
  "subscriber": {
    "PKey": "<PKEY>",
    ...
  },
}

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

Deleting a service subscription for a specific profile

The sample payloads below show how to unsubscribe a profil from a service.
First perform a GET request to retrieve the profile.

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

It returns the subscriptions URL for the profile.

  {
    ...
    "postalAddress":{...},
    "preferredLanguage": "none",
    "subscriptions": {
      "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>/subscriptions/"
    },
  }

Perform a GET request on the subscriptions URL.

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

It returns the list of subscriptions for the selected profile, with a URL for each subscribed service.

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

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.











































































Deleting a service subscription for a specific profile

Retrieve the service record.

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

It returns the subscriptions URL for the service.

{
  ...
  "messageType": "email",
  "mode": "newsletter",
  "name": "SVC3",
  "subScenarioEventType": "subscriptionEvent",
  "subscriptions": {
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>/subscriptions/"
  },
  "targetResource": "profile",
  ...
},

Perform a GET request on the subscriptions URL.

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

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

{
  "PKey": "<PKEY>",
  "created": "2019-03-26 08:58:04.764Z",
  "email": "",
  "expirationDate": "",
  "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/<PKEY>/subscriptions/<PKEY>",
  "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/<PKEY>/subscriptions/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

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

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


    {
      "PKey": "<PKEY>",
      "category": "email",
      "date": "2018-05-17 08:44:49.366Z",
      "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/history/<PKEY>/events/<PKEY>",
      "label": "Send via email",
      "metadata": "broadLog",
      "mirrorPage": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/history/<PKEY>/events/<PKEY>/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 <EVENT_URL>

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

Privacy management

Campaign Standard APIs provides features that allow the automatic process of requests related to privacy regulations such as GDPR and CCPA.

The actions you can perform are as follows:

The privacy API endpoint is /privacy/privacyTool. PrivacyTool resource description and associated filters are available in the resource metadata. See Metadata Mechanism.

CCPA opt-out is managed using the ccpaOptOut profile attribute.

For more on Adobe Campaign Standard and privacy compliance, refer to the dedicated documentation.

Creating a privacy request

This POST request creates a privacy 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",
"regulation": "gdpr",
"label":"Delete customers",
"type":"delete"
}

Response to the POST request.

{
    "PKey": "<PKEY>",
    "audit": "",
    "created": "2018-03-21 10:41:58.570Z",
    "desc": "",
    "gdprRequestData": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/head/privacyTool/<PKEY>/gdprRequestData/"
    },
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/privacy/privacyTool/<PKEY>",
    "label": "Delete customers",
    "lastModified": "2018-03-21 10:41:58.570Z",
    "name": "PT11832",
    "namespace": {
        "PKey": "<PKEY>",
        "title": "Doc (AMCDS2)"
    },
    "namespaceName": "AMCDS2",
    "reconciliationValue": "customers@adobe.com",
    "regulation": "gdpr",
    "retryCount": 0,
    "status": "new",
    "title": "Delete customers (PT11832)",
    "type": "delete"
}

Privacy requests are created using a POST request.

Before creating requests, you need to define the namespace you will use. For more on this, refer the Privacy management documentation.

The payload must contain the following parameters:

Monitoring a privacy 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": "<PKEY>",
            "audit": "",
            "created": "2018-03-09 12:28:37.319Z",
            "desc": "",
            "gdprRequestData": {
                "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/privacy/privacyTool/<PKEY>/gdprRequestData/"
            },
            "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/privacy/privacyTool/<PKEY>",
            "label": "Delete customer profile",
            "lastModified": "2018-03-09 12:39:21.232Z",
            "name": "GDPR6",
            "namespace": {
                "PKey": "<PKEY>",
                "title": "Email (defaultNamespace1)"
            },
            "namespaceName": "defaultNamespace1",
            "reconciliationValue": "customers@adobe.com",
            "regulation": "gdpr",
            "retryCount": 0,
            "status": "errorDataNotFound",
            "title": "Delete customer profile (GDPR6)",
            "type": "delete"
        }

You can monitor information about a created privacy request using a GET request.

The status list description is available in the Privacy management documentation.

Retrieving a privacy data file

Create a privacy 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",
"regulation": "gdpr",
"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'

It returns the privacyRequestData attribute with an associated URL.

{
    ...
    "name": "PR2",
    "namespace": {...},
    "namespaceName": "defaultNamespace1",
    "privacyRequestData": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/privacy/privacyTool/<PKEY>/privacyRequestData/"
    },
    "reconciliationValue": "johndoe@mail.com",
    "regulation": "gdpr",
    "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/<PKEY>/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"}'

It 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 Creating a new privacy 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 privacy request internal name inside the payload. Example: {"name":"PT17"}. (See Creating a new privacy request).

Managing CCPA opt-out

Sample GET request to retrieve a profile's CCPA opt-out status.

$curl
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profilesAndServices/profile/<PKEY> \
-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": "<PKEY>",
  "ccpaOptOut": false,
  "firstName": "John",
  "lastName": "Doe",
  ...
}

Sample POST request to mark a profile for CCPA opt-out.

$curl
-X POST https://mc.adobe.io/<ORGANIZATION>/campaign/profilesAndServices/profile/ \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-H 'Content-Type: application/json;charset=utf-8'
-i
-d {
-d  "firstName": "John",
-d  "lastName": "Doe",
-d  "email": "jdoe@mail.com",
-d  "ccpaOptOut": true
-d }'

Response to the GET request.

{
    ...
    "email": "john.doe@mail.com",
    "firstName": "John",
    "lastName": "Doe",
    "ccpaOptOut": true,
    ...
}

Sample PATCH request to update a profile for CCPA opt-out.

$curl
-X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profilesAndServices/profile/<PKEY> \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>' \
-H 'Content-Type: application/json;charset=utf-8'
-i
-d {
-d  "ccpaOptOut": true
-d }'

Response to the GET request.

{
    ...
    "email": "john.doe@mail.com",
    "firstName": "John",
    "lastName": "Doe",
    "ccpaOptOut": true,
    ...
}

A profile's CCPA opt-out status can be monitored and managed using the ccpaOptOut profile attribute and the "true" or "false" values:

"ccpaOptOut": <value>

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":"<PKEY>",
  "ctx":
  {
    "cartAmount": "",
    "lastProduct": "",
    "firstName": ""
  }
  "email":"",
  "scheduled":"2017-12-01 08:00:00.768Z",
  "expiration":"2017-12-31 08:00:00.768Z",
  "href": "mcAdobe/EVTcartAbandonment/<PKEY>",
  "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>'

It returns the workflow signal activity and the associated trigger url.

{
"PKey": "<PKEY>",
"activities": {
  "activity": {
    "signal1": {
      ...
      "trigger": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<PKEY>/activities/activity/<PKEY>/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/<PKEY>/activities/activity/<PKEY>/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).

$curl -X POST <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/profileAndServicesExt/profile/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns the orgUnit URL for the profile.

{
  ...
  "orgUnit": {
    "PKey": "<PKEY>",
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/<PKEY>",
    "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/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns the details below.

{
  "PKey": "<PKEY>",
  "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/<PKEY>

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

    GET <ORG_UNIT_URL>

Updating a profile's Organizational unit

Retrieve the list of Organizational units.

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

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

{
  "PKey": "<PKEY>",
  "created": "2019-04-02 22:36:13.252Z",
  "desc": "",
  "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/<PKEY>",
  "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/profileAndServicesExt/profile/<PKEY> \
-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":"<PKEY>"
-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/<PKEY>
    {
    "orgUnit": {
    "PKey": "<PKEY>"
    }
    }

Updating an Organizational unit attributes

Retrieve the list of Organizational units.

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

It returns all Organizational units. Retrieve the PKey of the desired unit.

{
  "PKey": "<PKEY>",
  "created": "2019-04-02 22:36:13.252Z",
  "desc": "",
  "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/<PKEY>",
  "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/profileAndServicesExt/orgUnitBase/<PKEY> \
-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/<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/profileAndServicesExt/profile/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns the geoUnit URL for the profile.

{
  ...
  "geoUnit": {
    "PKey": "@zYV4vIjP1wpBebml6s71hjGiDhs4_gHgbC_UhuJFk8h7XTZxZ5QnZrPnQPEfB__TxwR2ge6sz61D8RR4zvD75CLDZtc<PKEY>",
    "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/orgUnitBase/<PKEY>",
    "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/<PKEY> \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

It returns the details below.

{
  "PKey": "<PKEY>",
  "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/<PKEY>

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

    GET <GEO_UNIT_URL>

Updating a profile's Geographical unit

Retrieve the list of Geographical units.

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

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

{
 "PKey": "<PKEY>",
 "created": "2019-04-06 22:36:19.089Z",
 "desc": "",
 "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/geoUnitBase/<PKEY>",
 "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/profileAndServicesExt/profile/<PKEY> \
-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":"<PKEY>"
-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/<PKEY>
    {
    "geoUnit": {
    "PKey": "<PKEY>"
    }
    }

Updating a Geographical unit attributes

Retrieve the list of Geographical units.

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

It returns all Geographical units. Retrieve the PKey of the desired unit.

{
 "PKey": "<PKEY>",
 "created": "2019-04-06 22:36:19.089Z",
 "desc": "",
 "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServicesExt/geoUnitBase/<PKEY>",
 "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/profileAndServicesExt/orgUnitBase/<PKEY> \
-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/<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>'

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