API Documentation

If your website is setting cookies from the backend, then you will not have access to the JS Callbacks and will need to use this API to retrieve the list of cookies (Cookie whitelist) your visitor has
https://app.termly.io/api/v1/cookie_whitelist
This endpoint allows you to get the Essential Cookies or allowed cookie whitelist of visitor
Request
Response
Headers
Authorization
required
string
You can get your API key from Termly app
Query Parameters
uuid
optional
string
You can get the UUID from the Frontend using the SDK callbacks. If you do not pass in the UUID, the API will only return the list of cookies in the Essential category.
200: OK
API successfully retrieved.
{
cookies:
[
{ 'name': 'cookie_name', 'provider': 'termly.io', 'type': 'http_cookie' },
{ 'name': 'cookie_name', 'provider': 'termly.io', 'type': 'http_cookie' }
]
categories: ['essential'],
uuid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
}
400: Bad Request
{
"error" : "Bad Request"
}
401: Unauthorized
{
"error" : "Access denied!. Invalid token supplied."
}
or
{
"error" : "Access denied!. Deprecated token supplied."
}

Note: You can get the UUID from the Frontend using the JS callbacks.

LIST RESPONSE FORMAT OF COOKIES

Response

Description

name

whitelist cookie name

provider

Provider domain. For example: website with 'https://example.io' may have provider '.example.io' or 'example.io' ('.' in front of example.io means you can use the cookie in subdomain). So you should take account the two possible providers.

type

E.g. tracker_type, html_local_storage, html_session_storage, server_cookie, pixel_tracker Back-end may just need blocking 'server_cookie'.

LIST RESPONSE FORMAT OF CATEGORIES

Response

Description

categories

whitelist category name

RESPONSE FORMAT OF UUID

Response

Description

 uuid

unique user identity of termly