Skip to content

Web Consent

Endpoints

GET /api/consent/:clientId

Get the full consent record for a user.

Request:

{
"Domain": "string"
}

Response:

{
"ClientId": "string",
"ComplianceType": "string",
"ConsentGiven": "boolean",
"ComplianceTypeID": "string",
"PluginPreferences": "string",
"PageURL": "string",
"IabConsent": {
"Name": "string",
"Id": "integer",
"ConsentGiven": "boolean",
"ConsentType": "string"
}
}

GET /api/consent/customuserid/:clientId

Get the consent record for a user with CustomUserId inlcuded.

[Authentication required]

Request:

{
"DomainId": "string"
}

Response:

{
"ClientId": "string",
"CustomUserId": "string",
"PageURL": "string",
"Consents": [
{
"ComplianceType": "string",
"ComplianceTypeID": "string",
"ConsentGiven": "boolean",
"PluginPreferences": "string",
"ComplianceLawType": "string"
}
],
"IabConsents": [
{
"Name": "string",
"Id": "integer",
"ConsentGiven": "boolean",
"ConsentType": "string"
}
]
}

POST /api/consent

PUT /api/consent

Create a new consent or update an existing one if the client ID matches an existing record.

Request:

{
"Domain": "string",
"ClientId": "string",
"AllConsents": [
{
"ComplianceType": "string",
"LastUpdated": "string",
"ComplianceTypeID": "string",
"ConsentGiven": "boolean",
"PluginPreferences": "string"
}
],
"PageURL": "string"
}

Response: 201 Created

PATCH /api/consent/customuserid/:clientId

[Authentication required]

Update the custom user ID associated with a consent.

Request:

{
"DomainId": "string",
"CustomUserId": "string"
}

Response: 200 OK

{
"ClientId": "string",
"CustomUserId": "string",
"PageURL": "string",
"Consents": [
{
"ComplianceType": "string",
"ComplianceTypeID": "string",
"ConsentGiven": "boolean",
"PluginPreferences": "string",
"ComplianceLawType": "string"
}
],
"IabConsents": [
{
"Name": "string",
"Id": "integer",
"ConsentGiven": "boolean",
"ConsentType": "string"
}
]
}