Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API is secured by OAuth 2.0 authorization system, thus every call needs to have a token set.
Obtain the token set using NUTRINTG Security Integration Quick Start.

In Profile API access token need to be provided as query parameter example:

https://api.cdp-rb.com/profile?access_token=7695e707-dd6e-4ec6-b040-23151729829b

Metadata

So-called "metadata" should be available in the Epsilon CDP, so that adding data is successful. Also, it should be provided in the content of requests.
If you don't possess it yet, send an email request to CDP Middleware Team (Business Analyst and Project Manager) to add metadata - with at least 3 full business days in advance.
The email request should contain:

  • Website domain
  • Country
  • Language
  • Brand related to the website
  • Platform name (e.g. Husky, Shopify)

Add profile method

Production Service URL: https://api.cdp-rb.com/profile
UAT Service URL: https://api.cdp-rb.com/test/profile
Method: POST
Content-Type: json

Header (metadata mapping for each website can be found here: URL Mapping.xlsx):


Common HTTP Headers

Parameter name
Mandatory
Parameter description
AuthorizationYesAuthorization Token ( from Prerequisites )
Accept-language
Yeslang ISO code - "en-US"
Brand-org-code
Yes→ Metadata
Client-Id
No, but should be provided if available,
since it is required for the Update profile method.
Id of the customer, if available in the source system.
Program-code
Yes→ Metadata (same value as in the "Brand-org-code" field)
Account-source
Yes→ Metadata
SourcecodeYes→ Metadata

Content-Type

Yesexample: application/json
X-Source-Domain
Noexample: 
Required if the profile should be completed with available UTM attributes from Google Analytics

...


Methods:

...

Request Body Creator: Request Body Creator (last file version from: 18.02.2020)

  • check all fields you are interested in, Creator will filter all rows which are required for the successful request based on your selection
  • Detailed instructions in the file

JSON Body is validated in Middleware against profile-payload-schema.json_v06 (check Request Body Creator to find TO-BE request structure and required fields)

Example payload:

