curl --request GET \
--url https://{host}/v1/shipping-countries \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/shipping-countries', 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/shipping-countries",
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/shipping-countries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"jsonapi": {
"version": "1.0"
},
"data": [
{
"type": "shipping-countries",
"id": "AT",
"attributes": {
"importDuties": false
}
},
{
"type": "shipping-countries",
"id": "CH",
"attributes": {
"importDuties": true
}
},
{
"type": "shipping-countries",
"id": "IE",
"attributes": {
"importDuties": false
}
},
{
"type": "shipping-countries",
"id": "NL",
"attributes": {
"importDuties": false
}
}
],
"meta": {
"total": 4,
"quickPicks": {
"en": [
"IE",
"CH"
],
"nl": [
"NL",
"AT"
]
},
"defaultCountry": {
"en": "IE",
"nl": "NL"
}
}
}{
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}List shipping countries
Scope: catalogue:read — a guest token may read it.
The countries a checkout ships to: the website’s own list, so a country switched
off there disappears here too. Each row is an ISO 3166-1 alpha-2 code as id;
there are no names — name them in the app’s own language.
importDuties is true outside the EU customs union, which is when the website
shows its notice under the country field: “This watch ships from the European
Union. Import duties and taxes set by local customs may be charged in :country on
delivery and are not included in the total.”
meta.quickPicks holds the countries to show first, per language, and
meta.defaultCountry the one to preselect for a buyer without an address (the
first quick pick inside the EU). Both cover every language, so one answer can be
cached; a language that is not there uses en.
Not paged. Account addresses (/v1/me/addresses) take any country; only a
checkout is held to this list, and refuses anything else with
422 country_not_shipped_to.
curl --request GET \
--url https://{host}/v1/shipping-countries \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/shipping-countries', 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/shipping-countries",
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/shipping-countries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"jsonapi": {
"version": "1.0"
},
"data": [
{
"type": "shipping-countries",
"id": "AT",
"attributes": {
"importDuties": false
}
},
{
"type": "shipping-countries",
"id": "CH",
"attributes": {
"importDuties": true
}
},
{
"type": "shipping-countries",
"id": "IE",
"attributes": {
"importDuties": false
}
},
{
"type": "shipping-countries",
"id": "NL",
"attributes": {
"importDuties": false
}
}
],
"meta": {
"total": 4,
"quickPicks": {
"en": [
"IE",
"CH"
],
"nl": [
"NL",
"AT"
]
},
"defaultCountry": {
"en": "IE",
"nl": "NL"
}
}
}{
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}Authorizations
Response
Every country a checkout ships to, by code.