API e SDK

API e SDK

Integra Atli nella tua app o nel tuo sito, con le tue schermate.

Atli eSIM API

v1.0.0

Buy and manage travel eSIMs: browse the catalogue, quote and buy a plan, install and track an eSIM, share one as a gift, and run a group account.

Paths are unversioned and the version of this document is in info.version, as on heyatli.com's published API. A breaking change will arrive under a new base URL rather than by changing what a path here means.

URL di base
https://api.heyatli.com
File OpenAPI
https://api.heyatli.com/openapi.yaml

Percorsi principali

I percorsi principali dell’APIUn utente viene creato, riceve un preventivo, acquista e paga, riceve la eSIM, la installa e ne controlla l’uso. Rami facoltativi: un account vero, salvare una carta, una carta di gruppo, ricaricare, sconti e acquistare per condividere, poi condividere un link che qualcuno riscatta.
Crea un utentePOST /login
Ottieni un preventivoPOST /plan/quote
Acquista e pagaPOST /plan/purchase
Ricevi la eSIMGET /fulfillment/…
InstallaGET /esims
Controlla l’usoPOST /esims/{id}/sync
Account veroEmail, Telegram, WhatsApp
Salva una cartaStripe SetupIntent
Carta di gruppogroup_id
Ricaricatarget_esim_id
ScontiVoucher, crediti, inviti
Acquista per condividereis_gift, max_claims
Condividi il linkGET /public/gifts/{code}
RiscattaPuò richiedere un account vero
Percorso principaleFacoltativo

Scegli un percorso sulla mappa per vederne i passaggi.

SDK

Genera un client pronto all’uso per il tuo linguaggio dal nostro file OpenAPI.

docker run --rm -v "$PWD:/out" \
  openapitools/openapi-generator-cli generate \
  -i https://api.heyatli.com/openapi.yaml \
  -g typescript-fetch -o /out/atli-sdk

Authentication

Most routes need a bearer token, issued by signing in through /login, /register or one of the /oauth/* flows, and refreshed at /refresh. Each operation states whether a token is required, read when sent, or ignored. Tokens identify a person, not an application; there is no application API key yet.

Enums

A field with a listed set of values may gain new ones: that ships as a minor version, never a new base URL. Treat a value you do not recognise as one you do not handle yet, not as invalid, and never let it fail parsing.

Errors

Every failed request answers with the same body: a stable code, an English message, a trace_id to quote when reporting a problem, and sometimes params. Branch on code and never on message.

Vedi i codici di errore comuni
400

La richiesta non è valida

401

L’accesso manca o è scaduto

402

Il pagamento non è riuscito

403

Questo utente non può farlo

404

Non esiste, o non è suo

429

Troppe richieste: attendi il tempo di Retry-After

500

Si è verificato un problema da parte nostra

Rate limits

Sign-in, registration, token refresh, email codes, voucher redemption, quotes, reviews and eSIM sync are throttled per caller. A refused request answers 429 with Retry-After in whole seconds, alongside X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Wait out Retry-After rather than retrying in a loop.

Language and currency

Send X-Locale (or Accept-Language, or ?lang=) to choose the language; the language answered in comes back as Content-Language, falling back to English. Prices follow the signed-in person's currency, or the currency a quote asks for.

Buying a plan

Quote first at /plan/quote, then pass the quote_id to /plan/purchase so the price you showed is the price charged. Send an idempotency_key on every purchase: the same key never buys twice.