Partner API reference

All endpoints return JSON. You never send a price - you only say what you want to buy, and the server always calculates the price itself, so it can't be faked or tampered with.

Base URL:

Base URL
https://buyukesim.com/api/v1

Authentication

Send your API key as a Bearer token on every request below.

Note: adding balance is a website-only action (via your dashboard Magic Code), not part of this API - your API key cannot create or fund top-ups.

Header
Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx

Products

GET/api/v1/products

List Products

Fetch the UK Number product and all active Travel eSIM packages (with current package_code and price_usd) so you always know what's purchasable before calling Create Order.

Request
curl "https://buyukesim.com/api/v1/products" \
  -H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
Response
{
  "success": true,
  "data": {
    "discount_pct": 15,
    "uk_number": {
      "type": "uk_number",
      "retail_price_usd": 25,
      "price_usd": 21.25,
      "currency": "USD",
      "min_quantity": 1,
      "max_quantity": 10
    },
    "travel_data": [
      {
        "package_code": "GB_1GB_7D",
        "name": "United Kingdom 1GB / 7 Days",
        "location_code": "GB",
        "retail_price_usd": 5.99,
        "price_usd": 5.09,
        "volume_label": "1 GB",
        "duration": 7,
        "duration_unit": "DAY"
      }
    ]
  }
}

Orders

POST/api/v1/orders

Create Order - UK Number

Creates and instantly fulfills a UK Number (+44) order, deducted from your prepaid balance.

Request
curl -X POST "https://buyukesim.com/api/v1/orders" \
  -H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
  "product_type": "uk_number",
  "quantity": 1,
  "reference": "order-1234"
}'
Response
{
  "success": true,
  "data": {
    "order_id": 98421,
    "reference": "order-1234",
    "status": "paid",
    "product": {
      "type": "uk_number",
      "quantity": 1,
      "retail_price_usd": 25,
      "discount_pct": 15,
      "price_usd": 21.25
    },
    "lookup_code": "K7M9-2XP4",
    "created_at": "2026-07-06T20:00:00+00:00"
  }
}
POST/api/v1/orders

Create Order - Travel eSIM

Creates and instantly fulfills a Travel eSIM order for the given package_code.

Request
curl -X POST "https://buyukesim.com/api/v1/orders" \
  -H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
  "product_type": "travel_data",
  "package_code": "GB_1GB_7D",
  "reference": "order-1235"
}'
Response
{
  "success": true,
  "data": {
    "order_id": 98422,
    "reference": "order-1235",
    "status": "paid",
    "product": {
      "type": "travel_data",
      "package_code": "GB_1GB_7D",
      "package_name": "United Kingdom 1GB / 7 Days",
      "location_code": "GB",
      "retail_price_usd": 5.99,
      "discount_pct": 15,
      "price_usd": 5.09
    },
    "lookup_code": null,
    "created_at": "2026-07-06T20:00:00+00:00"
  }
}
GET/api/v1/orders/98421

Order Status

Check status and fetch QR / PUK details for an order you created.

Request
curl "https://buyukesim.com/api/v1/orders/98421" \
  -H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
Response
{
  "success": true,
  "data": {
    "order_id": 98421,
    "reference": "order-1234",
    "status": "paid",
    "product": { "type": "uk_number", "quantity": 1, "retail_price_usd": 25, "price_usd": 21.25 },
    "lookup_code": "K7M9-2XP4",
    "esim": {
      "ready": true,
      "items": [
        { "qr_code": "https://.../serve_qr.php?...", "iccid": "8944...", "puk_code": "12345678" }
      ]
    }
  }
}
GET/api/v1/orders/98422/usage

Travel eSIM Data Usage

Live remaining/used data, activation and expiry status for a Travel eSIM order, pulled fresh from the provider each call.

Request
curl "https://buyukesim.com/api/v1/orders/98422/usage" \
  -H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
Response
{
  "success": true,
  "data": {
    "order_id": 98422,
    "status": "paid",
    "package": {
      "package_code": "GB_1GB_7D",
      "name": "United Kingdom 1GB / 7 Days",
      "location_code": "GB",
      "volume_label": "1 GB",
      "duration": 7,
      "duration_unit": "DAY"
    },
    "usage": {
      "iccid": "8944...",
      "esim_status": "IN_USE",
      "smdp_status": "ENABLED",
      "total_volume_bytes": 1073741824,
      "used_volume_bytes": 214748364,
      "remaining_volume_bytes": 858993459,
      "usage_percent": 20.0,
      "total_duration": 7,
      "duration_unit": "DAY",
      "expired_time": "2026-07-13T20:00:00+00:00"
    }
  }
}

Error codes

Every error response has the same shape: a top-level success: false, plus an error object with a stable code field your code can check to know exactly what went wrong.

Error shape
{
  "success": false,
  "error": { "code": "insufficient_balance", "message": "..." }
}
HTTPcodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceInsufficient prepaid balance for this order's price.
404package_not_foundTravel package_code not found or no longer active.
429rate_limitRate limit exceeded - slow down requests.