Table of Contents

API : SIM Create

Introduction

This request will create one or more SIM cards.

This is used by an ADMIN to add newly minted SIM cards. A maximum of 10003 lines per request is allowed.

Request

URL https://api.telecomx.dk/sim
Method POST
Access level ADMIN.
Body data String A blob of text with one SIM card per line, in the CSV format:
ICC;IMSI;PUK1;PUK2;PIN1;PIN2;FORM_FACTOR;NETWORK;ACTIVATION_CODE;IN_STORAGE_AT;TAG;AUTO_ASSIGN
The first 8 fields are required, the last 4 are optional (a line must have 8-12 fields).
ICC: 18-20 digits with an optional trailing letter.
IMSI: must start with 238 (13-18 digits total).
PUK1/PUK2/PIN1/PIN2: digits, may be empty.
FORM_FACTOR: MINI_MICRO, NANO or MINI_MICRO_NANO.
NETWORK: TELENOR or TDC.
IN_STORAGE_AT: id of an existing customer, or empty.
AUTO_ASSIGN: the literal true to mark auto-assign, anything else is false.
Lines that are invalid, have the wrong field count, or repeat a known SIM number are silently skipped.

Request body example

{
  "data": "8945000000000000001;238010000000001;587896;589756;1234;4321;NANO;TELENOR\n8945000000000000002;238010000000002;111111;222222;0000;9999;MINI_MICRO_NANO;TDC;;650000000000000000000101;poolA;true"
}

Response

Json object
success Boolean True on success
count Number Number of SIM cards that were imported

Example

{
  "success": true,
  "count": 2
}

Errors

Error code Message Description
404 data Data is missing
409 data Too many lines - max. 10003 lines pr. request allowed
422 data No valid SIMs found in data
422 inStorageAt Invalid “inStorageAt”-property (a storage customer does not exist)
403 access_denied Insufficient access level
500 internal_error <Unspecified>