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:
https://buyukesim.com/api/v1Authentication
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.
Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxxProducts
/api/v1/productsList 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.
curl "https://buyukesim.com/api/v1/products" \
-H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"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
/api/v1/ordersCreate Order - UK Number
Creates and instantly fulfills a UK Number (+44) order, deducted from your prepaid balance.
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"
}'{
"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"
}
}/api/v1/ordersCreate Order - Travel eSIM
Creates and instantly fulfills a Travel eSIM order for the given package_code.
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"
}'{
"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"
}
}/api/v1/orders/98421Order Status
Check status and fetch QR / PUK details for an order you created.
curl "https://buyukesim.com/api/v1/orders/98421" \
-H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"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" }
]
}
}
}/api/v1/orders/98422/usageTravel eSIM Data Usage
Live remaining/used data, activation and expiry status for a Travel eSIM order, pulled fresh from the provider each call.
curl "https://buyukesim.com/api/v1/orders/98422/usage" \
-H "Authorization: Bearer buk_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"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.
{
"success": false,
"error": { "code": "insufficient_balance", "message": "..." }
}| HTTP | code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key. |
| 402 | insufficient_balance | Insufficient prepaid balance for this order's price. |
| 404 | package_not_found | Travel package_code not found or no longer active. |
| 429 | rate_limit | Rate limit exceeded - slow down requests. |
