[HTTP PATCH] ~/contactLists/{contactListId}/contact

Description: Find all contacts within a given contactlist that match a set of values, then update their properties to given values E.G. Find all contacts with an ReferanceAccountID of 123456 and set their address to "123 Red Street, D1".

Request Information

URI Parameters

NameDescriptionTypeAdditional information
contactListId

The ContactList to look for contacts within

integer

Required

QueryString Parameters

Custom Events

This Endpoint supports executing Custom Events after it Inserts/Updates Contacts.

You can execute custom events by adding a 'customevents' parameter with a comma-seperated list of Custom Event names to the Request's QueryString.

For Example: If you'd like to run the SendWelcomeEmail and SendEventInvite Custom Events with the contacts that have been successfully inserted/updated via this Call, you can do so via:

contactLists/{contactListId}/contact + "?customevents=SendWelcomeEmail,SendEventInvite"

Match Values

This Endpoint supports updating all Contacts within a given ContactList who have properties that match a given set values.

You can specify what values to match on by adding the following to the Request's QueryString:

  • Adding 'match' parameter with a comma-seperated list of the PropertyNames to match on.
  • If using a PATCH call - by Adding each PropertyName and required value to match upon.
  • If using a POST/PUT call, make sure the specified PropertyName is a property of the ContactDTO that's being passed as part of the body.

For Example: If you'd like to update all contacts who have a specific ReferanceAccountId and EmailAddress, you would do so via:

[PATCH] contactLists/{contactListId}/contact + "?match=ReferanceAccountId,Email&ReferanceAccountId=123456&Email=pgannon@customerminds.com"

[PUT] contactLists/{contactListId}/contact + "?match=ReferanceAccountId,Email"
Body: {
  values: {
    "ReferanceAccountId":123456,
    "Email": "pgannon@customerminds.com"
    "Mobile": "353871234567" // Value to be updated
  }
}

Please refer to the given ContactList's Schema/Fields as a list of valid values.

Body Parameters

Contact
NameDescriptionTypeAdditional information
EncContactId

string

None.

ListId

integer

None.

Values

Dictionary of string [key] and Object [value]

None.

Formats

application/json, text/json

Sample:
{
  "EncContactId": "sample string 1",
  "ListId": 2,
  "Values": {
    "sample string 1": {},
    "sample string 3": {}
  }
}

application/csp-report

Sample:
{"EncContactId":"sample string 1","ListId":2,"Values":{"sample string 1":{},"sample string 3":{}}}

application/xml, text/xml

