Biklo for developersTESTsandbox-api.biklo.comchange

Update stock only

PATCH/v1/products/{id}/stock

scope products.write

The cheap path for stock. One UPDATE, nothing else touched.

Request body#

FieldTypeRequiredDescription
stockintegeroptionalUnits available — buyers can order up to this many at once. A non-negative integer; anything else is invalid_stock (400). Biklo lowers it as orders are paid. Setting 0 does not delist the product — it stays visible and unbuyable; to take it off the marketplace, POST /v1/products/{id}/archive. When a Biklo order took the LAST pieces the listing is sold and archived (product.sold); sending stock above 0 then puts it back on sale by itself.
priceintegeroptionalThis route accepts price as well, in minor units. At least one of the two must be present, or you get nothing_to_update (400).

Example

{
    "stock": 2
}

Response#

Returns the same object as One product (GET /v1/products/{id}), described in full there.

Example

{
    "id": 237224,
    "external_id": "ERP-1001",
    "sku": "MTB-29-001",
    "gtin": null,
    "mpn": null,
    "ean": null,
    "title": "Bicicleta MTB Hardtail 29 inch",
    "description": "A hardtail mountain bike in very good condition, barely used.",
    "category_id": 4291,
    "status": "active",
    "is_reviewed": true,
    "price": {
        "amount": 249900,
        "currency": "RON",
        "negotiable": true
    },
    "stock": 4,
    "shipping": {
        "ship_with_us": true,
        "free_shipping": false,
        "shipping_class": "bike",
        "parcel_tier": "large",
        "weight_kg": 14.5,
        "width_cm": 80,
        "height_cm": 120,
        "length_cm": 180
    },
    "group_id": null,
    "images": [
        {
            "id": 108876841,
            "position": 0,
            "path": "files/237224/mtb-front.jpg",
            "source_url": null
        }
    ],
    "attributes": [
        {
            "field_id": 32,
            "option_id": 226,
            "value": null
        }
    ],
    "created_at": "2026-09-01T08:14:22Z",
    "updated_at": "2026-09-11T16:02:51Z"
}

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

curl -X PATCH "https://sandbox-api.biklo.com/v1/products/711/stock" \
  -H "Authorization: Bearer bk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "stock": 2
}'
<?php

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

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'PATCH',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer bk_test_YOUR_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
      'stock' => 2,
    ]),
]);

$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("PATCH"),
    "https://sandbox-api.biklo.com/v1/products/711/stock");

request.Content = new StringContent(
    @"{ ""stock"": 2 }",
    System.Text.Encoding.UTF8,
    "application/json");

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

response = requests.patch(
    "https://sandbox-api.biklo.com/v1/products/711/stock",
    headers={"Authorization": "Bearer bk_test_YOUR_KEY"},
    json={
        "stock": 2
    },
)

data = response.json()
const response = await fetch("https://sandbox-api.biklo.com/v1/products/711/stock", {
  method: "PATCH",
  headers: {
    Authorization: "Bearer bk_test_YOUR_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
      "stock": 2
  })
});

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/products/711/stock"))
    .header("Authorization", "Bearer bk_test_YOUR_KEY")
    .header("Content-Type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString(
        "{ \"stock\": 2 }"))
    .build();

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