Biklo for developersTESTsandbox-api.biklo.comchange

Read a variant group

GET/v1/product-groups/{externalGroupId}

scope products.read

By your own group id.

Response#

FieldTypeDescription
external_group_idstringYour own id for the parent product.
group_idinteger|nullOur id for the group.
countintegerHow many variants are in it.
variantsarrayThe products in the group.
variants[].product_idintegerOur product id.
variants[].external_idstring|nullYour product id.
variants[].skustring|nullYour SKU.
variants[].titlestringThe listing title.
variants[].priceobjectIts price.
variants[].price.amountinteger|nullMinor units. Variants may be priced differently — a group does not force one price.
variants[].stockinteger|nullUnits available for this variant.
variants[].sizestring|nullIts size axis, as you set it.
variants[].colorstring|nullIts colour axis.
variants[].genderstring|nullIts gender axis.
variants[].is_representativebooleanThe one variant the storefront shows as the group's card. The others are reachable through the picker on it.

Example

{
    "external_group_id": "ERP-1001-GROUP",
    "group_id": 904,
    "count": 2,
    "variants": [
        {
            "product_id": 237224,
            "external_id": "ERP-1001",
            "sku": "MTB-29-001-S",
            "title": "Bicicleta MTB Hardtail 29 inch",
            "price": {
                "amount": 249900
            },
            "stock": 4,
            "size": "S",
            "color": "Negru",
            "gender": null,
            "is_representative": true
        },
        {
            "product_id": 237225,
            "external_id": "ERP-1001-M",
            "sku": "MTB-29-001-M",
            "title": "Bicicleta MTB Hardtail 29 inch",
            "price": {
                "amount": 249900
            },
            "stock": 2,
            "size": "M",
            "color": "Negru",
            "gender": null,
            "is_representative": false
        }
    ]
}

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/product-groups/ERP-GROUP-1" \
  -H "Authorization: Bearer bk_test_YOUR_KEY"
<?php

$ch = curl_init('https://sandbox-api.biklo.com/v1/product-groups/ERP-GROUP-1');

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/product-groups/ERP-GROUP-1");

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

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

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

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