/
NUTRINTG Profile API - UPDATE / ADD ELEMENT

NUTRINTG Profile API - UPDATE / ADD ELEMENT

 

General concept:

 

Updating/Adding General: Currently inactive

 

For development purposes:


When to use: in case of adding new or update an existing profile’s data

Method: PUT

Notice:

  • You can update (pass in the query) only the fields that you wish to update, expect:

    • The following attributes must be submitted as part of the Update request unless the value is no longer needed:

      • Prefix

      • FirstName

      • MiddleInit

      • MiddleName

      • LastName

      • Suffix

      • LanguageCode

      • MaritalStatus

      • Gender

      • BirthDate

      • CompanyName

  • In case you wish to update a specific object you need to provide a objectID, example AddressId. In case there is no Id passed, the new instance of the object will be created

  • While updating email / phone, keep in mind that only one object should have value “IsPreferred”:true

  • Profile status is always required to be included in the request body

Endpoint:

Headers:

  • all headers are mandatory:

Accept-Language: en-US (example) // currently not required Authorization: Token acba6c8f-8ce2-43e5-8c67-84eee6aac515 (example) Program-Code: MJNPOL (example) Brand-Org-Code: MJNPOL (example) Source-Account-Number: MJNPOL_c847727d-0b4811135435111112222333345 (example) Content-Type: application/json Account-Source: POLGWTPL (example)

Body:

  • Example body

{ "Status": "A", "FirstName": "BEN", "LastName": "Ehlers", "Emails": [ { "EmailAddress": "22222@dsgfafgsg.com", "IsPreferred": true, "DeliveryStatus": "G" } ], "Phones": [ { "PhoneId": "b34757fe-7726-45e4-aa21-92805fed98a8", "PhoneNumber": "324234324222", "IsPreferred": true, "DeliveryStatus": "G" } ], "Addresses": [ { "AddressLine1":"22222", "AddressLine2":"333334", "CountryCode": "POL", "ChannelCode": "DM", "IsPreferred": true, "DeliveryStatus": "G" } ], "JsonExternalData": { "Children": [], "ProfileSubscriptions": [ { "SubscriptionId": "1f6cd97d-9853-4c43-a370-a7e3d87de203", "ChannelCode": "EM", "OptStatus": true, "JsonExternalData": { "ContactPointValue": "dehlers1000@epsilon.com", "EmailOptFlag": "Y" } } ], "Agreements": [ { "BusinessId": "ab29e611-4c17-453f-8edc-a1f1df059ab8", "RevisionId": "5b96286f1dae7e00012611d9", "ConsentAcceptedInd": true, "ConsentDesc": "Consent Description", "MandatoryInd": false } ] } }

 

Response:

  • Response code: 200

  • Response description: OK

  • Response body: The whole profile data, example:

