import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const simCards = await client.simCards.list();
console.log(simCards.data);{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card",
"status": {
"value": "enabled",
"reason": "The SIM card is active, ready to connect to networks and consume data."
},
"type": "physical",
"iccid": "89310410106543789301",
"imsi": "081932214823362973",
"msisdn": "+13109976224",
"sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"tags": [
"personal",
"customers",
"active-customers"
],
"data_limit": {
"amount": "2048.0",
"unit": "MB"
},
"current_billing_period_consumed_data": {
"amount": "2049.0",
"unit": "MB"
},
"actions_in_progress": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"esim_installation_status": "released",
"version": "4.3",
"resources_with_in_progress_actions": [],
"eid": null,
"authorized_imeis": [
"106516771852751",
"534051870479563",
"508821468377961"
]
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Get all SIM cards belonging to the user that match the given filters.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const simCards = await client.simCards.list();
console.log(simCards.data);{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card",
"status": {
"value": "enabled",
"reason": "The SIM card is active, ready to connect to networks and consume data."
},
"type": "physical",
"iccid": "89310410106543789301",
"imsi": "081932214823362973",
"msisdn": "+13109976224",
"sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"tags": [
"personal",
"customers",
"active-customers"
],
"data_limit": {
"amount": "2048.0",
"unit": "MB"
},
"current_billing_period_consumed_data": {
"amount": "2049.0",
"unit": "MB"
},
"actions_in_progress": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"esim_installation_status": "released",
"version": "4.3",
"resources_with_in_progress_actions": [],
"eid": null,
"authorized_imeis": [
"106516771852751",
"534051870479563",
"508821468377961"
]
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter for SIM cards (deepObject style). Originally: filter[tags], filter[iccid], filter[status]
Show child attributes
A list of SIM card tags to filter on.<br/><br/> If the SIM card contains <b><i>all</i></b> of the given <code>tags</code> they will be found.<br/><br/> For example, if the SIM cards have the following tags: <ul>
<li><code>['customers', 'staff', 'test']</code> <li><code>['test']</code></li> <li><code>['customers']</code></li> </ul> Searching for <code>['customers', 'test']</code> returns only the first because it's the only one with both tags.<br/> Searching for <code>test</code> returns the first two SIMs, because both of them have such tag.<br/> Searching for <code>customers</code> returns the first and last SIMs.<br/>["personal", "customers", "active-customers"]A search string to partially match for the SIM card's ICCID.
"89310410106543789301"
Filter by a SIM card's status.
enabled, disabled, standby, data_limit_exceeded, unauthorized_imei It includes the associated SIM card group object in the response when present.
true
A valid SIM card group ID.
"47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9"
Sorts SIM cards by the given field. Defaults to ascending order unless field is prefixed with a minus sign.
current_billing_period_consumed_data.amount Successful response
Show child attributes
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
"sim_card"
Show child attributes
The current status of the SIM card. It will be one of the following: <br/>
<ul> <li><code>registering</code> - the card is being registered</li> <li><code>enabling</code> - the card is being enabled</li> <li><code>enabled</code> - the card is enabled and ready for use</li> <li><code>disabling</code> - the card is being disabled</li> <li><code>disabled</code> - the card has been disabled and cannot be used</li> <li><code>data_limit_exceeded</code> - the card has exceeded its data consumption limit</li> <li><code>setting_standby</code> - the process to set the card in stand by is in progress</li> <li><code>standby</code> - the card is in stand by</li> </ul> Transitioning between the enabled and disabled states may take a period of time.registering, enabling, enabled, disabling, disabled, data_limit_exceeded, setting_standby, standby "enabled"
It describes why the SIM card is in the current status.
"The SIM card is active, ready to connect to networks and consume data."
The type of SIM card
physical, esim "physical"
The ICCID is the identifier of the specific SIM card/chip. Each SIM is internationally identified by its integrated circuit card identifier (ICCID). ICCIDs are stored in the SIM card's memory and are also engraved or printed on the SIM card body during a process called personalization.
"89310410106543789301"
SIM cards are identified on their individual network operators by a unique International Mobile Subscriber Identity (IMSI). <br/> Mobile network operators connect mobile phone calls and communicate with their market SIM cards using their IMSIs. The IMSI is stored in the Subscriber Identity Module (SIM) inside the device and is sent by the device to the appropriate network. It is used to acquire the details of the device in the Home Location Register (HLR) or the Visitor Location Register (VLR).
"081932214823362973"
Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. <br/> MSISDN is defined by the E.164 numbering plan. It includes a country code and a National Destination Code which identifies the subscriber's operator.
"+13109976224"
The group SIMCardGroup identification. This attribute can be <code>null</code> when it's present in an associated resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Searchable tags associated with the SIM card
["personal", "customers", "active-customers"]Indicate whether the SIM card has any pending (in-progress) actions.
true
ISO 8601 formatted date-time indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date-time indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
The installation status of the eSIM. Only applicable for eSIM cards.
released, disabled "released"
The version of the SIM card.
"4.3"
List of resources with actions in progress.
[]The Embedded Identity Document (eID) for eSIM cards.
null
List of IMEIs authorized to use a given SIM card.
[
"106516771852751",
"534051870479563",
"508821468377961"
]Was this page helpful?