SOTEL

Sotel eSIMs API simplifies eSIM management by enabling businesses to activate, provision, and switch eSIMs across global networks. This API allows fintechs, banks, travel agencies, tourism companies, and aviation firms to seamlessly offer eSIMs to their customers, providing a streamlined and scalable global connectivity experience.

Authenticating your API calls

Key Encryption

This service allows you to generate a bearer token that will be used in authenticating your API calls to Sotel. It expects a string of your 'Live API Key' in a JSON request. Sotel in turn returns the bearer token in the encrytedKey field. See sample request and response below:

Endpoint : https://api.termii.com/api/esim/authenticate

Request Type : POST

Request Sample

curl --location 'https://api.termii.com/api/esim/authenticate' \ --header 'Content-Type: application/json' \ --data '{ "api_key":"YOUR_LIVE_API_KEY" }'

Response

  {
     "token": "eyJhbGciOiJIUzUxMiJ9.eyJhcHAiOjEsInN1YiI6MSwiY291bnRyeSI6Ik5pZ2VyaWEiLCJjcmVhdGVkIjoxNzI4Mzk1OTU5NjE5LCJpc3MiOjEsImFkbWluIjoxLCJncmFudCI6IiIsImV4cCI6MTcyODQ4MjM1OSwiaWF0IjoxNzI4Mzk1OTU5LCJlbWFpbCI6ImFkZW9sYS5lbGVnYmVkZUB0ZXJtaWkuY29tIn0.q6Whz1g4NISj4gdAtpbECWK_XsaSv005U2zg0sL6cKEmWVlWEXg0sRDiX1cmjOhwb5eJC7am_6XiLHI-Ow22YQ"     
  }

Get Data Plan

When Subscribing to a new product plan or creating a new eSIM, the Product ID must be included in the request body. You can query product plans specific to a country or region by using this endpoint, filtering by country and region. Sotel will return a list of all available product plans for the specified country or region. Alternatively, if no country or region is provided in the query parameters, the endpoint will return a list of all available product plans globally. See sample request and response below:

Endpoint : https://api.termii.com/api/esim/data/plan/all

Request Type : GET

Request Sample

The code snippet below shows an example request to get list of products

curl --location --globoff 'https://api.termii.com/api/esim/data/plan/all?country=Nigeria&region=Africa' \ --header 'x-token: bearer-token' \'

Response

  {
  "content": [
    {
      "id": 1344,
      "uuid": "67d625e9-8ad8-432a-9278-63a622e6976c",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc7fdfb",
      "name": "Africa Bundle-5 GB 15 Days",
      "dataUsageAllowance": 5,
      "timeAllowance": 1296000,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    },
    {
      "id": 1317,
      "uuid": "1824d252-88e4-4764-91fc-0b9b52897bd2",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc7fe19",
      "name": "Africa Bundle-3 GB 7 Days",
      "dataUsageAllowance": 3,
      "timeAllowance": 604800,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    },
    {
      "id": 1227,
      "uuid": "750df6df-65f8-4df4-b858-148d54ddb5d5",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc7fe03",
      "name": "Africa Bundle-1 GB 5 Days",
      "dataUsageAllowance": 1,
      "timeAllowance": 432000,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    },
    {
      "id": 1034,
      "uuid": "b709ea72-4a89-40a0-99ab-2fc3d3695379",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc7fff9",
      "name": "Nigeria-3 GB 7 Days",
      "dataUsageAllowance": 3,
      "timeAllowance": 604800,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    },
    {
      "id": 931,
      "uuid": "e7fa2f6b-96ee-4e01-ab0e-2df1ae8f3a4e",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc7fff4",
      "name": "Nigeria-10 GB 30 Days",
      "dataUsageAllowance": 10,
      "timeAllowance": 2592000,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    },
    {
      "id": 919,
      "uuid": "fe63a7e1-64fb-4d3f-adad-be9717878930",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc7fff7",
      "name": "Nigeria-5 GB 15 Days",
      "dataUsageAllowance": 5,
      "timeAllowance": 1296000,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    },
    {
      "id": 701,
      "uuid": "aba43e63-cc21-4129-b931-d1387aac490f",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc80017",
      "name": "Nigeria-1 GB 5 Days",
      "dataUsageAllowance": 1,
      "timeAllowance": 432000,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    },
    {
      "id": 156,
      "uuid": "5c58f49e-5b70-44cb-9f42-239d64df9f3d",
      "active": true,
      "version": 0,
      "createdAt": "2024-10-02 21:11:56",
      "updatedAt": "2024-10-02 21:11:56",
      "productId": "66b5db0b899f794eccc7fdff",
      "name": "Africa Bundle-10 GB 30 Days",
      "dataUsageAllowance": 10,
      "timeAllowance": 2592000,
      "country": "Nigeria",
      "countryIso3": "NGA",
      "region": "Africa"
    }
  ],
  "pageable": {
    "pageNumber": 0,
    "pageSize": 15,
    "sort": {
      "unsorted": false,
      "sorted": true,
      "empty": false
    },
    "offset": 0,
    "unpaged": false,
    "paged": true
  },
  "totalElements": 8,
  "totalPages": 1,
  "last": true,
  "numberOfElements": 8,
  "number": 0,
  "size": 15,
  "first": true,
  "sort": {
    "unsorted": false,
    "sorted": true,
    "empty": false
  },
  "empty": false
}

Create eSIM

