api:sim:list
Table of Contents
API : SIM List
Introduction
This request will return a list of unused SIM cards.
A SIM card can be assigned to a customer or reseller by a reseller or admin (see Assign). This will indicate that the SIM card is in storage at that customer or reseller, waiting to be used.
A reseller may also assign SIM cards she holds to her customers.
Request
| URL | https://api.telecomx.dk/sim | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer at which the SIM card are in storage. RESELLER if customer who has the SIM cards in storage belongs to the reseller. ADMIN. |
|
| Query | customer | Id of customer the SIM card(s) must be in storage at. Automatically set for VIEWER, MANAGER and OWNER. If not set by RESELLER then it will show all the resellers customers and the reseller itself. |
| formFactor | [optional] A form factor the SIM must be of: MINI_MICRO, NANO or MINI_MICRO_NANO. |
|
| network | [optional] The network the SIM must work on: TELENOR or TDC. |
|
| filter | [optional] A SIM card number (ICC) or tag, or part of it. Matched as a literal substring, max 128 chars. |
|
| offset | [optional] Index of the first SIM to return, default 0. |
|
| limit | [optional] The number of SIMs to return, default 100, min 1, max 1000. |
|
| autoAssign | [optional] If true, only returns auto-assign SIM-cards. If false, only return non-auto-assign SIM-cards. If omitted, it will return SIM-cards no matter their auto-assign property. |
|
Query examples
https://api.telecomx.dk/sim https://api.telecomx.dk/sim?customer=1234567890ABCDEF1234567890 https://api.telecomx.dk/sim?customer=1234567890ABCDEF1234567890&filter=1234532&offset=100&limit=50&formFactor=NANO
Response
| JSON object | |
|---|---|
| offset | Index of the first SIM card returned. |
| limit | Number of SIM cards to return. Note that the actual number of SIM cards returned may be lower. |
| total | Number of SIM cards that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| sims | Array of SIM cards, see definition below. |
| SIM card object (JSON) | ||
|---|---|---|
| _id | String | SIM card number (ICC). |
| imsi | String | IMSI number. |
| puk1 | String | PUK 1 code. |
| puk2 | String | PUK 2 code. |
| pin1 | String | PIN 1 code. |
| pin2 | String | PIN 2 code. |
| formFactor | String | Physical size of the SIM card: MINI_MICRO, NANO, MINI_MICRO_NANO, eSIM, eSIM_SMARTWATCH. |
| network | String | The network the SIM is for: TELENOR or TDC |
| inStorageAt | Id | Id of the customer or reseller where the SIM card is in storage at. Null if Held by Telecom X. |
| autoAssign | Boolean | If a SIM-card is an “auto-assign” SIM, it means that when new MVNO accounts are created on the reseller's customer, this SIM can be automatically assigned to the MVNO. Can be used by resellers who have a storage of SIM cards. |
| inStorageAtName | String | Name of the customer or reseller the SIM card is in storage at. |
| tag | String | Tag for pool selection. |
| lastChecked | Date | Date when the SIM availability was last checked. |
| willBeUsedBy | Id | Id of MVNO account that has reserved this SIM. |
| activationCode | String | eSIM activation code. |
Note that properties holding no value may be omitted from the object.
Example - normal
{ "offset": 0, "limit": 50, "total": 500, "sims": [ { "_id": "8945000000000000001", "imsi": "238010000000001", "puk1": "587896", "puk2": "589756", "pin1": "1234", "pin2": "4321", "formFactor": "NANO", "network": "TELENOR", "inStorageAt": "650000000000000000000101", "inStorageAtName": "Example Company", "autoAssign": false }, { "_id": "8945000000000000002", "imsi": "238010000000002", "puk1": "111111", "puk2": "222222", "pin1": "0000", "pin2": "9999", "formFactor": "MINI_MICRO_NANO", "network": "TDC", "inStorageAt": null, "autoAssign": false } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | <query parameter> | A query parameter is invalid (the error code holds the parameter name) |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sim/list.txt · Last modified: by Mikkel Meerwaldt Jørgensen