Biklo for developersTESTsandbox-api.biklo.comchange

Accept an order

POST/v1/orders/{id}/accept

scope orders.write

Only a pending order can be accepted; anything else returns 409 with its current status. Accepting BOOKS THE COURIER, exactly as Accept does in the seller dashboard: the response carries the AWB (awb.number, awb.tracking_url), the label is ready at GET /v1/orders/{id}/label, tracking starts, and the buyer gets the usual emails and SMS. If the courier cannot be booked the order stays pending and nothing changed — fix the reason (courier_required, buyer_phone_missing, awb_generation_failed 502) and call again. A face-to-face order is accepted without a courier. This is also where you declare how the order is PACKED. Send nothing and one box per order line is assumed. Send parcels to combine lines into fewer boxes or split a line's pieces across boxes — the courier is quoted per parcel. Never more boxes than pieces. Reference lines by the id on each item from GET /v1/orders/{id}, and give dimensions in cm and kg like everywhere else. SHORT SHIPMENT: if you have fewer pieces of a line than were ordered, send items with how many you ship. The courier is booked for those pieces, and only once it returned an AWB are the lines reduced and the buyer refunded the product price of the missing pieces (delivery and fees are not refunded); a failed booking changes nothing. The order then carries quantity_ordered / quantity_short per line and the refund, order.items_changed is sent, and the listing is set to stock 0.

Request body#

FieldTypeRequiredDescription
itemsarrayoptionalShort shipment: the lines you ship FEWER pieces of than were ordered. Omit it to ship everything. Lines not listed ship in full.
items[].idintegerrequiredThe id of a line from GET /v1/orders/{id}. Not on this order → item_not_found (422).
items[].quantityintegerrequiredHow many pieces of that line you ship: 0 to the ordered quantity (the ordered quantity itself = no change). Anything else → quantity_invalid (422). 0 drops the line while other lines still ship; nothing at all left → nothing_left_reject_instead (422) — reject the order instead. When you also send parcels, pack these planned quantities.
parcelsarrayoptionalHow the order is PACKED. Omit it and one box per order line is assumed. Send it and the courier is quoted per box, so three products in one box is one parcel and one price.

Not supported Rejected with parcels_not_enabled (422) on a marketplace where seller-declared packing is switched off. Omit the key there.

parcels[].itemsarrayrequiredWhich order lines are in this box. A box with no items is rejected (parcel_empty) — an empty box is never a packing decision.
parcels[].items[].shipping_item_idintegerrequiredThe id of a line from GET /v1/orders/{id}. An id that is not on this order is rejected with parcel_item_unknown.
parcels[].items[].quantityintegeroptionalHow many units of that line are in this box. Defaults to 1; must be at least 1. Split a line across boxes by listing it in each with the right quantity. Every unit of every line must end up in exactly one box — anything left over or counted twice is rejected with parcel_items_unassigned.
parcels[].weight_kgnumberoptionalWeight of the packed box in kilograms, decimals allowed. Defaults to 0. Converted to grams internally, so 2.4 is exact.
parcels[].length_cmnumberoptionalCentimetres, decimals allowed. Defaults to 0.
parcels[].width_cmnumberoptionalCentimetres, decimals allowed. Defaults to 0.
parcels[].height_cmnumberoptionalCentimetres, decimals allowed. Defaults to 0. Dimensions bigger than the class the order was sold on are ACCEPTED — we log it and the courier decides. You are not blocked for packing honestly.

Example

{
    "items": [
        {
            "id": 1123,
            "quantity": 1
        }
    ],
    "parcels": [
        {
            "items": [
                {
                    "shipping_item_id": 1123,
                    "quantity": 2
                },
                {
                    "shipping_item_id": 1124,
                    "quantity": 1
                }
            ],
            "weight_kg": 2.4,
            "length_cm": 40,
            "width_cm": 30,
            "height_cm": 20
        }
    ]
}

Response#

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

Example

