This endpoint is deprecated!
Deprecated: This endpoint has been replaced by the new Query user preferences endpoint.
The new endpoint provides enhanced functionality and a more flexible structure. Here are the key differences and migration steps:
- Old:
POST /v1/consent-preferences - New:
POST /v1/preferences/{partition}/query
- Partition: Move from request body to URL path
- Filters: Wrap filtering parameters in a
filterobject - Identifiers: Change from simple strings to objects with
nameandvalueproperties - Pagination: Use
cursorinstead ofstartKey
Old Request:
{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"identifiers": ["user@example.com"],
"timestampAfter": "2023-06-26T21:39:31.677769"
}
New Request:
// POST /v1/preferences/ea3a0845-694e-4820-9d51-50c7d0a23467/query { "filter": { "identifiers": [ {"name": "email", "value": "user@example.com"} ] } }
- Identifiers: Changed from single
userIdstring to array ofidentifiersobjects - Purposes: Enhanced from simple object to detailed array with nested preferences
- Pagination: Uses
cursorinstead oflastKey - Additional Fields: New
consentManagement,system, andmetadatafields provide more context
- Support for multiple identifier types (email, phone, etc.)
- More granular preference choices (boolean, select, multi-select)
- Enhanced filtering capabilities
- Improved response structure with additional metadata
- Simplified pagination with cursor-based approach
Batch-lookup consent preferences for multiple users.
POST
/v1/consent-preferencesIn 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
authorizationstringAn API key generated from the Transcend dashboard: https://app.transcend.io/infrastructure/api-keys. |
x-sombra-authorizationstringThe Sombra internal key. This header is only needed for self-hosted Sombra gateways. See https://docs.transcend.io/docs/dsr-automation/api-integration/authentication#authenticating-to-sombra |
content-typestringSpecify content-type: application/json for a JSON response from the Transcend API. |
application/json
partitionstring(required)The ID of the partition in the Preference Store. |
identifiersarray<string>The list of identifiers, each corresponding to a unique user. Cannot be used in combination with timestampBefore and timestampAfter filters. |
Filter for consent preferences set before a given timestamp. Defaults to now. Cannot be used in combination with identifiers or updated filters. |
Filter for consent preferences set after a given timestamp. Cannot be used in combination with identifiers or updated filters. |
Filter for consent preferences updated before a given timestamp. Defaults to now. Cannot be used in combination with identifiers or timestamp filter. If you are self-hosting Sombra, your Sombra version must be >=7.236.0 to query by updatedBefore. |
Filter for consent preferences updated after a given timestamp. Cannot be used in combination with identifiers or timestamp filter. If you are self-hosting Sombra, your Sombra version must be >=7.236.0 to query by updatedAfter. |
startKeyobjectThe key after which to start looking for consent preferences. Used for cursor pagination. |
limitnumberMax 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",
"decryptionStatus": "DECRYPTED"
}
}
Query for all preferences collected 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 collected after a certain timestamp:
{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"timestampAfter": "2023-06-26T21:39:31.677769"
}
Query for all preferences updated in a given partition during a 24 hours period:
{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"updatedBefore": "2024-08-27T21:21:19.677769",
"updatedAfter": "2024-08-26T21:21:19.677769"
}
Query for preferences in a partition that were updated after a certain timestamp:
{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"updatedAfter": "2024-08-26T21:21:19.677769"
}
Queries with updatedAt with pagination:
{
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"updatedBefore": "2024-08-27T21:21:19.677769",
"limit": 50,
"startKey": {
"userId": "foo@example.com ea3a0845-694e-4820-9d51-50c7d0a23467",
"partition": "ea3a0845-694e-4820-9d51-50c7d0a23467",
"updatedAt": "2024-08-26T21:21:19.677769",
"decryptionStatus": "DECRYPTED"
}
}
200 (OK)
application/jsonReturns a list of users' consent preferences
Response Body
lastKeyobjectKey for cursor pagination. To fetch the next page, set the startAt property to equal this lastKey. |
nodesarray<object>(required) |
Response Body Examples
Response for multiple users' consent preferences - queried by timestamp:
{
"nodes": [
{
"userId": "no-track@example.com",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467",
"timestamp": "2023-04-11T15:09:28.403Z",
"updatedAt": "2023-06-13T08:02:21.793Z",
"decryptionStatus": "DECRYPTED",
"usp": null,
"gpp": null,
"tcf": null,
"airgapVersion": null,
"purposes": {
"Advertising": true,
"Analytics": true
}
},
{
"userId": "no-track-pls@example.com",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467",
"timestamp": "2023-05-11T15:09:28.403Z",
"updatedAt": "2023-06-13T08:02:21.793Z",
"decryptionStatus": "DECRYPTED",
"purposes": {
"SaleOfInfo": false
},
"gpp": null,
"tcf": null,
"airgapVersion": null,
"usp": "1YYN"
}
],
"lastKey": {
"userId": "no-track-pls@example.com ee1a0845-694e-4820-9d51-50c7d0a23467",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467",
"timestamp": "2023-05-11T15:09:28.403Z",
"decryptionStatus": "DECRYPTED"
}
}
Response for consent preferences - queried by updatedAt:
{
"nodes": [
{
"userId": "no-track@example.com",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467",
"timestamp": "2023-04-11T15:09:28.403Z",
"updatedAt": "2023-06-13T08:02:21.793Z",
"decryptionStatus": "DECRYPTED",
"usp": null,
"gpp": null,
"tcf": null,
"airgapVersion": null,
"purposes": {
"Advertising": true,
"Analytics": true
}
}
],
"lastKey": {
"userId": "no-track-pls@example.com ee1a0845-694e-4820-9d51-50c7d0a23467",
"partition": "ee1a0845-694e-4820-9d51-50c7d0a23467",
"updatedAt": "2023-06-13T08:02:21.793Z",
"decryptionStatus": "DECRYPTED"
}
}
400 (Bad Request)
application/jsonWhile this request passed authentication, the input is malformed. Please double-check that your code conforms to our API specification.
401 (Unauthorized)
application/jsonThere 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).
413 (Request Entity Too Large)
application/jsonThe request body is too large. JSON and raw bodies must be less than 50MB. URL encoded bodies must be less than 30MB.
429 (Too Many Requests)
application/jsonYou 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.
Response Headers
Retry-Afterinteger |
X-RateLimit-Limitinteger |
X-RateLimit-Remaininginteger |
X-RateLimit-Resetinteger |
500 (Internal Server Error)
application/jsonA 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/jsonAn 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.