iBOX API

Get started

Quickstart

From an API key to a booked parcel with a label, in four requests.

1. Get an API key

Sign in to the iBOX merchant portal, open Settings → API keys and create a key. It is shown once; keep it in your secret store and send it as a bearer token.

bash
export IBOX_API_KEY="ibx_live_…"

2. Find a locker

GET/v1/stations lists the lockers a customer can choose. Pass the parcel's size to see only lockers with a compartment it fits.

bash
curl "https://api.iboxdelivery.com/v1/stations?q=prishtina&size=M" \
  -H "Authorization: Bearer $IBOX_API_KEY"

3. Book the parcel

POST/v1/shipments with the locker, the parcel's dimensions and weight, and who is collecting it. We choose the compartment; see Parcel sizing.

bash
curl -X POST https://api.iboxdelivery.com/v1/shipments \
  -H "Authorization: Bearer $IBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-5501" \
  -d '{
    "destination_station_id": "ffb1cc4c-f43f-4e9a-a149-af7606aa9626",
    "parcel_size": { "length": 30, "width": 20, "height": 15 },
    "parcel_weight": 1.2,
    "recipient_name": "Arta Krasniqi",
    "recipient_phone": "+383 44 123 456",
    "recipient_language": "sq",
    "merchant_order_reference": "ORD-5501"
  }'
json
{
  "id": "1cb4fc3a-9ee8-4108-adc8-743b61fff8ed",
  "tracking_number": "IBX2513276175",
  "parcel_barcode": "PCL375588899602",
  "status": "booked",
  "parcel_size": { "length": 30, "width": 20, "height": 15 },
  "parcel_weight": 1.2,
  "compartment_size": "M",
  "recipient_name": "Arta Krasniqi",
  "merchant_order_reference": "ORD-5501",
  "destination": {
    "station_id": "ffb1cc4c-f43f-4e9a-a149-af7606aa9626",
    "slot_no": null
  },
  "stored_at": null,
  "retention_deadline_at": null,
  "picked_up_at": null,
  "created_at": "2026-11-13T09:14:02.118Z",
  "updated_at": "2026-11-13T09:14:02.391Z"
}

The Idempotency-Key makes the request safe to retry: send the same key again and you get the same parcel back, not a second one. See Idempotency.

4. Print the label

GET/v1/shipments/{id}/label returns a PDF to stick on the parcel. Its barcode is what the courier scans.

bash
curl https://api.iboxdelivery.com/v1/shipments/1cb4fc3a-9ee8-4108-adc8-743b61fff8ed/label \
  -H "Authorization: Bearer $IBOX_API_KEY" -o label.pdf

What happens next

An iBOX courier collects the parcel and deposits it in the locker. Your customer gets their pickup code by SMS, and you can follow it with tracking or webhooks.