API 및 SDK

API 및 SDK

내 앱이나 웹사이트의 내 화면에 Atli를 넣으세요.

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
https://api.heyatli.com
OpenAPI 파일
https://api.heyatli.com/openapi.yaml

주요 흐름

API의 주요 흐름사용자를 만들고, 견적을 받고, 구매 및 결제하고, eSIM을 받아 설치한 뒤 사용량을 확인합니다. 선택 분기: 정식 계정, 카드 저장, 그룹 카드, 충전, 할인, 공유용 구매, 그리고 링크를 공유해 상대방이 받는 흐름.
사용자 만들기POST /login
견적 받기POST /plan/quote
구매 및 결제POST /plan/purchase
eSIM 받기GET /fulfillment/…
설치GET /esims
사용량 확인POST /esims/{id}/sync
정식 계정이메일, Telegram, WhatsApp
카드 저장Stripe SetupIntent
그룹 카드group_id
충전target_esim_id
할인바우처, 크레딧, 추천
공유용 구매is_gift, max_claims
링크 공유GET /public/gifts/{code}
받기정식 계정이 필요할 수 있습니다
주요 흐름선택

지도에서 흐름을 선택하면 단계가 표시됩니다.

SDK

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.

자주 나오는 오류 코드 보기
400

요청이 잘못되었습니다

401

로그인 정보가 없거나 만료되었습니다

402

결제에 실패했습니다

403

이 사용자에게는 허용되지 않습니다

404

존재하지 않거나 이 사용자의 것이 아닙니다

429

요청이 너무 많습니다. Retry-After 시간만큼 기다리세요

500

저희 쪽에서 문제가 발생했습니다

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.