Documentation · API reference
GET
/api/v1/sites/{site}/consent/recordsEvery answer and every withdrawal, newest first
This page as Markdown, or in an AI chatMore ways to read this page
Every answer and every withdrawal, newest first.
# Every answer and every withdrawal, newest first
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/get-sites-site-consent-records
`GET /api/v1/sites/{site}/consent/records`
Every answer and every withdrawal, newest first.
## Parameters
- `site` (in path, needed): A site's id or name
- `kind` (in query): agreed, declined, gpc, withdrew or changed
- `before` (in query): Unix seconds
- `limit` (in query): 50 when left out
## The answer
200, `A list of RecordView`
- `allows` (list of string, needed): What is allowed after it: `recognise`, `purchases`.
- `gpc` (boolean, needed)
- `how` (string, needed): The control that was used, in the banner's own words where it has them: `"Yes, that is fine"`.
- `id` (string, needed)
- `kind` (string, needed): `agreed`, `declined`, `gpc`, `withdrew`, `changed`.
- `label` (string, needed)
- `lang` (string, needed)
- `proof` (boolean, needed): Kept as proof after the visitor's data was deleted.
- `short` (string, needed): `c_91ab04`.
- `ts` (integer, needed): Unix seconds.
- `version` (integer, needed)
- `visitor` (string or null): The visitor, for a yes, a change and a withdrawal. A no keeps no ID.
## Asking
```sh
curl https://tidekeeper.eu/api/v1/sites/example.org/consent/records \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN"
```
Parameters
- sitein the address
- neededA site's id or name
- kindin the query
- agreed, declined, gpc, withdrew or changed
- beforein the query
- Unix seconds
- limitin the query
- 50 when left out
The answer
Status 200
A list of RecordView
- allows
- list of stringneededWhat is allowed after it: `recognise`, `purchases`.
- gpc
- booleanneeded
- how
- stringneededThe control that was used, in the banner's own words where it has them: `"Yes, that is fine"`.
- id
- stringneeded
- kind
- stringneeded`agreed`, `declined`, `gpc`, `withdrew`, `changed`.
- label
- stringneeded
- lang
- stringneeded
- proof
- booleanneededKept as proof after the visitor's data was deleted.
- short
- stringneeded`c_91ab04`.
- ts
- integerneededUnix seconds.
- version
- integerneeded
- visitor
- string or nullThe visitor, for a yes, a change and a withdrawal. A no keeps no ID.
Asking
curl https://tidekeeper.eu/api/v1/sites/example.org/consent/records \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/consent/records", { headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, }, }).then((r) => r.json());