Biklo for developersTESTsandbox-api.biklo.comchange

List the category tree

GET/v1/categories

scope catalog.read

The whole tree in one response — an ERP caches it. id is the Romanian master id and never changes between languages; tid is the row in the language you asked for. Only leaves accept listings. Each category carries its commission — the rate Biklo charges a company seller here, inherited down the tree — so you can set margins before listing rather than inferring the fee from a completed order. max_amount: null means UNCAPPED.

Query parameters#

NameExample
langroLanguage code from GET /v1/languages
parent_id—Only the children of this category

Response#

FieldTypeDescription
languagestringWhich language these names came back in.
countintegerHow many categories are in data. The tree comes back whole, not paged.
dataarrayEvery category, flat. Rebuild the tree from parent_id.
data[].idintegerThe MASTER id, and the one to send back as category_id. It is the same whatever language you asked for, so this is the one to store.
data[].tidintegerThe id of this row in the requested language. Useful only for matching a name you already hold; never send it.
data[].parent_idintegerThe parent category, for rebuilding the tree.
data[].namestringDisplay name in the requested language.
data[].slugstringURL segment for this category.
data[].depthintegerHow deep in the tree, top level being 0.
data[].is_leafbooleanWhether it has no children. List against a LEAF: a parent category will take the product, but buyers filter on leaves.
data[].shippingobjectWhat this category implies about delivery.
data[].shipping.can_be_shippedbooleanfalse means products here cannot go by courier at all, whatever you put in shipping.ship_with_us.
data[].shipping.default_weight_kgnumberThe weight assumed when a listing declares none. Send a real one — this is a fallback, not a quote.

Example

{
    "language": "ro",
    "count": 210,
    "data": [
        {
            "id": 4291,
            "tid": 4291,
            "parent_id": 5,
            "name": "Hardtail",
            "slug": "hardtail",
            "depth": 2,
            "is_leaf": true,
            "shipping": {
                "can_be_shipped": true,
                "default_weight_kg": 14
            }
        }
    ]
}

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/categories?lang=ro" \
  -H "Authorization: Bearer bk_test_YOUR_KEY"
<?php

$ch = curl_init('https://sandbox-api.biklo.com/v1/categories?lang=ro');

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/categories?lang=ro");

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

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

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

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