Customer consents

Authorization

Available access typePermissions needed
Private accessEvents > "consent" Get

Attributes object definition for Customer consents

Each consent attribute object in the Customer attributes method must have type, category, and mode properties.

ParameterValue
type"consent"
categoryThe category name of the consent you want to retrieve.
mode

What information about the consent should be fetched.

message - Returns a value from the message attribute for the last consent event category.
source - Returns a source for the last consent event.
timestamp - Returns a timestamp for the last consent event as a UNIX time.
valid - Default value. Returns whether consent is valid or not (true/false).
until - Returns a value from valid_until attribute for the last consent event.

Payload example

{
    "customer_ids": {
        "registered": "[email protected]"
    },
    "attributes": [
        {
            "type": "consent",
            "category": "newsletter",
            "mode": "valid"
        },
        {
            "type": "consent",
            "category": "newsletter",
            "mode": "message"
        },
        {
            "type": "consent",
            "category": "newsletter",
            "mode": "timestamp"
        },
        {
            "type": "consent",
            "category": "newsletter",
            "mode": "until"
        }
    ]
}
{
    "results": [
        {
            "success": true,
            "value": false
        },
        {
            "success": true,
            "value": null
        },
        {
            "success": true,
            "value": null
        },
        {
            "success": true,
            "value": null
        }
    ],
    "success": true
}
{
    "results": [
        {
            "error": "No permission",
            "success": false
        }
    ],
    "success": true
}

© Bloomreach, Inc. All rights reserved.