Code Block
languagejs
collapsetrue
{
  "Prefix": "Mr.",
  "FirstName": "John",
  "MiddleInit": "Q",
  "LastName": "Doe",
  "Suffix": "III",
  "GlobalOptOut": false,
  "GlobalOptDate": "2015-09-01T12:37:11.3665418Z",
  "GlobalOptSource": "",
  "LanguageCode": "ENG",
  "MaritalStatus": "S",
  "Gender": "M",
  "BirthDate": "1955-06-05T00:00:00Z",
  "CompanyName": "ACME Inc.",
  "Addresses": [
    {
      "AddressLine1": "123 THE RD",
      "AddressLine2": "#3333",
      "AddressLine3": "",
      "City": "IRVING",
      "StateCode": "TX",
      "CountryCode": "USA",
      "PostalCode": "75080",
      "ChannelCode": "DM",
      "IsPreferred": true,
      "DeliveryStatus": "G",
      "DoNotStandardize": false,
      "JsonExternalData": {
        "AddressRemarks": "Gated Entrance"
      }
    }
  ],
  "Emails": [
    {
      "EmailAddress": "dehlers12000@epsilon.com",
      "LocationCode": "H",
      "IsPreferred": true,
      "Status": "A",
      "DeliveryStatus": "G"
    }
  ],
  "Phones": [
    {
      "PhoneNumber": "7815551000",
      "PhoneCountryCode": "CAN",
      "AcceptsText": false,
      "LocationCode": "H",
      "IsPreferred": true,
      "DeliveryStatus": "G",
      "Status": "A",
      "JsonExternalData": {
        "PrefContactTime": "Morning"
      }
    }
  ],
  "SourceCode": "MJNCANWEB",
  "EnrollmentStatus": "A",
  "JoinDate": "2016-09-01T12:37:11.3665418Z",
  "EnrollChannelCode": "WEB",
  "TierCode": "TIER1",
  "ActivityDate": "2016-09-01T12:47:08.6529623Z",
  "JsonExternalData": {
    "GovernmentID": "AB1234569",
    "FullName": "John Q Doe",
    "AgreeToCookiesDate": "2015-09-01T12:07:08.6529623Z",
    "AgreePrivacyPolicyDate": "2015-09-01T12:07:08.6529623Z",
    "AgreeToTermsCondDate": "2015-09-01T12:07:08.6529623Z",
    "Ethnicity": "Chinese",
    "PreSpokenLanguage": "YUE",
    "MomStatus": "EXPERIENCED",
    "ExpectingInd": "N",
    "AgreeSampleReqRules": "2015-09-01T12:07:08.6529623Z",
    "DocumentNumber": "DM1234",
    "Remark": "Lead Info",
    "ThirdPartyConsentInd": "Y",
    "DataSourceCode": "MJIWP",
    "WicStatus": "1",
    "SelfReportedWicFlag": "N",
    "Specialty": "Nothing Special",
    "SubSpecialty": "Nothing Sub Special",
    "ForcedChildGroupId": null,
    "HouseholdSize": 5,
    "UpcBarcode": "1230912123124",
    "AnnualFamilyIncome": "75000",
    "HighestEducationLevel": "Masters",
    "Industry": "Textile",
    "InitialReferrer": "Johnny",
    "IpAddress": "192.168.2.1",
    "Occupation": "Textile Engineer",
    "Children": [
      {
        "BirthDate": "2016-11-01T00:00:00Z",
        "FirstName": "Jeff",
        "MiddleName": "Seth",
        "LastName": "Doe",
        "GenderCode": "M",
        "AdoptionFlag": "N",
        "FosterFlag": "N",
        "CaregiverTypeCode": "FATHER",
        "MultiBirthInd": 1,
        "PrematureBirthFlag": "N",
        "TerritoryCode": "01234",
        "Status": "A",
        "SynonymName": "Jeffery",
        "PreferredBrand": "EEP",
        "PreferredProduct": "Enfagrow Premium 4",
        "ChildEnrollments": [
          {
            "EnrollSubscriptionId": "1d42745c-7eee-4a59-b048-4f5883be6c48",
            "EnrollDate": "2016-11-02T00:00:00Z",
            "EnrollStatus": "Y",
            "Status": "A"
          }
        ]
      },
      {
        "BirthDate": "2015-09-05T00:00:00Z",
        "LastName": "Doe",
        "CaregiverTypeCode": "Father",
        "MultiBirthInd": 2,
        "PrematureBirthFlag": "N",
        "TerritoryCode": "01234",
        "Status": "A",
        "PreferredBrand": "EEP",
        "PreferredProduct": "Enfagrow Premium 4",
        "ChildEnrollments": [
          {
            "EnrollSubscriptionId": "1d42745c-7eee-4a59-b048-4f5883be6c48",
            "EnrollDate": "2016-11-02T00:00:00Z",
            "EnrollStatus": "A",
            "Status": "A"
          }
        ]
      },
      {
        "BirthDate": "2017-01-02T00:00:00Z",
        "CaregiverTypeCode": "Father",
        "MultiBirthInd": 1,
        "Status": "A",
        "PreferredBrand": "NNK",
        "PreferredProduct": "Baby Milk",
        "ChildEnrollments": [
          {
            "EnrollSubscriptionId": "1d42745c-7eee-4a59-b048-4f5883be6c48",
            "EnrollDate": "2016-11-02T00:00:00Z",
            "EnrollStatus": "A",
            "Status": "A"
          }
        ]
      }
    ],
    "ProfileAltIdentifiers": [
      {
        "AltIdentifierTypeCode": "WEB",
        "AltIdentifierId": 55465,
        "AltIdentifierUserName": "dehlers@epsilon.com",
        "AltIdentifierUserDate": "2016-06-15T22:15:27Z",
        "AltIdentifierLastUpdateDate": "2016-06-15T22:15:27Z",
        "Status": "A"
      }
    ],
    "ProfileSubscriptions": [
      {
        "ChannelCode": "EM",
        "SubscriptionId": "1d42745c-7eee-4a59-b048-4f5883be6c48",
        "OptSource": "WebSource",
        "OptStatus": true,
        "BrandOrgCode": "MJNCAN",
        "ActivityDate": "2016-09-05T22:00:40.916004Z",
        "JsonExternalData": {
          "ContactPointValue": "dehlers1000@epsilon.com",
          "EmailOptFlag": "Y"
        }
      },
      {
        "ChannelCode": "PH",
        "SubscriptionId": "ebc00fb5-828a-4014-be44-da597f24bb14",
        "OptSource": "Batch Source",
        "OptStatus": true,
        "BrandOrgCode": "MJNCAN",
        "ActivityDate": "2016-09-05T22:00:40.916004Z",
        "JsonExternalData": {
          "ContactPointValue": "7815556547",
          "PhoneOptFlag": "Y"
        }
      },
      {
        "ChannelCode": "DM",
        "SubscriptionId": "ebc00fb5-828a-4014-be44-da597f24bb14",
        "OptSource": "Web",
        "OptStatus": true,
        "BrandOrgCode": "MJNCAN",
        "ActivityDate": "2016-09-05T22:00:40.916004Z"
      }
    ],
    "SurveyProfileResponse": {
      "SurveyId": "e5t67fb5-22za-6434-b54-da597f243d2s",
      "SurveyResponses": [
        {
          "QuestionId": "9ab48476-4856-4e49-848c-fc2f976454ba",
          "AnswerId": "d059bdd0-606e-4bd9-b483-38329a623f81",
          "SurveyQuestionAnswerId": "0f40b771-b8be-4996-affb-90c513418214",
          "SurveyResponseActionId": "ef1eddc4-71a4-46e2-b19c-82dd0b3aa7fd",
          "SurveyTextResponse": "This is my answer!",
          "ResponseDate": "2016-09-05T22:00:40.916004Z"
        }
      ]
    },
    "Agreements": [
      {
        "ProfileAgreementId": "",
        "BusinessId": "ab29e611-4c17-453f-8edc-a1f1df059ab8",
        "RevisionId": "5ad9d096c7ed860001e8c5bc",
        "ConsentAcceptedInd": "true",
        "ConsentDesc": "Consent Description",
        "MandatoryInd": "false",
        "CustomName": "Johnny",
        "AgreementDate": "2018-05-23 12:29:04",
        "ActivityDate": "2017-07-02T12:37:11.3665418Z",
        "Status": "A",
        "UnmappedAttributes": {
          "MyProperty1": "Property1",
          "MyProperty2": "Property2",
          "MyProperty3": {
            "MyProperty4": "Property4"
          }
        }
      }
    ],
    "UnmappedAttributes": {
      "MyProperty1": "Property1",
      "MyProperty2": " Property2",
      "MyProperty3": {
        "MyProperty4": " Property4"
      }
    },
    "ProfileItemList": [
      {
        "ItemType": "Size",
        "ItemValue": "Medium"
      },
      {
        "ItemType": "Shape",
        "ItemValue": "Square"
      },
      {
        "ItemType": "Color",
        "ItemValue": "Green"
      }
    ],
    "ProfileActivity": {
      "ActivityInput": "",
      "ActivityType": "REGISTRATION",
      "Status": "A",
      "JsonExternalData": {
        "ActivityDate": "2016-09-05T22:00:40.916004Z",
        "SampleRequested": true,
        "Products": [
          {
            "ProductCode": "samplerequestcode123",
            "Quantity": 1
          }
        ]
      }
    },
    "UtmAttributes": [
      {
        "CampaignSource": "google",
        "CampaignMedium": "banner",
        "CampaignName": "EnfamilBegins",
        "CampaignTerm": "baby;food",
        "CampaignContent": "cta-top-banner",
        "ActivityDate": "2016-09-05T22:00:40.916004Z",
        "Status": "A"
      }
    ]
  }
}

...

{"error": "program-code not provided"}

...

  • make sure you use the same values as in the URL Mapping.xlsx ("URL Mapping" tab.

...

{"error": "brand-org-code not provided"}

...

  • make sure you use the same values as in the URL Mapping.xlsx ("URL Mapping" tab.

...

{"error": "account-source not provided"}

...

  • make sure you use the same values as in the URL Mapping.xlsx ("URL Mapping" tab.

...

Go to NUTRINTG Profile API - UPDATE / ADD ELEMENT

Additional responses comparing to Add profile method:

...

{"error": "ClientId field is empty for update profile operation."}

...