{
    "id": 711,
    "reference": "SBXORD-SJP6NHXY",
    "status": "accepted",
    "can_accept": false,
    "has_awb": true,
    "total": {
        "amount": 359800,
        "currency": "RON"
    },
    "refunded": {
        "amount": 0,
        "currency": "RON"
    },
    "items": [
        {
            "id": 1123,
            "product_id": 237224,
            "external_id": "ERP-1001",
            "sku": "MTB-29-001",
            "title": "Bicicleta MTB Hardtail 29 inch",
            "quantity": 2,
            "quantity_ordered": 2,
            "quantity_short": 0,
            "unit_price": {
                "amount": 179900,
                "currency": "RON"
            },
            "total_price": {
                "amount": 359800,
                "currency": "RON"
            }
        }
    ],
    "awb": {
        "number": "SBX0000000711",
        "tracking_url": "https://sandbox-api.biklo.com/track/SBX0000000711"
    },
    "is_dropshipping": false,
    "created_at": "2026-09-11T09:20:14Z",
    "updated_at": "2026-09-11T10:02:47Z",
    "accepted_at": "2026-09-11T10:02:47Z",
    "delivered_at": null,
    "expires_at": "2026-09-13T09:20:14Z",
    "notes_from_buyer": "Please call before delivery.",
    "courier_id": 1,
    "seller_invoice": null,
    "fees": {
        "platform_fee": 17990,
        "shipping": 2500,
        "currency": "RON"
    },
    "delivery": {
        "recipient": "John Doe",
        "phone": "07xxxxxxxx",
        "city": "Craiova",
        "county": "Dolj",
        "postcode": "200000",
        "country": "RO",
        "is_locker": false
    },
    "refunds": [],
    "parcels": [
        {
            "id": 4012,
            "sequence_no": 1,
            "weight_kg": 2.4,
            "length_cm": 40,
            "width_cm": 30,
            "height_cm": 20,
            "is_seller_declared": true,
            "items": [
                {
                    "order_item_id": 1123,
                    "quantity": 2
                }
            ]
        }
    ]
}

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

curl -X POST "https://sandbox-api.biklo.com/v1/orders/711/accept" \
  -H "Authorization: Bearer bk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
        {
            "id": 1123,
            "quantity": 1
        }
    ],
    "parcels": [
        {
            "items": [
                {
                    "shipping_item_id": 1123,
                    "quantity": 2
                },
                {
                    "shipping_item_id": 1124,
                    "quantity": 1
                }
            ],
            "weight_kg": 2.4,
            "length_cm": 40,
            "width_cm": 30,
            "height_cm": 20
        }
    ]
}'
<?php

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

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer bk_test_YOUR_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
      'items' => [
        0 => [
          'id' => 1123,
          'quantity' => 1,
        ],
      ],
      'parcels' => [
        0 => [
          'items' => [
            0 => [
              'shipping_item_id' => 1123,
              'quantity' => 2,
            ],
            1 => [
              'shipping_item_id' => 1124,
              'quantity' => 1,
            ],
          ],
          'weight_kg' => 2.4,
          'length_cm' => 40,
          'width_cm' => 30,
          'height_cm' => 20,
        ],
      ],
    ]),
]);

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

request.Content = new StringContent(
    @"{ ""items"": [ { ""id"": 1123, ""quantity"": 1 } ], ""parcels"": [ { ""items"": [ { ""shipping_item_id"": 1123, ""quantity"": 2 }, { ""shipping_item_id"": 1124, ""quantity"": 1 } ], ""weight_kg"": 2.4, ""length_cm"": 40, ""width_cm"": 30, ""height_cm"": 20 } ] }",
    System.Text.Encoding.UTF8,
    "application/json");

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

response = requests.post(
    "https://sandbox-api.biklo.com/v1/orders/711/accept",
    headers={"Authorization": "Bearer bk_test_YOUR_KEY"},
    json={
        "items": [
            {
                "id": 1123,
                "quantity": 1
            }
        ],
        "parcels": [
            {
                "items": [
                    {
                        "shipping_item_id": 1123,
                        "quantity": 2
                    },
                    {
                        "shipping_item_id": 1124,
                        "quantity": 1
                    }
                ],
                "weight_kg": 2.4,
                "length_cm": 40,
                "width_cm": 30,
                "height_cm": 20
            }
        ]
    },
)

data = response.json()
const response = await fetch("https://sandbox-api.biklo.com/v1/orders/711/accept", {
  method: "POST",
  headers: {
    Authorization: "Bearer bk_test_YOUR_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
      "items": [
          {
              "id": 1123,
              "quantity": 1
          }
      ],
      "parcels": [
          {
              "items": [
                  {
                      "shipping_item_id": 1123,
                      "quantity": 2
                  },
                  {
                      "shipping_item_id": 1124,
                      "quantity": 1
                  }
              ],
              "weight_kg": 2.4,
              "length_cm": 40,
              "width_cm": 30,
              "height_cm": 20
          }
      ]
  })
});

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/orders/711/accept"))
    .header("Authorization", "Bearer bk_test_YOUR_KEY")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString(
        "{ \"items\": [ { \"id\": 1123, \"quantity\": 1 } ], \"parcels\": [ { \"items\": [ { \"shipping_item_id\": 1123, \"quantity\": 2 }, { \"shipping_item_id\": 1124, \"quantity\": 1 } ], \"weight_kg\": 2.4, \"length_cm\": 40, \"width_cm\": 30, \"height_cm\": 20 } ] }"))
    .build();

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