Biklo for developersTESTsandbox-api.biklo.comchange

Upload your invoice

POST/v1/orders/{id}/invoice

scope orders.write

YOUR fiscal invoice for the goods — Biklo does not issue it. Send a multipart file, or a url we reference without downloading.

Request body#

FieldTypeRequiredDescription
urlstringoptionalA link to your invoice. Required UNLESS you upload the document itself. Must parse as a URL, and is stored as a reference — we never fetch it, so it has to stay reachable for as long as the buyer may look at it. Send either this or a file; with neither you get no_invoice (400).

Accepts Any valid absolute URL

filefileoptionalThe invoice itself, sent as multipart/form-data rather than JSON. Takes precedence over url when both are sent. Stored on the same disk as a dashboard upload.

Accepts pdf · png · jpg · jpeg

Not supported Any other extension is rejected with invalid_invoice_type (400).

Example

{
    "url": "https://erp.example.com/invoices/FCT-2026-001.pdf"
}

Response#

FieldTypeDescription
order_idintegerThe order.
seller_invoicestringWhat was stored — the URL you gave us, or the path of the file you uploaded.

Example

{
    "order_id": 711,
    "seller_invoice": "https://erp.example.com/invoices/FCT-2026-001.pdf"
}

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/invoice" \
  -H "Authorization: Bearer bk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://erp.example.com/invoices/FCT-2026-001.pdf"
}'
<?php

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

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([
      'url' => 'https://erp.example.com/invoices/FCT-2026-001.pdf',
    ]),
]);

$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/invoice");

request.Content = new StringContent(
    @"{ ""url"": ""https://erp.example.com/invoices/FCT-2026-001.pdf"" }",
    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/invoice",
    headers={"Authorization": "Bearer bk_test_YOUR_KEY"},
    json={
        "url": "https://erp.example.com/invoices/FCT-2026-001.pdf"
    },
)

data = response.json()
const response = await fetch("https://sandbox-api.biklo.com/v1/orders/711/invoice", {
  method: "POST",
  headers: {
    Authorization: "Bearer bk_test_YOUR_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
      "url": "https://erp.example.com/invoices/FCT-2026-001.pdf"
  })
});

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/invoice"))
    .header("Authorization", "Bearer bk_test_YOUR_KEY")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString(
        "{ \"url\": \"https://erp.example.com/invoices/FCT-2026-001.pdf\" }"))
    .build();

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