Skip to content

Policy Consent

Obtain the policy document to show to the client. In case the type of the policy is link, the link is returned instead of the policy document.

Request:

{
"PolicyId": "string",
"LanguageCode": "string"
}

Response:

{
"Id": "string",
"Name": "string",
"Type": "string", // either of 'Privacy', 'Cookie', 'TermsOfService'
"Version": "string", // the current (latest) version of the policy
"CompiledHtml": "string", // Policy text in HTML format, if applicable
"ExistingPolicyURL": "string" // Link to the existing policy
}

Record the consent of a user to the given policy.

Request:

{
"PolicyId": "string",
"ConsentGiven": "boolean",
"Language": "string",
"CustomUserId": "string", // Optional, e.g. user email or any custom Id
"ClientId": "string", // Optional, e.g. user email or any custom Id
"URI": "string", // Optional, derived from Origin header if not passed
"DomainId": "string" // Optional, from SP dashboard
}

Response:

{
"Created": "string", // Date,
"ClientId": "string" // Unique id for the user who has given the consent
// the same CustomUserId always leads to the same ClientId
}

Get the full policy consent record for a user.

Request:

{
"ClientId": "string",
"PolicyId": "string",
"Version": "string"
}

Response:

{
"Id": "string",
"Created": "string",
"URI": "string",
"PolicyId": "string",
"PolicyType": "string",
"Version": "string",
"ConsentGiven": "boolean",
"CustomUserId": "string", // Optional
"ClientId": "string"
}

Checks if a user has already consented to the given policy.

Request:

{
"ClientId": "string",
"PolicyId": "string",
"Version": "string"
}

Response:

{
"ConsentGiven": "boolean"
}

Record the consent of a user to the given policy.

Request:

{
"PolicyId": "string",
"Language": "string",
"ConsentGiven": "boolean",
"CustomUserId": "string",
"ClientId": "string",
"URI": "string", // Mobile screen URI
"ClientSessionId": "string",
"DeviceManufacturer": "string",
"SDKVersion": "string",
"OSVersion": "string",
"MobileApplicationId": "string"
}

Response:

{
"Created": "string", // Date
"ClientId": "string" // Unique id for the user who has given the consent
// the same CustomUserId always leads to the same ClientId
}

Get the full policy consent record for a user.

Request:

{
"ClientId": "string",
"PolicyId": "string",
"Version": "string"
}

Response:

{
"Id": "string",
"Created": "string",
"ConsentGiven": "boolean",
"URI": "string",
"PolicyName": "string",
"PolicyType": "string",
"PolicyId": "string",
"PolicyVersion": "string",
"CustomUserId": "string",
"ClientId": "string"
}

Checks if a mobile user has consented to the given policy.

Request:

{
"ClientId": "string",
"PolicyId": "boolean",
"Version": "string"
}

Response:

{
"ConsentGiven": "boolean";
}

Get consents by the given filters. By default selects all consents for the last week.

Request:

{
"PolicyId": "string",
"CustomUserId": "string", // Optional, e.g. user email or any custom Id
"FromDate": "DateTime", // Optional
"ToDate": "DateTime", // Optional
"ConsentGiven": "boolean", // Optional
"PolicyVersion": "string", // Optional
"MobileApplicationId": "string", // Optional
"DeviceManufacturer": "string", // Optional
"SDKVersion": "string", // Optional
"OSVersion": "string", // Optional
"DomainId": "string" // Optional}

Response: The list of consents in the following format:

{
"Id": "string",
"Created": "string",
"ConsentGiven": "boolean",
"URI": "string",
"PolicyType": "string",
"PolicyId": "string",
"Version": "string",
"CustomUserId": "string",
"ClientId": "string",
"Fingerprint": {
"IP": "string",
"ProxifiedIP": "string",
"UserAgent": "string",
"City": "string",
"State": "string",
"Country": "string",
"ClientSessionId": "string",
"DeviceManufacturer": "string",
"SDKVersion": "string",
"OSVersion": "string"
}
}