Skip to main content

GET Get Inventories

Info: Retrieve a complete list of inventories to keep track of available resources. Use offsets for large datasets.

This endpoint returns a paginated list of all eSIM inventories available to the authenticated user.

Configure the API Endpoint

https://esim.betatel.com/api/v1/esim/inventories
  • 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

Tip: Employ 'offset' and 'count' parameters wisely for smooth pagination when handling extensive inventories.

ParamTypeRequiredDefaultDescription
offsetintegeroptional0Pagination offset
countintegeroptional20Number of items to return

Example Response

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

Example Response
{
"total": 1,
"offset": 0,
"count": 1,
"inventories": [
{
"id": 51952,
"name": "Betatel LTD Inventory 1",
"created_date": 1761330317000,
"modified_date": 1761330317000,
"company": 72571,
"parent_inventory": 1,
"status": "Active",
"wallet": 99612820,
"whitelist": 11599
}
]
}

The response includes the total number of inventories, current pagination offset, number of items returned, and an array of inventory objects with detailed information.

Inventory Object

FieldTypeDescription
idintegerInventory identifier
namestringInventory name
created_dateintegerCreation date in milliseconds
modified_dateintegerModification date in milliseconds
companyintegerCompany identifier
parent_inventoryintegerIdentifier for parent inventory
statusstringInventory status
walletintegerWallet identifier
whitelistintegerWhitelist identifier

Code Snippets

Warning: Double-check header information, as correct keys are vital to access the full spectrum of inventory data.

Example - cURL
curl --location 'https://esim.betatel.com/api/v1/esim/inventories?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: Invalid parameters will result in a '400' error. Ensure that API keys are correct to authenticate requests.

  • 400 - Bad Request - Invalid parameters
  • 401 - Unauthorized - Invalid or missing API key