{ "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "FirstName": "BEN", "SourceFirstName": "BEN", "LastName": "Last", "SourceLastName": "Last", "StdFirstName": "BEN", "StdLastName": "Last", "StdGender": "M", "Addresses": [ { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "AddressId": "b5b9fc87-36cd-4a5d-91a9-280425415bb2", "AddressLine1": "22222", "SourceAddressLine1": "22222", "AddressLine2": "333334", "SourceAddressLine2": "333334", "IndividualAddressId": "08933320-148e-4a62-8ed5-d793c34f8252", "CountryCode": "POL", "SourceCountryCode": "POL", "ChannelCode": "DM", "LocationCode": "O", "IsPreferred": true, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "DoNotStandardize": false, "GlobalAddressId": "59620841080000000017700000000000", "MailScore": "9", "MultiTypeCode": "S", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:28:09.000000Z", "Status": "A", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:18:18.893113Z", "UpdateUser": "RBH_SFMC", "UpdateDate": "2020-01-20T14:28:09.693196Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "AddressId": "db241fe8-1be2-41ea-87d2-159adc9b17fa", "IndividualAddressId": "60907bf3-ccd6-46e0-918c-d59beeb3e537", "ChannelCode": "DM", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "DoNotStandardize": false, "GlobalAddressId": "81087781230000000017700000000000", "MailScore": "9", "MultiTypeCode": "S", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:18:04.000000Z", "UpdateFileId": 0, "UpdateRecordNumber": 1366094919, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-09T09:48:48.821360Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:26:29.254250Z" } ], "Emails": [ { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "EmailId": "e7f11abf-8585-4cab-bf50-d645213e7200", "EmailAddress": "22222@dsgfafgsg.com", "SourceEmailAddress": "22222@dsgfafgsg.com", "ChannelCode": "EM", "LocationCode": "O", "IsPreferred": true, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:28:09.000000Z", "Status": "A", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:28:09.461200Z", "UpdateUser": "RBH_SFMC", "UpdateDate": "2020-01-20T14:28:09.461200Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "EmailId": "60c6a777-0e47-4ece-b8c4-d4408108e855", "EmailAddress": "data_ret_anom_18838124@epsilon.com", "ChannelCode": "EM", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T09:27:30.000000Z", "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:02:35.914038Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:30.887520Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "EmailId": "9f4899b0-1d63-42c3-a680-c577bf2c1c58", "EmailAddress": "data_ret_anom_18838123@epsilon.com", "ChannelCode": "EM", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T09:27:30.000000Z", "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-09T09:48:48.681396Z", "UpdateUser": "RBH_SFMC", "UpdateDate": "2020-01-20T14:28:09.000000Z" } ], "Phones": [ { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "b34757fe-7726-45e4-aa21-92805fed98a8", "PhoneNumber": "324234324222", "SourcePhoneNumber": "324234324222", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": true, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:28:09.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "A", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:19:24.321169Z", "UpdateUser": "RBH_SFMC", "UpdateDate": "2020-01-20T14:28:09.697197Z", "JsonExternalData": { "OrigPreferredInd": "Y" } }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "5c45a71a-4d21-4324-be9b-063834074f97", "PhoneNumber": "ANON_18838127", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:18:04.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:18:04.601438Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "81556318-d81f-47d3-8bc2-035255819c1e", "PhoneNumber": "ANON_18838127", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:05:15.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:05:15.796280Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "9fcd1f7f-add7-4cc1-81aa-78ad319752de", "PhoneNumber": "ANON_18838127", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:08:10.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:08:10.509752Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "e815ec48-9b6e-4eaf-9b3c-943b2f501379", "PhoneNumber": "ANON_18838127", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:12:27.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:12:27.987941Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "3afcdb11-0184-4b29-ae7b-a994dd805f50", "PhoneNumber": "ANON_18838127", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:15:10.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:15:10.263896Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "4fc39adc-b920-4c37-bcc6-db44a482ac6a", "PhoneNumber": "ANON_18838126", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:04:47.000000Z", "UpdateFileId": 0, "UpdateRecordNumber": 1366094919, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-09T09:48:48.681396Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "0e67df35-cb08-42db-9ead-a19281ea39e6", "PhoneNumber": "ANON_18838127", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:15:27.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:15:27.895803Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" }, { "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "PhoneId": "c5027f22-976a-4bdf-9ad2-5d44a609932d", "PhoneNumber": "ANON_18838127", "AcceptsText": false, "ChannelCode": "PH", "LocationCode": "O", "IsPreferred": false, "DeliveryStatus": "G", "DeliveryStatusDescription": "GOOD", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:18:18.000000Z", "CreateFileId": 0, "CreateRecordNumber": 0, "UpdateFileId": 0, "UpdateRecordNumber": 0, "Status": "I", "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-20T14:18:18.722992Z", "UpdateUser": "DATA_RET_ANOM", "UpdateDate": "2020-01-20T09:27:02.874897Z" } ], "ProgramCode": "MJNPOL", "SourceCode": "CRM", "EnrollmentStatus": "A", "JoinDate": "2020-01-09T09:48:48.000000Z", "EnrollChannelCode": "CRM", "TierCode": "MJNPOLTIER1", "TierName": "MJNPOL Default Tier", "IndividualId": 4020009090415, "HouseholdId": "4220010121940", "CardNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "Status": "A", "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "OrigActivityDate": "1/9/2020 9:48:48 AM", "ActivityDate": "2020-01-20T14:28:09.000000Z", "UpdateFileId": 0, "UpdateRecordNumber": 1366094919, "AutoRewardOptInInd": true, "CreateUser": "RBH_SFMC", "CreateDate": "2020-01-09T09:48:48.681396Z", "UpdateUser": "RBH_SFMC", "UpdateDate": "2020-01-20T14:28:09.690167Z", "JsonExternalData": { "Children": [], "ProfileAltIdentifiers": [], "ProfileSubscriptions": [ { "JsonExternalData": { "ContactPointValue": "dehlers1000@epsilon.com", "OptType": "BrandContactPointEmail", "EmailOptFlag": "Y" }, "ProfileId": "1aac55ae-d9ad-4190-847e-bfbf33cd4a25", "SubscriptionId": "1f6cd97d-9853-4c43-a370-a7e3d87de203", "ProfileSubscriptionId": "2729c8f5-a09e-4192-92be-212e220b8286", "ChannelCode": "EM", "OptStatus": true, "AccountSourceCode": "POLGWTPL", "SourceAccountNumber": "MJNPOL_c847727d-0b4811135435111112222333345", "BrandOrgCode": "MJNPOL", "ActivityDate": "2020-01-20T14:28:10.555163Z", "Status": "A" } ], "UtmAttributes": [], "Agreements": [ { "BusinessId": "ab29e611-4c17-453f-8edc-a1f1df059ab8", "RevisionId": "5b96286f1dae7e00012611d9", "ConsentAcceptedInd": true, "ConsentDesc": "Consent Description", "MandatoryInd": false, "ActivityDate": "2020-01-20T14:28:09.000000Z", "Status": "A" } ], "ProfileItemList": [], "Devices": [] } }

