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 assign to a customer or reseller by an ADMIN. 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. |
| formFactor | [optional] A form factor the SIM must be of: MINI_MICRO, NANO, MINI_MICRO_NANO or eSIM. |
|
| network | [optional] The network the SIM must work on: TELENOR, TDC, TELIA. |
|
| filter | [optional] A SIM card number (ICC) or part of it. |
|
| offset | [optional] Index of the first SIM to return, default 0. |
|
| limit | [optional] The number of SIMs to return, default 100, min 1, max 500. |
|
| 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). |
| 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 or eSIM. |
| network | String | The network the SIM is for: TELENOR, TDC or TELIA |
| 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. |
Note that properties holding no value may be omitted from the object.
Example - normal
{ offset: 100, limit: 50, total: 500, sims: [ { _id: '1234567890123456789', puk1: '587896', puk2: '589756', pin1: '1234', pin2: '4321', formFactor: 'NANO', network: 'TELENOR', inStorageAt: '1234567890ABCDEF12345678', autoAssign: false }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | formFactor | Invalid form factor |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sim/list.txt · Last modified: 2024/02/15 12:47 by Joakim Andersen