Batch-lookup consent preferences for multiple users

POST

/v1/consent-preferences

Request Authorization

In your request headers, pass authorization: Bearer <<token>>.

If you're self-hosting Sombra, also add the request header x-sombra-authorization: Bearer <<sombraInternalKey>>. You can read more about request authorization here.

Requires scope:

View Managed Consent Database Admin API

Request Parameters

Header Parameters

authorization string
An API key generated from the Transcend dashboard: https://app.transcend.io/infrastructure/api-keys.
x-sombra-authorization string
The Sombra internal key. This header is only needed for self-hosted Sombra gateways. See https://docs.transcend.io/docs/privacy-requests/api-integration/authentication#authenticating-to-sombra
content-type string
Specifying content-type: application/json for a JSON response from the Transcend API.

Request Body

application/json

partition string(required)
The ID of the consent manager SDK that collected the user consent.
filterBy object
startKey object
The key after which to start looking for consent data. Used for cursor pagination.
limit number
Max number of users to return. Defaults to 50.

Request Body Examples

Query for a single user's consent preferences:

{
"identifiers": [
"no-track@example.com"
],
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467"
}

Query for multiple users' consent preferences:

{
"identifiers": [
"no-track@example.com",
"pls-no-track@example.com",
"foo@example.com"
],
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467"
}

Query for the first 50 users' consent preferences:

{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"limit": 50
}

Using cursor pagination:

{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"limit": 50,
"startKey": {
"userId": "foo@example.com ea3a0845-694e-4820-9d51-50c7d0a23467",
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"timestamp": "2023-06-26T21:39:31.677769"
}
}

Query for all updated preferences in a given partition during a 24 hours period:

{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"timestampBefore": "2023-06-27T21:39:31.677769",
"timestampAfter": "2023-06-26T21:39:31.677769"
}

Query for preferences in a partition that were updated after a certain timestamp:

{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"timestampAfter": "2023-06-26T21:39:31.677769"
}

Response

200 (OK)

application/json

Returns a list of users' consent preferences

Response Body

lastKey object
Key for cursor pagination. To fetch the next page, set the startAt property to equal this lastKey.
nodes array<object>(required)

Response Body Example

Response for multiple users' consent preferences:

{
"nodes": [
{
"userId": "no-track@example.com",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467",
"timestamp": "2023-04-11T15:09:28.403Z",
"purposes": {
"Advertising": true,
"Analytics": true
}
},
{
"userId": "no-track-pls@example.com",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467",
"timestamp": "2023-05-11T15:09:28.403Z",
"purposes": {
"SaleOfInfo": false
},
"usp": "1YYN"
}
],
"lastKey": {
"userId": "no-track-pls@example.com ee1a0845-694e-4820-9d51-50c7d0a23467",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467"
}
}

400 (Bad Request)

application/json

While this request passed authentication, the input is malformed. Please double-check that your code conforms to our API specification.

401 (Unauthorized)

application/json

There was a problem authenticating your request. This may be an issue with the Transcend API key ("authorization" header), or the Sombra API key ("x-sombra-authorization" header used for self-hosted gateways only).

409 (Conflict)

application/json

You're attempting to modify a DSR that is not in a modifiable state. For example, the DSR may have already completed, or been revoked.

429 (Too Many Requests)

application/json

You are sending requests too quickly and have hit our rate limit. If you hit this, you'll need to throttle your request velocity or try again later.

500 (Internal Server Error)

application/json

A 5xx error means there is either an issue with your self-hosted gateway, or a Transcend server is having issues. You check our system status at status.transcend.io. Please reach out to Transcend support if you're experiencing this error.

502 (Bad Gateway)

application/json

An upstream service on Transcend's side is having issues. You check our system status at status.transcend.io. Please reach out to Transcend support if you're experiencing this error.