Updating/Adding Subscriptions: Currently inactive

For development purposes:


When to use: in case of adding new or update an existing subscription

Method: PUT

Notice:

  • The unique key for Subscriptions is SubscriptionID+ChannelCode (the can be three the same subscriptionIDs with various ChannelCodes

  • If the updated element does not exist (SubscriptionID+ChannelCode combination does not exist), the new subscription will be added to the profile. Otherwise updated field will be updated

Endpoint:

Headers:

  • all headers are mandatory:

Body:

Minimum data payload for each depends on the ChannelCode:

  • for: DM

 

  • for: PH, SM

 

  • for: EM

Response:

  • Response code: 200

  • Response description: OK

  • Response body: Data for updated Subscription, example:

  •  

 

Updating/Adding Survey: Currently inactive

For development purposes:


When to use: in case of adding new or update an existing survey

Method: PUT

Notice:

  • If the updated element does not exist, the new survey will be added to the profile. Otherwise updated field will be updated

Endpoint:

Headers:

  • all headers are mandatory:

Body:

Example data payload:

Response:

  • Response code: 200

  • Response description: OK

  • Response body: Data for updated Survey, example:

    •  

 

Adding Profile Activity: Currently inactive

For development purposes:


When to use: in case of adding new Profile Activity

Method: POST

Notice:

  • Only one activity can be submitted at a time (activities cannot be summited in an array); therefore, if multiple actions are taken in a single session, then multiple activities should be created so as to most accurately capture what happened in the session.

  • There are many ProfileActivity types available to use, they are listed below (example: registration, subscribe

  • The payload and the response vary depending on the ProfileActivity type, for detailed information about payloads for each ProfileActivity type, contact CDP TEAM

  • While this web service is an individual call, it can be used within the following web services:

    • Add Profile

    • Update Profile by ID

    • Update Profile Subscription

    • Update Survey Response

  • Possible ProfileActivities:

Endpoint:

Headers:

  • all headers are mandatory:

Body:

Example data payload :

Response:

  • Response code: 200

  • Response description: OK

  • Response body: Data for added activity, example:

    •  

  • Registration

  • Unregistration

  • Add Child

  • Channel Opt-in

  • Channel Opt-out

  • Edit Profile

  • Edit Child

  • Subscribe

  • Unsubscribe

  • CareGiver Consumer Remove

  • CareGiver/ Consumer Reinstate

  • Child Remove

  • Child Reinstate

  • Sample Request

  • Cancel Sample Request

  • Fulfillment Request

  • Cancel Fulfillment Request

  • Social Review

  • Social Request

  • (take) Survey

  • Promotional Web Click

  • App Login

  • App Login Fail

  • App Photo

  • App Photo Upload

  • App Photo Share

  • App Video Create

  • App Video Share

  • App Bookmark

  • App Voucher Redeem

  • App Product

  • Signed