NUTRTINTG Profile API - add Profile
Add profile method
Production Service URL: https://api.cdp-rb.com/2/profile
UAT Service URL: https://api.cdp-rb.com/stage/v2/profile
Method: POST
Content-Type: json
Header (metadata mapping for each website can be found here: URL Mapping.xlsx):
Parameter name | Mandatory | Parameter description |
---|---|---|
Authorization | Yes | Authorization Token ( from Prerequisites ) |
Accept-language | Yes | lang ISO code - "en-US" |
Brand-org-code | Yes | → Metadata |
Client-Id | No, but should be provided if available, | Id of the customer, if available in the source system. |
Yes | → Metadata (same value as in the "Brand-org-code" field) | |
Yes | → Metadata | |
Sourcecode | Yes | → Metadata |
Content-Type | Yes | example: application/json |
X-Source-Domain | No | example: http://durex-uk-test-store.myshopify.com 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" | Message delivered successfully. |
{"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 |