Registering a new consent
The easiest way to register a consent is by using the Consent Banner. Whenever the user interacts with it, a consent is immediately sent to our public API, therefore adding it to the Consent Log. However, it is also possible to create a new consent by using the API directly.
In order to do so, a POST request must be sent to the following endpoint:
https://api.platform.illow.io/public/cookie-consent/{siteId}
Where the siteId is the UUID returned when creating the consent banner.
Request Body
Format: JSON
Property | Type | Required? | Description |
---|---|---|---|
categories | Categories Object | Yes | The consent categories to give or revoke. |
gpc | boolean | No | The Global Privacy Control signal |
tcString | string | No | IAB's TCF v2.2 consent string |
userId | string | No | An optional user ID to authenticate the consent sent |
Categories object
Format: JSON
Property | Type | Description |
---|---|---|
marketing | boolean | If the user agreed to have cookies of type marketing |
preferences | boolean | If the user agreed to have cookies of type preferences |
statistics | boolean | If the user agreed to have cookies of type analytics/statistics |
unclassified | boolean | If the user agreed to have unclassified cookies, this will be always true |
necessary | boolean | The status of the necessary cookies, will be always on true, as the user can't opt out of this ones |
optedIn | boolean | If the user opted in for the consent, only valid when the banner is a ccpaBanner |
info
To grant a consent for a category, the value sent to the API must be true
. In order to revoke it, a false
value must be posted.