curl --request GET \
--url https://{host}/v1/legalconst options = {method: 'GET'};
fetch('https://{host}/v1/legal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/v1/legal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://{host}/v1/legal"
response = requests.get(url)
print(response.text){
"data": [
{
"type": "legal-documents",
"id": "terms",
"attributes": {
"name": "Terms & conditions",
"url": "https://wristler.eu/terms-and-conditions.pdf",
"contentType": "application/pdf",
"locale": "en"
}
},
{
"type": "legal-documents",
"id": "privacy",
"attributes": {
"name": "Privacy statement",
"url": "https://wristler.eu/privacy-policy-en.pdf",
"contentType": "application/pdf",
"locale": "en"
}
}
]
}{
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}List legal documents
Scope: none — and no token at all.
The terms and the privacy statement, as absolute links to PDFs on the website. A sign-up screen has to say what somebody is agreeing to and link both, and an app cannot be asked to hard-code paths into our public folder: nothing tells it when one moves, and the privacy statement is a different file per language.
Answered in the Accept-Language language. The terms are one document for all
of them; the privacy statement is one each. Two rows, terms and privacy, each
with name, an absolute url, contentType (application/pdf) and the
locale the copy is in.
Behind no token deliberately — needing one to read the terms you accept in
order to get one is a circle, and these are public files anybody can already
open. Still the app only, like everything else here: send the client_id it
signs in with.
curl --request GET \
--url https://{host}/v1/legalconst options = {method: 'GET'};
fetch('https://{host}/v1/legal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/v1/legal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://{host}/v1/legal"
response = requests.get(url)
print(response.text){
"data": [
{
"type": "legal-documents",
"id": "terms",
"attributes": {
"name": "Terms & conditions",
"url": "https://wristler.eu/terms-and-conditions.pdf",
"contentType": "application/pdf",
"locale": "en"
}
},
{
"type": "legal-documents",
"id": "privacy",
"attributes": {
"name": "Privacy statement",
"url": "https://wristler.eu/privacy-policy-en.pdf",
"contentType": "application/pdf",
"locale": "en"
}
}
]
}{
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}Headers
The language to answer in: specificationLabels, translatedDescription, facet
and label names, the content pages, and every other translated word in the
answer. Read on every request, whatever the endpoint. One we do not have falls
back to English rather than failing.
en, nl, de, es, fr, it, pt, fi, pl Query Parameters
Response
The documents.