{"openapi":"3.0.3","info":{"title":"Solution Telecom Mobile — Wholesale eSIM API","version":"1.0.0","description":"Wholesale eSIM provisioning for resellers. Prepaid balance, instant delivery.\n\n**Purchases cannot be refunded** — every buying endpoint requires an `Idempotency-Key`.","contact":{"name":"Partner support","email":"partners@solutiontelecommobile.com"}},"servers":[{"url":"https://solutiontelecommobile.com/v1","description":"Production and sandbox (the key decides)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Send `Authorization: Bearer stm_<environment>_<key>`. A `stm_sandbox_*` key never charges you and never contacts the carrier."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"insufficient_balance"},"message":{"type":"string"},"request_id":{"type":"string"}}}}},"Plan":{"type":"object","properties":{"sku":{"type":"string","example":"PFRQ8FIBC"},"name":{"type":"string","example":"Turkey 500MB/Day"},"destination":{"type":"string"},"region":{"type":"string"},"days":{"type":"integer"},"data_gb":{"type":"number"},"daily_allowance":{"type":"boolean"},"fup_policy":{"type":"string","nullable":true},"price_usd":{"type":"string","example":"0.3750"}}},"Order":{"type":"object","properties":{"id":{"type":"integer"},"environment":{"type":"string","enum":["producao","sandbox"]},"status":{"type":"string","enum":["pending","delivered","failed","cancelled"]},"sku":{"type":"string"},"quantity":{"type":"integer"},"unit_price_usd":{"type":"string","example":"0.3750"},"total_price_usd":{"type":"string","example":"0.3750"},"currency":{"type":"string","example":"USD"},"reference":{"type":"string","nullable":true,"description":"Your own id, echoed back"},"topup_of":{"type":"integer","nullable":true,"description":"Set when this order is a top-up of another"},"esims":{"type":"array","items":{"type":"object","properties":{"iccid":{"type":"string"},"activation_code":{"type":"string","example":"LPA:1$smdp.example$MATCHINGID","description":"The LPA string. Render it as a QR or hand it over as text."},"qrcode":{"type":"string","description":"Same payload, ready to encode"},"label":{"type":"string","nullable":true,"description":"Your own note on this line (traveller name, phone…). Set it in the portal or with POST /portal/esims/{iccid}/label. Only you see it."}}}},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}},"paths":{"/catalog":{"get":{"summary":"List the plans available to you, at your price","parameters":[{"name":"destination","in":"query","schema":{"type":"string"}},{"name":"country","in":"query","schema":{"type":"string"}},{"name":"days","in":"query","schema":{"type":"integer"}},{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Plans","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}}}}}}}}}},"/catalog/{sku}":{"get":{"summary":"One plan","parameters":[{"name":"sku","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Plan"},"404":{"description":"Not available to you"}}}},"/orders":{"get":{"summary":"Your orders","responses":{"200":{"description":"Orders"}}},"post":{"summary":"Buy an eSIM","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Reuse the SAME key when retrying. Purchases cannot be refunded."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sku"],"properties":{"sku":{"type":"string"},"quantity":{"type":"integer","default":1},"reference":{"type":"string","description":"Your own order id — comes back on every read"}}}}}},"responses":{"201":{"description":"Bought and delivered","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}}}}}},"400":{"description":"Missing Idempotency-Key"},"402":{"description":"Insufficient balance"},"409":{"description":"Key reused with a different body, or original still running"},"429":{"description":"Rate or hourly spend limit"},"502":{"description":"Carrier failed — you were refunded automatically"}}}},"/orders/{id}":{"get":{"summary":"One order, with the QR","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Order"},"404":{"description":"Not found"}}}},"/orders/{id}/topup":{"post":{"summary":"Add data to an eSIM you already sold","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Topped up"}}}},"/balance":{"get":{"summary":"Your prepaid balance","responses":{"200":{"description":"Balance"}}}},"/usage/{iccid}":{"get":{"summary":"How much data the traveller has used","parameters":[{"name":"iccid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Usage"}}}}}}