Below is the description of API for adding and updating the customer profile's data in the Epsilon CDP. Requests are sent to CDP Middleware developed and maintained internally by RB.
Prerequisites
OAuth 2.0
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):
Parameter name | Mandatory | Parameter description |
---|---|---|
Accept-language | Yes | lang 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 |
Sourcecode | Yes | → Metadata |
Content-Type | Yes | example: application/json |
X-Source-Domain | No | example: Required if the profile should be completed with available UTM attributes from Google Analytics |
Body:
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:
Responses:
Response message | description |
---|---|
{"status":"ok" "ClientId": "value"} | Message delivered successfully. Notice that ClientId is the required field for the Update profile method. |
{"error": "program-code not provided"} | "Program-code" field in the Header has the wrong value:
|
{"error": "brand-org-code not provided"} | "Brand-org-code" field in the Header has the wrong value:
|
{"error": "account-source not provided"} | "Account-source" field in the Header has the wrong value:
|
{"error":"Request body is not valid."} | Some of the values provided inside the json body don't meet the above-mentioned criteria. |
{"error": "An internal server error has occurred."} | Internal server error |
Update profile method
Go to NUTRINTG Profile API - UPDATE / ADD ELEMENT
Additional responses comparing to Add profile method:
Response message | description |
---|---|
{"error": "ClientId field is empty for update profile operation."} | Required ClientId field is empty |
Add Comment