Newer Version Available

This content describes an older version of this product. View Latest

Compile Consent Settings

Gets consent details based on a single action, like email or track, across specific consent management objects when the records have a lookup relationship. This resource is available in REST API version 45.0 and later.

To call Consent API, you must have either the View All Data or the Allow User Access to Privacy Data user permission. Requiring a perm ensures that the System Administrator gives explicit permission. This API accesses org-wide consent data, such as links between records and the value of consent flags, not just records to which the user ordinarily has access.

Consent API gets consent details based on a single action, like email or track, across the Contact, Contact Point Type Consent, Data Use Purpose, Individual, Lead, Person Account, and User objects when the records have a lookup relationship.

When you select email as the action, the API only aggregates consent for records that contain the same email address. If the record ID specified in the URI is associated with a record that contains a different email address, the consent settings of the associated record aren’t included in the API response. The Consent API can't locate records in which the email address field is protected by Platform Encryption.

When the API compares consent settings across records, it doesn’t incorporate settings from converted leads.

Note

Action Fields Consulted API Response Response Schema
email
  • Contact.HasOptedOutOfEmail
  • ContactPointTypeConsent.ContactPointType
  • ContactPointTypeConsent.EffectiveFrom
  • ContactPointTypeConsent.EffectiveTo
  • ContactPointTypeConsent.PrivacyConsentStatus
  • DataUsePurpose.Name
  • Lead.HasOptedOutOfEmail
  • PersonAccount.HasOptedOutOfEmail

Within the time range if specified in ContactPointTypeConsent:

Returns TRUE if all consulted field values are 0.

Returns FALSE if any consulted field value is 1 or if no related Contact, Contact Point Type Consent, Lead, or Person Account object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "emailResult" : "<Success/errormessage>", email : “<true/false>” }

}

}

fax
  • Contact.HasOptedOutOfFax
  • DataUsePurpose.Name
  • Lead.HasOptedOutOfFax
  • PersonAccount.HasOptedOutOfFax

Returns TRUE if all consulted field values are 0.

Returns FALSE if any consulted field value is 1 or if no related Contact, Lead, or Person Account object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "faxResult" : "<Success/errormessage>", fax : "<true/false>" }

}

}

geotrack
  • DataUsePurpose.Name
  • Individual.HasOptedOutGeoTracking

Returns TRUE if the consulted field value is 0.

Returns FALSE if the consulted field value is 1 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "geotrackResult" : "<Success/errormessage>", "geotrack" : "<true/false>" }

}

}

mail
  • ContactPointTypeConsent.ContactPointType
  • ContactPointTypeConsent.EffectiveFrom
  • ContactPointTypeConsent.EffectiveTo
  • ContactPointTypeConsent.PrivacyConsentStatus
  • DataUsePurpose.Name

Within the time range if specified in ContactPointTypeConsent:

Returns TRUE if all consulted field values are 0.

Returns FALSE if any consulted field value is 1 or if no related Contact, Contact Point Type Consent, Lead, or Person Account object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "mailingResult" : "<Success/errormessage>", "mail" : "<true/false>" }

}

}

phone
  • Contact.DoNotCall
  • ContactPointTypeConsent.ContactPointType
  • ContactPointTypeConsent.EffectiveFrom
  • ContactPointTypeConsent.EffectiveTo
  • ContactPointTypeConsent.PrivacyConsentStatus
  • DataUsePurpose.Name
  • Lead.DoNotCall
  • PersonAccount.DoNotCall

Within the time range if specified in ContactPointTypeConsent:

Returns TRUE if all consulted field values are 0.

Returns FALSE if any consulted field value is 1 or if no related Contact, Contact Point Type Consent, Lead, or Person Account object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "phoneResult" : "<Success/errormessage>", "phone" : "<true/false>" }

}

}

portability
  • DataUsePurpose.Name
  • Individual.SendIndividualData

Returns TRUE if the consulted field value is 1.

Returns FALSE if the consulted field value is 0 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "portabilityResult" : "<Success/errormessage>", "portability" : "<true/false>" }

}

}

process
  • DataUsePurpose.Name
  • Individual.HasOptedOutProcessing

Returns TRUE if the consulted field value is 0.

