Biklo for developersTESTsandbox-api.biklo.comchange

Countries (address taxonomy)

GET/v1/geo/countries

scope catalog.read

Countries for building an address. By default only the ones we sell in; pass all=1 for every country we hold.

Query parameters#

NameExample
all—1 to include countries we do not sell in

Response#

FieldTypeDescription
countintegerHow many countries.
dataarrayCountries with geo data, for building an address picker. GET /v1/countries is the shorter version of the same list.
data[].idintegerOur internal country id. The geo endpoints take this; the rest of the API takes code.
data[].codestringISO-2.
data[].namestringCountry name.
data[].currencystringThe currency listings there are priced in.
data[].phone_prefixstringDialling prefix, without the +.
data[].is_activebooleanWhether the platform currently operates there.

Example

{
    "count": 32,
    "data": [
        {
            "id": 190,
            "code": "RO",
            "name": "Romania",
            "currency": "RON",
            "phone_prefix": "40",
            "is_active": true
        }
    ]
}

Failures use the shared error envelope — a machine-readable code and a request_id to quote to support. Error handling.

curl -X GET "https://sandbox-api.biklo.com/v1/geo/countries" \
  -H "Authorization: Bearer bk_test_YOUR_KEY"
<?php

$ch = curl_init('https://sandbox-api.biklo.com/v1/geo/countries');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'GET',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer bk_test_YOUR_KEY',
    ],
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
using System.Net.Http;
using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", "bk_test_YOUR_KEY");

var request = new HttpRequestMessage(
    new HttpMethod("GET"),
    "https://sandbox-api.biklo.com/v1/geo/countries");

var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
import requests

response = requests.get(
    "https://sandbox-api.biklo.com/v1/geo/countries",
    headers={"Authorization": "Bearer bk_test_YOUR_KEY"},
)

data = response.json()
const response = await fetch("https://sandbox-api.biklo.com/v1/geo/countries", {
  method: "GET",
  headers: {
    Authorization: "Bearer bk_test_YOUR_KEY"
  }
});

const data = await response.json();
import java.net.http.*;
import java.net.URI;

var client = HttpClient.newHttpClient();

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://sandbox-api.biklo.com/v1/geo/countries"))
    .header("Authorization", "Bearer bk_test_YOUR_KEY")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();

var response = client.send(request, HttpResponse.BodyHandlers.ofString());