Sample:
<Contact xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/W50API.Models.DTO">
  <EncContactId xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">sample string 1</EncContactId>
  <InUse xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">true</InUse>
  <ListId xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">2</ListId>
  <Values xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
  </Values>
  <contextProvider xmlns:d2p1="http://schemas.datacontract.org/2004/07/W50Common.Model" xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">
    <d2p1:AccountBalances i:nil="true" />
    <d2p1:AccountBalances_Threshold i:nil="true" />
    <d2p1:AccountFeatures i:nil="true" />
    <d2p1:AccountRestrictedIPs i:nil="true" />
    <d2p1:AccountTags i:nil="true" />
    <d2p1:AccountTypes i:nil="true" />
    <d2p1:Accounts i:nil="true" />
    <d2p1:Addresses i:nil="true" />
    <d2p1:AgencyAccounts i:nil="true" />
    <d2p1:ApiActivityLoggingChannels i:nil="true" />
    <d2p1:ApiActivityLoggings i:nil="true" />
    <d2p1:AppConfigs i:nil="true" />
    <d2p1:BookingReservations i:nil="true" />
    <d2p1:BookingResources i:nil="true" />
    <d2p1:BookingSchedules i:nil="true" />
    <d2p1:BookingTimeslots i:nil="true" />
    <d2p1:CampaignActivities i:nil="true" />
    <d2p1:CampaignActivityActionDocuments i:nil="true" />
    <d2p1:CampaignActivityActions i:nil="true" />
    <d2p1:CampaignChannels i:nil="true" />
    <d2p1:CampaignStates i:nil="true" />
    <d2p1:CampaignTags i:nil="true" />
    <d2p1:CampaignTemplates i:nil="true" />
    <d2p1:CampaignTemplatesGroups i:nil="true" />
    <d2p1:Campaigns i:nil="true" />
    <d2p1:CommunicationTypes i:nil="true" />
    <d2p1:ContactConsentAppSettings i:nil="true" />
    <d2p1:ContactConsentFields i:nil="true" />
    <d2p1:ContactConsentStatements i:nil="true" />
    <d2p1:ContactConsents i:nil="true" />
    <d2p1:ContactControls i:nil="true" />
    <d2p1:ContactDataSchemaTypes i:nil="true" />
    <d2p1:ContactDataSchemas i:nil="true" />
    <d2p1:ContactDatas i:nil="true" />
    <d2p1:ContactDevices i:nil="true" />
    <d2p1:ContactFileInformations i:nil="true" />
    <d2p1:ContactSchemaFieldValues i:nil="true" />
    <d2p1:ContactSchemaFields i:nil="true" />
    <d2p1:ContactSchemaUserPins i:nil="true" />
    <d2p1:ContactSchemas i:nil="true" />
    <d2p1:Contacts i:nil="true" />
    <d2p1:Countries i:nil="true" />
    <d2p1:Currencies i:nil="true" />
    <d2p1:CustomAlerts i:nil="true" />
    <d2p1:CustomEvents i:nil="true" />
    <d2p1:CustomServerScripts i:nil="true" />
    <d2p1:DesignerTemplates i:nil="true" />
    <d2p1:EDocumentMergeDocuments i:nil="true" />
    <d2p1:EDocumentReportActivities i:nil="true" />
    <d2p1:EDocumentTracks i:nil="true" />
    <d2p1:EDocuments i:nil="true" />
    <d2p1:EmailAttachments i:nil="true" />
    <d2p1:EmailBrandings i:nil="true" />
    <d2p1:EmailLinks i:nil="true" />
    <d2p1:EmailProviders i:nil="true" />
    <d2p1:EmailReportActivities i:nil="true" />
    <d2p1:Emails i:nil="true" />
    <d2p1:FacebookPages i:nil="true" />
    <d2p1:FacebookUsers i:nil="true" />
    <d2p1:FileManagerAudits i:nil="true" />
    <d2p1:FindContactAPIAudits i:nil="true" />
    <d2p1:FrontendNotifications i:nil="true" />
    <d2p1:InboundTextMessages i:nil="true" />
    <d2p1:Industries i:nil="true" />
    <d2p1:LandingPageChannels i:nil="true" />
    <d2p1:LandingPageLinks i:nil="true" />
    <d2p1:LandingPageReportActivities i:nil="true" />
    <d2p1:LandingPageServiceProviders i:nil="true" />
    <d2p1:LandingPages i:nil="true" />
    <d2p1:LnkAccountPrintServiceProviders i:nil="true" />
    <d2p1:LnkAccountServiceProviderNumbers i:nil="true" />
    <d2p1:Notifications i:nil="true" />
    <d2p1:PaymentMerchants i:nil="true" />
    <d2p1:PaymentPlanTypes i:nil="true" />
    <d2p1:PaymentPlans i:nil="true" />
    <d2p1:PaymentRequestTracks i:nil="true" />
    <d2p1:PaymentTransactionTypes i:nil="true" />
    <d2p1:PaymentTransactions i:nil="true" />
    <d2p1:PermissionGroups i:nil="true" />
    <d2p1:Permissions i:nil="true" />
    <d2p1:PrintProviders i:nil="true" />
    <d2p1:Promotions i:nil="true" />
    <d2p1:RSVPAttendances i:nil="true" />
    <d2p1:RSVPEventActivityReports i:nil="true" />
    <d2p1:RSVPEvents i:nil="true" />
    <d2p1:ResponseItems i:nil="true" />
    <d2p1:ResponsiveImages i:nil="true" />
    <d2p1:SSOProviders i:nil="true" />
    <d2p1:ServiceProviderNumbers i:nil="true" />
    <d2p1:ServiceProviders i:nil="true" />
    <d2p1:SocialAdAccounts i:nil="true" />
    <d2p1:SocialAudienceAdAccounts i:nil="true" />
    <d2p1:SocialAudienceMembers i:nil="true" />
    <d2p1:SocialAudiences i:nil="true" />
    <d2p1:SocialNetworks i:nil="true" />
    <d2p1:SplitTests i:nil="true" />
    <d2p1:SuppressionLists i:nil="true" />
    <d2p1:SuppressionReasons i:nil="true" />
    <d2p1:SurveyAnswers i:nil="true" />
    <d2p1:SurveyQuestionMatrixValues i:nil="true" />
    <d2p1:SurveyQuestionTypes i:nil="true" />
    <d2p1:SurveyQuestions i:nil="true" />
    <d2p1:SurveyReportActivities i:nil="true" />
    <d2p1:SurveyResponseMatrixValues i:nil="true" />
    <d2p1:SurveyResponses i:nil="true" />
    <d2p1:SurveySessionReports i:nil="true" />
    <d2p1:SurveyTypes i:nil="true" />
    <d2p1:Surveys i:nil="true" />
    <d2p1:Targets i:nil="true" />
    <d2p1:TextMessageActivityReports i:nil="true" />
    <d2p1:TextMessageLinkTracks i:nil="true" />
    <d2p1:TextMessageLinks i:nil="true" />
    <d2p1:TextMessages i:nil="true" />
    <d2p1:TriggerTasks i:nil="true" />
    <d2p1:Triggers i:nil="true" />
    <d2p1:UserAccounts i:nil="true" />
    <d2p1:UserUploadGroups i:nil="true" />
    <d2p1:Users i:nil="true" />
    <d2p1:WebFileDownloadTracks i:nil="true" />
    <d2p1:WebFileDownloads i:nil="true" />
    <d2p1:WebFileEnvelopes i:nil="true" />
    <d2p1:WebFileUploadGroups i:nil="true" />
    <d2p1:WebFileUploadTrackHistories i:nil="true" />
    <d2p1:WebFileUploadTracks i:nil="true" />
    <d2p1:WebFileUploads i:nil="true" />
    <d2p1:WebFormTracks i:nil="true" />
    <d2p1:WebForms i:nil="true" />
    <d2p1:WebhookEndpoints i:nil="true" />
    <d2p1:vApiContactActivities i:nil="true" />
    <d2p1:vApiContactCompetitions i:nil="true" />
    <d2p1:vApiContactEmails i:nil="true" />
    <d2p1:vApiContactLandingPages i:nil="true" />
    <d2p1:vApiContactRSVPs i:nil="true" />
    <d2p1:vApiContactSms i:nil="true" />
    <d2p1:vApiContactWebforms i:nil="true" />
    <d2p1:vCampaignTemplateDisplayLists i:nil="true" />
    <d2p1:vConsentContactSearches i:nil="true" />
    <d2p1:vConsentHistoryEmailGDPRs i:nil="true" />
    <d2p1:vConsentHistoryEmails i:nil="true" />
    <d2p1:vConsentHistoryLandingPages i:nil="true" />
    <d2p1:vConsentHistoryMobileGDPRs i:nil="true" />
    <d2p1:vConsentHistoryRSVPEvents i:nil="true" />
    <d2p1:vConsentHistoryTextMessages i:nil="true" />
    <d2p1:vConsentSearchContacts i:nil="true" />
    <d2p1:vConsentTotalCounts i:nil="true" />
    <d2p1:vContactActivities i:nil="true" />
    <d2p1:vContactSchemaPinnedLists i:nil="true" />
    <d2p1:vGetLists i:nil="true" />
    <d2p1:vGetPinLists i:nil="true" />
    <d2p1:vHistoryEDocuments i:nil="true" />
    <d2p1:vHistoryEmails i:nil="true" />
    <d2p1:vHistoryLandingPages i:nil="true" />
    <d2p1:vHistoryRSVPEvents i:nil="true" />
    <d2p1:vHistoryTextMessages i:nil="true" />
    <d2p1:vMonitorAccountDetailLists i:nil="true" />
    <d2p1:vMonitorAccountsEmailBalances i:nil="true" />
    <d2p1:vMonitorAccountsSMSBalances i:nil="true" />
    <d2p1:vMonitorActiveCampaigns i:nil="true" />
    <d2p1:vMonitorCurrentEmailQueues i:nil="true" />
    <d2p1:vMonitorCurrentQueues i:nil="true" />
    <d2p1:vMonitorCurrentSMSQueues i:nil="true" />
    <d2p1:vMonitorEmailsCreateds i:nil="true" />
    <d2p1:vMonitorFileLoads i:nil="true" />
    <d2p1:vMonitorRecentActivities i:nil="true" />
    <d2p1:vMonitorSMSCreateds i:nil="true" />
    <d2p1:vMonitorScheduledCampaigns i:nil="true" />
    <d2p1:vMonitorUpcomingActivities i:nil="true" />
    <d2p1:vMonitorUserLastActivities i:nil="true" />
    <d2p1:vMonitorUserLastLogins i:nil="true" />
    <d2p1:vReportBrowserReportByAccounts i:nil="true" />
    <d2p1:vReportBrowserReportByAgencyAccounts i:nil="true" />
    <d2p1:vReportBrowserReportByCampaigns i:nil="true" />
    <d2p1:vReportBrowserReportByEmails i:nil="true" />
    <d2p1:vReportBrowserReportByLandingPages i:nil="true" />
    <d2p1:vReportConsentHistoryByContactAndEmails i:nil="true" />
    <d2p1:vReportConsentHistoryByContactAndLandingPages i:nil="true" />
    <d2p1:vReportConsentHistoryByContactAndSmss i:nil="true" />
    <d2p1:vReportContactsHistoricalByAccountByMonths i:nil="true" />
    <d2p1:vReportContactsHistoricalByAccounts i:nil="true" />
    <d2p1:vReportContactsHistoricalByListByMonths i:nil="true" />
    <d2p1:vReportContactsHistoricalByLists i:nil="true" />
    <d2p1:vReportDailyEdocuments i:nil="true" />
    <d2p1:vReportDailyEmails i:nil="true" />
    <d2p1:vReportDailyTextMessages i:nil="true" />
    <d2p1:vReportDeviceReportByAccounts i:nil="true" />
    <d2p1:vReportDeviceReportByAgencyAccounts i:nil="true" />
    <d2p1:vReportDeviceReportByCampaigns i:nil="true" />
    <d2p1:vReportDeviceReportByEmails i:nil="true" />
    <d2p1:vReportDeviceReportByLandingPages i:nil="true" />
    <d2p1:vReportLandingPageSourceCounts i:nil="true" />
    <d2p1:vSmsInboxTextMessages i:nil="true" />
    <d2p1:vTriggerApproval_Awaiting i:nil="true" />
    <d2p1:vTriggerApproval_Previous i:nil="true" />
  </contextProvider>
</Contact>

Response Information

Description

Successful Response - OK (200):

A array of the (encrypted) Contact Ids that were found and updated with the given values

Response Content : Collection of string


Response Codes:

  • 200 - OK
    • Contacts where found the Matched Values given and where updated Successfully.
  • 400 - BadRequest
    • The MatchValues QueryParam is wither missing or empty - cannot proceed.
  • 401 - Unauthorized
    • Request has been denied as it lacks valid Authentication credentials.
  • 403 - Forbidden
    • The user does not have the relevant permissions to perform this action, or the passed Contact is null
  • 404 - NotFound
    • The specified Contactlist was not found or no Contacts where found that matched given Values.
  • 500 - InternalServerError
    • An error occurred while processing this request.

Formats

application/json, text/json

Sample:
[
  "sample string 1",
  "sample string 2"
]

application/csp-report

Sample:
["sample string 1","sample string 2"]

application/xml, text/xml

Sample:
<ArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <string>sample string 1</string>
  <string>sample string 2</string>
</ArrayOfstring>