Biklo for developersTESTsandbox-api.biklo.comchange

Who am I

GET/v1/me

no scope required

The first call any integration makes: which environment you are talking to, which seller the key acts for, and what it may do. No scope required — a key can always describe itself.

Response#

FieldTypeDescription
api_versionstringAlways v1 for this API. A second version, if there ever is one, lives at a different base path — this will not change under you.
environmentstringWhich environment this key talks to. Worth checking on startup: a deploy that picked up the wrong key is far cheaper to catch here than after it lists a product.

Accepts test · live

is_sandboxbooleanThe same fact as a boolean, so a guard reads as one line. true means nothing you do here is real.
appobjectThe integration the key belongs to.
app.idintegerOur id for the integration.
app.namestringIts display name, as the seller who authorised it sees it.
app.vendorstringThe software vendor behind it.
keyobjectThe key you just presented. The secret itself is never returned — by this or anything else.
key.public_idstringA short, non-secret id for this key. Safe to log, and what support will ask you for.
key.scopesstring[]Exactly what this key may do. A call outside them fails with insufficient_scope, so read this rather than finding the boundary by hitting it.
key.expires_atstring|nullISO-8601 UTC, or null for a key that does not expire. Sandbox keys last 90 days — watch this and rotate before it lapses.
sellerobjectThe account this key acts for. Every endpoint in the API is scoped to it.
seller.user_idintegerOur id for the seller.
seller.namestringThe seller's name.
seller.is_companybooleanWhether the account is a company. The /v1/company endpoints only work when this is true.
shipping_addressobjectWhether this seller can ship anything at all. Check this on your first call. Products publish perfectly well without an address, look correct in the dashboard, and then the first real order has nowhere to ship from — this is the only place that says so in advance.
shipping_address.readybooleanfalse means there is no address. Create one with POST /v1/addresses before you sync a catalogue.
shipping_address.reasonstringno_address when not ready, otherwise null.
shipping_address.messagestringA sentence you can show to whoever set the integration up. Null when ready.
shipping_address.default_addressobjectThe address orders ship FROM, and the location a product published without a city_id inherits. Null when there is none.
shipping_address.default_address.idintegerIts id on /v1/addresses.
shipping_address.default_address.streetstringStreet and number.
shipping_address.default_address.citystringCity name.
shipping_address.default_address.countystringCounty name.
shipping_address.default_address.postal_codestringPostal code.
shipping_address.default_address.country_codestringISO 3166-1 alpha-2.
shipping_address.details_urlstringWhere to manage them: /v1/addresses.
rate_limitsobjectWhat this key is allowed. Exceeding either gives 429 with a Retry-After header.
rate_limits.per_minuteintegerRequests per minute.
rate_limits.per_dayintegerRequests per day.

Example

{
    "api_version": "v1",
    "environment": "test",
    "is_sandbox": true,
    "app": {
        "id": 1,
        "name": "EasySales (pilot)",
        "vendor": "easysales"
    },
    "key": {
        "public_id": "88e2fb06233a",
        "scopes": [
            "catalog.read",
            "products.read"
        ],
        "expires_at": null
    },
    "seller": {
        "user_id": 22,
        "name": "Bike Shop SRL",
        "is_company": true
    },
    "shipping_address": {
        "ready": true,
        "reason": null,
        "message": null,
        "default_address": {
            "id": 4812,
            "street": "Bulevardul Decebal 14",
            "city": "Craiova",
            "county": "Dolj",
            "postal_code": "200001",
            "country_code": "RO"
        },
        "details_url": "/v1/addresses"
    },
    "rate_limits": {
        "per_minute": 60,
        "per_day": 5000
    }
}

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/me" \
  -H "Authorization: Bearer bk_test_YOUR_KEY"
<?php

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

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/me");

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

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

data = response.json()
const response = await fetch("https://sandbox-api.biklo.com/v1/me", {
  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/me"))
    .header("Authorization", "Bearer bk_test_YOUR_KEY")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();

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