DataPlans
  • Introduction
  • Using the Web App
  • Using the API
  • FAQ
  • eSIM Products
    • DTAC Thailand Tourist eSIM
    • AIS SIM2Fly eSIMs
    • 3HK
    • Ubigi
    • GlobaleSIM
  • Plugins
  • eSIM Dashboard
  • @esimdataplans
  • DataPlans.io User Agreement
  • Privacy Policy
Powered by GitBook
On this page
  • Getting Started
  • Sandbox Environment
  • Live Environment
  • Run In Postman
  • eSIM Payload
  • API Delivery
  • Plan by Slug

Was this helpful?

Using the API

Start working with our eSIM API.

PreviousUsing the Web AppNextFAQ

Last updated 3 years ago

Was this helpful?

Getting Started

To get started using the API:

  1. View and / or

  2. Agree to the

  3. Fund your account and purchase an eSIM

Sandbox Environment

After login, you will be in the sandbox testing area, with test credit and eSIMs. With in the sandbox account you can:

  1. Make a deposit of funds

    1. Navigate to Billing > Make External Deposit

  2. Make a eSIM purchase

    1. Go to Products and choose one of the available choices

    2. Go to Purchases and review purchase history

  3. Generate your API Key

  4. Make API calls

Calling the sandbox API is done with the follwing endpoint:

https://sandbox.dataplans.io/api/v1

Live Environment

Once satisfied with your process, you can switch to the live environment. You can use the same API or roll a new one. The API key is the same for both Sandbox and Live enviroments.

In the live environment use the following endpoint:

https://app.dataplans.io/api/v1

Run In Postman

eSIM Payload

Purchasing an eSIM is possible once you have a positive account balance. When requesting the eSIM, your balance is deducted according to your current monthy tier.

API Delivery

When purchasing via API, you will receive a JSON eSIM payload. This provides both the manual entry data as well as the QR code for adding an eSIM.

{
  "purchase": {
    "purchaseId": "07045e84-a075-49f9-8eeb-f2f537d1f8eb",
    "planSlug": "tourist-sim-dtac",
    "retail": "299.00",
    "paid": "284.65",
    "currency": "THB",
    "purchasedAt": "2020-02-06T08:54:06.047Z",
    "esim": {
      "manual1": "ais.prod.ondemandconnectivity.com",
      "manual2": "hidden",
      "optionalCode": "",
      "phone": "0800773477",
      "serial": "8782979238792973",
      "expiryDate": "2020-02-06T08:18:20.022Z",
      "qrCodeString": "LPA:1$ais.prod.ondemandconnectivity.com$SEW7JEBMFGPRVSPD",
      "qrCodeDataUrl": "data:image/png;base64,iVBORw0KGgoAAAA..."
    }
  },
  "availableBalance": "15000"
}

Parameters

Description

manual1

String for manual entry of SM-DP+ Address

manual2

Sring for Activation Code

optionalCode

Confirmation Code. Used with some eSIM providers

phone

eSIM phone number

serial

eSIM Serial number

expiryDate

eSIM expiry date

qrCodeString

QR code payload string. Populate your custome QR code with this data.

qrCodeDataUrl

QR code PNG imag

Plan by Slug

GET https://app.dataplans.io/api/v1/plan/{slug}

Fetch plan details with slug

Path Parameters

Name
Type
Description

slug

string

Sample value:sim2fly-asia

{
  "id": 0,
  "slug": "sim2fly-asia",
  "name": "SIM2Fly Asia",
  "period": 8,
  "capacity": 6000,
  "capacityUnit": "MB",
  "retailPrice": "399.00",
  "priceCurrency": "THB",
  "prepaidCredit": 0,
  "prepaidCurrency": "THB",
  "reloadable": true,
  "phoneNumber": true,
  "active": true,
  "operator": {
    "slug": "ais",
    "name": "AIS"
  },
  "region": {
    "slug": "asia",
    "name": "Asia"
  },
  "countries": [
    {
      "countryCode": "AU",
      "countryName": "Australia"
    }
  ]
}

Additionally, you can interact with the with your API Key. Click the Authorize button and enter your API key to work with the API within the Swagger doc.

You can interact with the with your API Key.

Postman is a great way to work with our API and you can into your project.

Create an account
API docs
Postman example
User Agreement
Swagger API docs in sandbox
Swagger API docs in live mode
import our collection