To provision an eSIM, the business must include the Product ID in the request payload. The Product ID represents the specific eSIM product the customer wishes to subscribe to. Upon successful provisioning, Sotel will return all relevant information, including the ICCID of the newly provisioned eSIM, along with other necessary details. See sample request and response below:

Endpoint : https://api.termii.com/api/esim/create

Request Type : POST

Request Sample

The code snippet below shows an example request to create a new eSIM

   curl --location 'https://api.termii.com/api/esim/create' \
--header 'Content-Type: application/json' \
--header 'x-token: bearer-token' \'
--data '{
    "productId":"66b5db0b899f794eccc7fdfb"
}'

Response

     {
  "sim": {
    "iccid": "8910300000015900472"
  },
  "dataPlan": {
    "productId": "4889r8983493mmds55",
    "name": "Nigeria 15 gig 15 days",
    "dataUsageAllowance": "8276783",
    "timeAllowance": "863264869638",
    "country": "Nigeria",
    "countryIso3": "NGN",
    "region": "Africa"
  }
}

Create Product Subscription

To subscribe an existing eSIm to a new product plan, the business must provide the customer’s ICCID and **Product ID ** in the request payload. This ensures the new subscription is applied to the correct eSIM associated with the provided ICCID. Upon successful subscription, Sotel will return all relevant details, including information about the newly activated plan. See sample request and response below:

Endpoint : https://api.termii.com/api/esim/data/plan/subscribe

Request Type : POST

Request Sample

The code snippet below shows an example request to subscribe to a new product for an existing eSIM

 curl --location 'https://api.termii.com/api/esim/data/plan/subscribe' \
--header 'Content-Type: application/json' \
--header 'x-token: bearer-token' \'
--data '{
    "product":"66b5db0b899f794eccc7fdfb",
    "iccid":"8910300000015900472",
    "iso3":"NGA"}'

Response

    {
  "sim": {
    "iccid": "8910300000015900472"
  },
  "dataPlan": {
    "productId": "66b5db0b899f794eccc7fdfb",
    "name": "Nigeria 15 gig 15 days",
    "dataUsageAllowance": "8276783",
    "timeAllowance": "863264869638",
    "country": "Nigeria",
    "countryIso3": "NGN",
    "region": "Africa"
  }
}

Get euICCID Profile

To retrieve details for a specific ICCID, the business must include the customer’s ICCID in the request payload. Sotel will return all relevant information associated with the eSIM, including the profile details and other necessary data. See sample request and response below:

Endpoint : https://api.termii.com/api/esim/euicc/{ICCID}

Request Type : GET

Request Sample

The code snippet below shows an example request to get profile of a particular eSIM

  curl --location --globoff --request GET 'https://api.termii.com/api/esim/euicc/8910300000015900472?api_key=YOUR_LIVE_API_KEY' \
  --header 'Content-Type: application/json' \
  --header 'x-token: bearer-token' \'
  --data '{
      "productId":"66b5db0b899f794eccc7fdfb"
  }'

Response

    {
        "iccid": "8910300000015900472",
        "imsi": "260012161177711",
        "state": "RELEASED",
        "last_operation_date": 1703152943251,
        "activation_code": "LPA:1$consumer.rsp.global$TN2023122016124510672714",
        "reuse_remaining_count": 4,
        "cc_required": false,
        "release_date": 1703152943236
    }

Get Data Usage

To retrieve data usage details for a specific ICCID, the business must include the customer’s ICCID and the existing Product ID in the request payload. Sotel will return all relevant information, including the total data used out of the total data purchased. See sample request and response below:

Endpoint : https://api.termii.com/api/esim/subscriptions/usage/{ICCID}

Request Type : GET

Request Sample

The code snippet below shows an example request to get data usage for a particular eSIM

 curl --location --globoff --request GET 'https://api.termii.com/api/esim/subscriptions/usage/8910300000015900472' \
--header 'Content-Type: application/json' \
--header 'x-token: bearer-token' \'
--data '{
    "productId":"66b5db0b899f794eccc7fdfb"
}'

Response

  {
    "data_total_bytes": 10,
    "data_used_bytes": 10
  }

Get List of eSIMs Created

To retrieve a list of eSIMs created by a business, the business must include their Termii API Key in the request payload. Sotel will return the list of all eSIMs created by the business including all relevant information of the data plan for each eSIM See sample request and response below:

Endpoint : https://api.termii.com/api/esim/fetch/esims

Request Type : GET

Request Sample

The code snippet below shows an example request to get list of eSIMs created by a business

 curl --location 'https://api.termii.com/api/esim/fetch/esims' \
--header 'x-token: bearer-token' \'
--header 'page: 1' \
--header 'size: 15' \
--data ''

Response

 [{
  "sim":{
    "iccid":"8910300000015900472"
  },
  "dataPlan":{
    "productId":"jdvbjhdkzjkdkjjv",
    "name":"Nigeria 15 gig 15 days",
    "dataUsageAllowance":"8276783",
    "timeAllowance":"863264869638",
    "country":"Nigeria",
    "countryIso3":"NGN",
    "region":"Africa"
  }
},
  {
    "sim":{
      "iccid":"8910300000015900472"
    },
    "dataPlan":{
      "productId":"jdvbjhdkzjkdkjjv",
      "name":"Nigeria 15 gig 15 days",
      "dataUsageAllowance":"8276783",
      "timeAllowance":"863264869638",
      "country":"Nigeria",
      "countryIso3":"NGN",
      "region":"Africa"
    }
  }]
Updated at, Monday, October 14, 2024