The Preferences object contains all the user's consent preferences.
Preferences Object Properties
|||type||string||Value must be consent.|
|||currentDocUri (TBD)||string||The URI of the document that this consent object is related to.|
|||currentDocVersion*||float||The active version number of the consent statement. Either currentDocVersion or currentDocDate are required.|
|||currentDocDate*||date||The active version date of the consent statement. Either currentDocVersion or currentDocDate are required.|
|||customdata||Array of objects|
An array of custom data objects that are part of the schema for this consent statement. Each data set is comprised of a key-value pair. Both of these are strings.
The maximum number of characters for the key is 20, and 256 for the value. The maximum number of custom key-value pairs per consent statement is 50.
|||description||string||A description of this consent object.|
An object containing the supported locales for this consent statement. Each locale includes the following fields:
For a list of all supported locales, see Advanced Customizations and Localization. Note that legalStatements are not available via accounts.getAccountInfo and can only be viewed inside the Consent Vault.
|||required||Boolean||This applies to the requirement of the isConsentGranted field of the Preferences object and defines whether consent is required.|
|||tags||Array of strings|
Additional information in the form of a list of tags that you would like to save in the consent vault for any consent collection interaction (Grant/Withdraw/Renew). Once set, this value can be viewed in the Consent Vault, or searched for in the audit log.
Defines whether the isConsentGranted field requires validation in order to be submitted. Possible values are:
Specifies whether to allow unsigned requests to write into this object. This property applies when using the accounts.setAccountInfo method, or when setting fields through the usage of a Screen-Set. The supported values are:
|||minDocVersion||float||For statements that are versioned by numbers: The lowest version number that a user can consent to and still be considered to have a valid consent statement assigned to their account.|
|||minDocDate||date||For statements that are versioned by dates: The earliest version date that a user can consent to and still be considered to have a valid consent statement assigned to their account.|
|||refreshInterval||integer||The number of days since consent was previously given before requesting the user's re-consent.|
An array of comma-separated strings, where each string is an entitlement to which the user granted consent.
Entitlements are a sub-set of each statement, and are used to add nuance to the general consent statement.
For more information about the types of data that can be customized per consent statement, see Customizing Consent-Related Data.
Preferences Open Notation Example
The Preferences object returned from accounts.getAccountInfo contains (if not empty):
- custom (The name provided at creation)
Each of the above contain multiple objects, one for each consent object that was added to the schema. Each of those objects then contains the following Preference Object Properties.
Preference Object Response Properties
|isConsentGranted||Boolean||Whether the user granted consent.|
|docVersion||float||The version of the document the isConsentGranted property references.|
|docDate||date||The date of the document the isConsentGranted property references.|
|lastConsentModified||date||The date that the isConsentGranted property was last changed/updated.|