Biklo for developersTESTsandbox-api.biklo.comchange

Attributes for a category

GET/v1/categories/{id}/attributes

scope catalog.read

The attributes a listing in this category must carry, including everything inherited from parent categories. Nothing can be published until the required ones are supplied — send these ids back in attributes when creating a product.

Query parameters#

NameExample
langroLanguage for names and option values

Response#

FieldTypeDescription
category_idintegerThe category these attributes belong to.
languagestringWhich language the names and option values came back in.
countintegerHow many attributes.
dataarrayThe attributes for this category. Read this BEFORE your first push: which are mandatory is decided per category, and a create missing one fails with missing_required_attribute.
data[].idintegerThe MASTER id, and what you send as attributes[].field_id.
data[].tidintegerThis attribute's id in the requested language. For matching only.
data[].namestringDisplay name — Brand, Frame size, and so on.
data[].slugstringA stable machine-readable name. Map your own field onto this, not onto the translated label.
data[].typestringHow the attribute is answered. Anything carrying options takes an option_id; a free-text type takes value instead.
data[].requiredbooleanWhether a product in this category must carry it. This is the list that decides whether your create succeeds.
data[].optionsarrayThe allowed values, where the attribute has a fixed list. Absent or empty means free text.
data[].options[].idintegerThe MASTER option id, and what you send as attributes[].option_id.
data[].options[].tidintegerThe option id in the requested language. For matching only.
data[].options[].valuestringThe option as buyers see it.
data[].options[].slugstringA stable name for the option. Map your own values onto this rather than the translated text.

Example

{
    "category_id": 4291,
    "language": "ro",
    "count": 9,
    "data": [
        {
            "id": 32,
            "tid": 32,
            "name": "Brand",
            "slug": "brand",
            "type": "checkbox_multiple",
            "required": true,
            "options": [
                {
                    "id": 226,
                    "tid": 226,
                    "value": "Avid",
                    "slug": "avid"
                }
            ]
        }
    ]
}

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

$ch = curl_init('https://sandbox-api.biklo.com/v1/categories/711/attributes?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/711/attributes?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/711/attributes?lang=ro",
    headers={"Authorization": "Bearer bk_test_YOUR_KEY"},
)

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

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