Newer Version Available
Use the Consent API with Customer 360 Audiences
Required Permissions
To use the Customer 360 Audiences parameters for the Consent API, you must have either the ModifyAllData or the ConsentApiUpdate user permission. Requiring a perm ensures that the System Administrator gives explicit permission. These parameters write org-wide consent data, such as links between records and the value of consent flags, which are not usually accessible to non-Admin users.
Customer 360 Audiences Read Parameters
The Consent API allows you to gather information about the Customer 360 Audiences profile. Use the actions and ids Customer 360 Audiences parameters as described below. The ids parameter is a string equal to the Individual ID attribute.
Syntax
- HTTP method
- GET
- Available since release:
- 48.0
- URI
- /services/data/vxx.0/consent/action/action?ids=list_of_ids&mode=CDP
- Request parameters
-
Parameter Description action May be used with either mode setting. Include with one of the allowed values, followed by a ‘?’ like this: action/track? parameters associated with each action. That allowed values for action are: - portability
- process
- shouldForget
ids Required. Comma-separated list of IDs. The ID can be the record ID or the email address listed on the record. When mode is set to cdp, the ids value is a string equal to the Individual ID attribute. This is the email address used to sync consent.
Customer 360 Audiences Read Example
- URI
- /services/data/v50.0/consent/action/action?ids=00932I3SU92&mode=CDP
- Response
- { "j00932I3SU92" : { "result" : "Success", "proceed" : { "portability" : "true" "portabilityResult" : "Success" } } }
Customer 360 Audiences Write Parameters
The Consent API also allows you to write information to the Customer 360 Audiences profile. Use the actions, blobParam, ids, and mode parameters as described below.
The ids parameter is a string equal to the Individual ID attribute. The blobParam parameter is used to pass the S3 bucket location for portability requests to Customer 360 Audiences.
Syntax
- HTTP method
- PATCH
- Available since release
- 50.0
- URI
- /services/data/vxx.0/consent/action/action?ids=list_of_ids&mode=CDP
- Request parameters
-
Parameter Description action May be used with either mode setting. Include with one of the allowed values, followed by a ‘?’ like this: action/track? parameters associated with each action. The allowed values for action are: - portability
- process
- shouldForget
ids Required. Comma-separated list of IDs. The ID can be the record ID or the email address listed on the record. When mode is cdp, the ids value is a string equal to the Individual ID attribute. This is the email address used to sync consent. mode Optional. Default is normal. Valid values are normal or cdp. If mode is set to cdp, the only parameters used are ids, action, and blobParam. status Required. Status of the consent (OptIn, OptOut). Used with the Write API only. aws_s3_bucket_id Required only when mode is 'cdp' and the action is 'portability'. This parameter must be passed in as part of the PATCH request body. This parameter is used to pass the S3 bucket location for portability requests to Customer 360 Audiences. aws_access_key_id Required only when mode is 'cdp' and the action is 'portability'. This parameter must be passed in as part of the PATCH request body. This parameter is used to pass the S3 bucket access key for portability requests to Customer 360 Audiences. aws_secret_access_key Required only when mode is 'cdp' and the action is 'portability'. This parameter must be passed in as part of the PATCH request body. This parameter is used to pass the S3 bucket secret access key for portability requests to Customer 360 Audiences. aws_s3_folder Required only when mode is 'cdp' and the action is 'portability'. This parameter must be passed in as part of the PATCH request body. This parameter is used to pass the S3 bucket folder for portability requests to Customer 360 Audiences. aws_region Required only when mode is 'cdp' and the action is 'portability'. This parameter must be passed in as part of the PATCH request body. This parameter is used to pass the S3 bucket's aws region for portability requests to Customer 360 Audiences.
Customer 360 Audiences Write Example
- URI
- /services/data/v50.0/consent/action/portability?ids=00932I3SU92&mode=CDP&status=optin
- Request Body
-
1{ 2 "aws_s3_bucket_id": "<the AWS s3 bucket id where your data will be exported>", 3 "aws_access_key_id": "<your AWS access key id>", 4 "aws_secret_access_key": "<your AWS secret access key>", 5 "aws_s3_folder": "<your AWS s3 bucket folder where data will be exported>", 6 "aws_region": "<your AWS region, such as us-west-2>" 7 }