Skip to main content

GET Get Package Templates

Note: Before using package templates, verify their compatibility with your current eSIM configurations to avoid mismatches.

This endpoint returns a paginated list of all available package templates that can be used to create packages for eSIMs.

Configure the API Endpoint

https://esim.betatel.com/api/v1/esim/package-templates
  • Method: GET

Set Up the Headers

ParamValueDescription
Content-Typeapplication/jsonSpecifies the payload format.
x-api-key{{x-api-key}}Your unique API key for secure access.
x-user-id{{x-user-id}}Your user identifier for added security and tracking.

Query Parameters

Note: Query parameters allow specifying which page of the paginated results you want to retrieve, helpful for managing large datasets.

ParamTypeRequiredDefaultDescription
offsetintegeroptional0Pagination offset
countintegeroptional20Number of items to return

Example Response

Status Code: 200 OK
Content-Type: application/json

Example Response
{
"total": 50,
"offset": 0,
"count": 20,
"package_templates": [
{
"id": 21145354,
"name": "Basic Data Plan",
"description": "1GB Monthly Data Package",
"data_allowance": 1073741824,
"validity_days": 30,
"price": 10.00,
"currency": "USD"
}
]
}

The response includes the total number of package templates, current pagination offset, number of items returned, and an array of available package template objects.

Code Snippets

Tip: Choose a programming language snippet that aligns with your application stack for seamless API integration.

Example - cURL
curl --location 'https://esim.betatel.com/api/v1/esim/package-templates?offset=0&count=20' \
--header 'Accept: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--header 'x-user-id: {{x-user-id}}'

Error Handling

Important: Ensure parameters are valid to avoid '400' errors, especially when setting pagination options.

  • 400 - Bad Request - Invalid pagination parameters