Returns FALSE if the consulted field value is 1 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "processResult" : "<Success/errormessage>", "process" : "<true/false>" }

}

}

profile
  • DataUsePurpose.Name
  • Individual.HasOptedOutProfiling

Returns TRUE if the consulted field value is 0.

Returns FALSE if the consulted field value is 1 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "profileResult" : "<Success/errormessage>", "profile" : "<true/false>" }

}

}

shouldforget
  • DataUsePurpose.Name
  • Individual.ShouldForget

Returns TRUE if the consulted field value is 1.

Returns FALSE if the consulted field value is 0 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "shouldForgetResult" : "<Success/errormessage>", "shouldforget" : "<true/false>" }

}

}

social
  • ContactPointTypeConsent.ContactPointType
  • ContactPointTypeConsent.EffectiveFrom
  • ContactPointTypeConsent.EffectiveTo
  • ContactPointTypeConsent.PrivacyConsentStatus
  • DataUsePurpose.Name

Within the time range if specified in ContactPointTypeConsent:

Returns TRUE if all consulted field values are 0.

Returns FALSE if any consulted field value is 1 or if no related Contact, Contact Point Type Consent, Lead, or Person Account object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "socialResult" : "<Success/errormessage>", "social" : "<true/false>" }

}

}

solicit
  • DataUsePurpose.Name
  • Individual.HasOptedOutSolicit

Returns TRUE if the consulted field value is 0.

Returns FALSE if the consulted field value is 1 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "solicitResult" : "<Success/errormessage>", "solicit" : "<true/false>" }

}

}

storepiielsewhere
  • DataUsePurpose.Name
  • Individual.CanStorePiiElsewhere

Returns TRUE if the consulted field value is 1.

Returns FALSE if the consulted field value is 0 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "storePIIElsewhereResult" : "<Success/errormessage>", "storepiielsewhere" : "<true/false>" }

}

}

track
  • DataUsePurpose.Name
  • Individual.HasOptedOutTracking

Returns TRUE if the consulted field value is 0.

Returns FALSE if the consulted field value is 1 or if no related Individual object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "trackResult" : "<Success/errormessage>", "track" : "<true/false>" }

}

}

web
  • ContactPointTypeConsent.ContactPointType
  • ContactPointTypeConsent.EffectiveFrom
  • ContactPointTypeConsent.EffectiveTo
  • ContactPointTypeConsent.PrivacyConsentStatus
  • DataUsePurpose.Name

Within the time range if specified in ContactPointTypeConsent:

Returns TRUE if all consulted field values are 0.

Returns FALSE if any consulted field value is 1 or if no related Contact, Contact Point Type Consent, Lead, or Person Account object exists.

{

"<ID/Email>" :

{

"result" : "<Success/errormessage>",

"proceed" : { "webResult" : "<Success/errormessage>", "web" : "<true/false>" }

}

}

Syntax

URI
/services/data/vXX.X/consent/action/action?ids=listOfIds
Formats
JSON
HTTP methods
GET
Authentication
Authorization: Bearer token
Request body
None
Request parameters
Parameter Description
action Required. The proposed action.

If this parameter is used, actions can't be used.

aggregatedConsent Optional: true or false. aggregatedConsent is the same as aggregatedConsent=true. If true, one result is returned indicating whether to proceed or not, rather than a result for each ID. If any ID in the list returns false, the aggregated result is false.
datetime Optional. The timestamp for which consent is determined. The value is converted to the UTC timezone and must be formatted as described in Valid Date and DateTime Formats. If not specified, defaults to the current date and time.
ids Required. Comma-separated list of IDs. The ID can be the record ID or the email address listed on the record.
policy Optional. Use policy=requireExplicitConsent to specify in the API response whether explicit consent was given for a contact point channel. The API returns an infoNotFound response when consent isn’t specified.

This parameter is available in API version 49.0 and later.

purpose Optional. The reason for contacting a customer.
verbose Optional: true or false. verbose is the same as verbose=true. Verbose responses are slower than non-verbose responses. See the examples for a verbose response.

Example

Request for URI structure
Request for Email addresses as IDs, specified purpose and timespan, and a verbose response
Response Body