in SampleCPMProject/Program.cs [83:101]
private static void PatchEmailContactPoint()
{
EmailContactPoint emailContactPoint = new EmailContactPoint()
{
Email = "hellow123@fgh.com",
Country = "US" //Use only ISO 2 char country codes. Any other string will result in HTTP 400
};
emailContactPoint.TopicSettings.Add(new ContactPointTopicSetting
{
TopicId = testTopicId, //Topic ID for which this permission was collected
CultureName = CultureInfo.CurrentCulture.ToString(), //Specify a culture supported by the topic. E.g en-US, fr-FR, fr-CA etc. Communication with the user will be based on this culture;
LastSourceSetDate = DateTime.UtcNow, //The actual time at which this permission was collected. Could be in the past..
OriginalSource = "SampleCPMProject", //Name of this application that collected the consent. Saved for auditing purposes.
State = ContactPointTopicSettingState.OptInExplicit //The permission
});
EmailContactPoint updatedContactPoint = cpmClient.PatchEmailContactPoint(emailContactPoint).Result;
Console.WriteLine(JsonConvert.SerializeObject(updatedContactPoint));
}