curl --request GET \
--url https://{host}/v1/sellers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/sellers', 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/sellers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/sellers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"type": "sellers",
"id": "42",
"attributes": {
"name": "Horlogerie Mertens",
"slug": "horlogerie-mertens",
"city": "Maastricht",
"country": "NL",
"visible": true,
"acceptsPriceProposals": true,
"blocked": false,
"respondsWithin": "2 hours",
"webUrl": "https://wristler.eu/nl/juweliers/horlogerie-mertens",
"memberSince": "2019-06-01T08:00:00.000000Z",
"maximumDiscount": 10,
"logo": "https://cdn.wristler.eu/square-medium/horlogerie-mertens-logo.png"
},
"links": {
"self": "https://api.wristler.eu/v1/sellers/42"
}
}
]
}List businesses
Scope: watches:read, orders:read or catalogue:read — any one will do.
Exactly the businesses that granted you access, and nothing else. Start here: every other address below takes one of these ids.
For the Wristler app this address means something else: the shop directory
the website shows — every business that is open, by name. filter[q] searches
them the way the website does and filter[country] narrows them, and both come
back with meta.facets.country, the counts a filter panel is drawn from. The
counts are worked out with the country filter left off, so picking one does not
empty the panel it was picked in.
A partner never sees that list, and sending filter[q] or filter[country] is
refused with 400 search_only_filter rather than quietly ignored — a filter that
does nothing reads exactly like one that worked. When the search index cannot be
reached, a directory search answers 503 search_unavailable rather than an empty
page.
Paging. By number, for a directory search (filter[q] or filter[country]) and
the plain list alike: page[number] from 1 and page[size] up to 50, 25 when left
out. A page[size] above 50, or below 1, is refused with 400. Follow links.next.
curl --request GET \
--url https://{host}/v1/sellers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/sellers', 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/sellers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/sellers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"type": "sellers",
"id": "42",
"attributes": {
"name": "Horlogerie Mertens",
"slug": "horlogerie-mertens",
"city": "Maastricht",
"country": "NL",
"visible": true,
"acceptsPriceProposals": true,
"blocked": false,
"respondsWithin": "2 hours",
"webUrl": "https://wristler.eu/nl/juweliers/horlogerie-mertens",
"memberSince": "2019-06-01T08:00:00.000000Z",
"maximumDiscount": 10,
"logo": "https://cdn.wristler.eu/square-medium/horlogerie-mertens-logo.png"
},
"links": {
"self": "https://api.wristler.eu/v1/sellers/42"
}
}
]
}Authorizations
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
Related resources to return alongside, comma separated:
images— the shop's own pictures: their logo, and whatever else is on their page.cover— the one picture across the top of the shop's page, with the same sizes as a listing's images.nullfor a shop without one.statistics— what the business has been paid and what is waiting for them. Comes backnullwithoutorders:readand for a shop you do not act for: a shop page is one question, its turnover is another.
There is deliberately no watches: a seller's inventory is thousands of
listings, asked for at /v1/sellers/{sellerId}/watches where it is paged.
images, cover, statistics Response
The businesses this token may act for — or, for the app, the shop directory.