api:mvno:account:create
Table of Contents
API : MVNO Account Create
Introduction
This request will create a new MVNO account.
If the phone number is available for purchase, it will be purchased (added to the current invoice). If the phone number needs to be ported in from another telecom service provider, a porting will be created. As a reply to the creation the porting will also be included, so that you may use the porting API to set the requested porting date, create and send/download the power of attorney document for the customer to sign and add users to notify when the porting progresses.
Request
| URL | https://api.telecomx.dk/mvno | ||
|---|---|---|---|
| Method | POST | ||
| Access level | OWNER when user belongs to the customer RESELLER if customer belongs to the reseller. ADMIN. |
||
| Body | customer | Id | Id of customer the account belongs to. |
| number | String | The phone number in E.164 format. | |
| feature | Object | Settings that controls the features of the mobile phone (will overrule features set in ratePlan). | |
| feature.highRate | Boolean | [optional] Permit calls towards high rated numbers (homeland only), default true. |
|
| feature.international | Boolean | [optional] Permit calls towards international destinations, default true. |
|
| feature.data | Boolean | [optional] Enable data for homeland, default true. |
|
| feature.fiveG | Boolean | [optional] Enable 5G, default true. |
|
| feature.publicIP | Boolean | [optional] Data connections gets a public IP address instead of a private NAT'ed IP, default false. |
|
| feature.chargedServices | Boolean | [optional] Permit overcharged SMS and purchase of physical goods, default false. |
|
| feature.voicemail | Boolean | [optional] Enable voicemail on stand-alone phones, default false. |
|
| feature.secretNumber | Boolean | [optional] Secret a-number (do not present number), default false. |
|
| feature.roaming | Boolean | [optional] Permit roaming (outside homeland), default true. |
|
| feature.roamingData | Boolean | [optional] Enable data while roaming, if roaming is permitted, default true. |
|
| feature.mms | Boolean | Enable MMS. | |
| feature.dataTopUpSms | Boolean | If true, then a link allowing a mobile account to buy top-up data will be included in the SMS that warns the mobile user, that they are approaching their data limit. | |
| feature.smartWatchSim | Boolean | If true, then the MVNO account is allowed to add smartwatch. | |
| feature.disableHdAudio | Boolean | If true, HD audio support is disabled. | |
| Voicemail | Object | Voicemail settings, only if feature.voicemail is active and sipAccount and pbx is not. | |
| voicemail.notify | String | Notification method: NONE, SMS, EMAIL, BOTH. | |
| voicemail.email | String | E-mail address to send notification of new voicemail to, if enabled. | |
| voicemail.emailFile | Boolean | True to include recording in e-mail. | |
| voicemail.pin | String | Pincode to listen to voicemail from a foreign phone or via web. | |
| voicemail.defaultGreeting | String | Default greeting for stand alone voicemail. | |
| voicemail.greetings | Array | Custom greetings for standalone voicemail. | |
| voicemail.greetings[].key | String | Number to choose your greeting. | |
| voicemail.greetings[].fileId | ObjectID | Id for audio file on audio server. | |
| Misc | |||
| mvnoSim | String | ICC number of the new SIM card to use (18-20 digits). | |
| nosim | String | If created without sim should be used, leave ICC blank and set this to the network to use: TDC or TELENOR. | |
| esim | String | If an eSim should be used, leave ICC blank and set this to the network to use: TDC or TELENOR. | |
| autoAssignSim | Boolean | If an auto-assign SIM should be used, leave mvnoSim and esim blank, and set this property either TDC or TELENOR. | |
| donorSimNumber | String | [optional] ICC number of the SIM card at the donor operator that currently has the phone number to port. |
|
| sipAccount | Id | [optional] Id of SIP account (sip trunk) to route all calls through, otherwise MVNO account is a stand-alone account. |
|
| pbx | Number | Id of hosted PBX cluster to use, null or 0 if not part of hosted PBX. | |
| extension | Id | Id of extension the MVNO account belongs to on the hosted PBX (only if pbx>0). | |
| dnd | Boolean | True to not call phone when the extension it belongs to (if any) is called (only if pbx>0). | |
| ratePlan | Id | Id of the MVNO rate plan product this account should be invoiced by. | |
| notes | String | Note about the account (RESELLER/ADMIN only). | |
| custom | Object | [optional] custom data that 3rd parties may append, max. 4Kb. |
|
| billingCustomer | ObjectID | Alternate customer to bill this MVNO to (OWNER only). | |
| startDate | Date | Date this MVNO account will be activated. | |
| deleteDate | Date | Date this MVNO account will be deleted. Null if not determined | |
| requestedPortingDate | Date | Date this MVNO account wish to be ported. Null for end of commitment. | |
| portingReady | Boolean | True if porting shall be set to stage IN_READY. | |
| dataSharingSims | Array | List of add-on data sharing SIM cards, max 3, TDC network only. | |
| dataSharingSims[].simNumber | String | ICC number | |
| dataSharingSims[].assignEsim | Boolean | If true, an eSIM will be chosen instead of the simNumber | |
| dataSharingSims[].name | String | Name of data sharing SIM, can be provided by the user | |
| Purchase Info (ADMIN only) | |||
| orderId | String | Order ID of the SIP Phone, references to external economic system | |
| date | Date | Date the phone was purchased | |
| paymentOption | String | How the phone is purchased or financed: NONE, BOUGHT, or RENTED | |
| serial | String | Serial of the phone | |
| mitId | Objec | Contains information about who created this MVNO account, if done with MitID authentication. This data should never be shown to unauthorized users. The entire object can be null, when not relevant. | |
| mitId.uuid | String | UUID of the person | |
| mitId.name | String | Name of the person | |
| mitId.authenticationDate | String | When the validation took place | |
| restOfWorldRoaming | Object | Information regarding Rest-of-World (RoW) roaming | |
| restOfWorldRoaming.productId | String | Product ID of the RoW package used by this mobile account | |
| restOfWorldRoaming.keepAfterExpire | Boolean | Whether this override only will be used for the next activation, or whether the override should be kept afterwards as well. Only reelvant when RoW-package is overwritten. | |
Properties that holds no value can be omitted from the request.
Request body example
{ customer: '1234567890ABCDEF12345678', number: '+4571919998', feature: { highRate: true, international: true, data: true, chargedServices: false, publicIP: false, voicemail: false, secretNumber: false, fiveG: false, mms: true, roaming: true, roamingData: true, dataTopUpSms: false, disableHdAudio: false }, mvnoSim: '8945020184621234567', donorSimNumber: '1647384576898427289', dataSharingSims: [ { name: 'My Laptop', simNumber: '12345678901234567890' } ], voicemail: { notify: 'BOTH', email: 'donald@duck.com', emailFile: true, pin: '1234567890' }, sipAccount: '1234567890ABCDEF12345678', pbx: null, extension: null, dnd: false, ratePlan: '123457890ABCDEF12345678', notes: 'This is a note', startDate: '2020-01-01T00:00.000Z', deleteDate: null, requestedPortingDate: null, portingReady: true, purchaseInfo: { orderId: '7821', date: '2020-01-01T00:00.000Z', paymentOption: 'RENTED' }, restOfWorldRoaming: { productId: '1234567890ABCD1234567890', keepAfterExpire: false } }
Response
The response will be the newly created MVNO account, if no errors occurred.
| Json object | ||
|---|---|---|
| _id | Id | Unique MVNO account id. |
| customer | Id | Id of customer the account belongs to. |
| state | String | The state of the MVNO account. Allowed values are 'ACTIVE', 'CREATING', 'DELETING', 'BLOCKED'. If state is 'BLOCKED', then the account cannot handle calls/sms/mms/data. If in state 'DELETING', it is currently under deletion. |
| type | String | Type of account - always 'MVNO'. |
| number | String | The phone number in E.164 format. |
| feature | Object | Settings that controls the features of the mobile phone (will overrule features set in ratePlan). |
| feature.highRate | Boolean | Permit calls towards high rated numbers (homeland only). |
| feature.international | Boolean | Permit calls towards international destinations. |
| feature.data | Boolean | Enable data for homeland. |
| feature.fiveG | Boolean | Enable 5G. |
| feature.publicIP | Boolean | Data connections gets a public IP address instead of a private NAT'ed IP. |
| feature.chargedServices | Boolean | Permit overcharged SMS and purchase of physical goods. |
| feature.voicemail | Boolean | Enable voicemail on stand-alone phones. |
| feature.secretNumber | Boolean | Secret a-number (do not present number). |
| feature.roaming | Boolean | Permit roaming (outside homeland). |
| feature.roamingData | Boolean | Enable data while roaming, if roaming is permitted. |
| feature.mms | Boolean | Enable MMS. |
| feature.dataTopUpSms | Boolean | If true, then a link allowing a mobile account to buy top-up data will be included in the SMS that warns the mobile user, that they are approaching their data limit. |
| feature.smartWatchSim | Boolean | If true, then the MVNO account is allowed to add smartwatch. |
| feature.disableHdAudio | Boolean | If true, HD audio support is disabled. |
| mvnoSim | Object | SIM card settings - see below. |
| mvnoSim.simNumber | String | ICC number. |
| mvnoSim.imsi | String | IMSI number. |
| mvnoSim.network | String | Network provider: TELENOR, TDC, or TELIA. |
| mvnoSim.puk1 | String | Puk code 1. |
| mvnoSim.puk2 | String | Puk code 2. |
| mvnoSim.pin1 | String | Pin code 1. |
| mvnoSim.pin2 | String | Pin code 2. |
| mvnoSim.formFactor | String | Size of SIM card: 'MINI_MICRO', 'NANO', 'MINI_MICRO_NANO' or 'eSIM'. |
| mvnoSim.autoAssign | Boolean | Whether this SIM was auto-assigned or not. |
| mvnoSim.activationCode | String | eSIM activation code. |
| dataSharingSims | Array | List of add-on data sharing SIM cards, max 3. |
| dataSharingSims[].simNumber | String | ICC number |
| dataSharingSims[].imsi | String | IMSI number |
| dataSharingSims[].network | String | Network provider: TELENOR, TDC. |
| dataSharingSims[].puk1 | String | Puk 1 code |
| dataSharingSims[].puk2 | String | Puk 2 code |
| dataSharingSims[].pin1 | String | Pin 1 code |
| dataSharingSims[].pin2 | String | Pin 2 code |
| dataSharingSims[].formFactor | String | Size of SIM card: 'MINI_MICRO', 'NANO', 'MINI_MICRO_NANO' or 'eSIM'. |
| dataSharingSims[].activationCode | String | Activation code for QR when formFactor is eSIM. |
| dataSharingSims[].number | String | Phone number assigned to the SIM. |
| mvnoSimNetworkChangeTo | Object | SIM card data when changing network, otherwise null |
| mvnoSimNetworkChangeTo.simNumber | String | ICC SIM number |
| mvnoSimNetworkChangeTo.imsi | String | IMSI number - Billing identifier |
| mvnoSimNetworkChangeTo.network | String | Network provider: TELENOR, TDC. |
| mvnoSimNetworkChangeTo.puk1 | String | Puk 1 code |
| mvnoSimNetworkChangeTo.puk2 | String | Puk 2 code |
| mvnoSimNetworkChangeTo.pin1 | String | Pin 1 code |
| mvnoSimNetworkChangeTo.pin2 | String | Pin 2 code |
| mvnoSimNetworkChangeTo.formFactor | String | Size of SIM card: 'MINI_MICRO', 'NANO', 'MINI_MICRO_NANO' or 'eSIM'. |
| mvnoSimNetworkChangeTo.activationCode | String | Activation code for QR when formFactor is eSIM. |
| mvnoSimNetworkChangeTo.when | Date | Null until the change has been confirmed, then the Date it will happen. |
| mvnoSimNetworkChangeTo.socs | Array | List of SOCS that will be applied when change of network has completed. |
| Voicemail | Object | Voicemail settings, only if feature.voicemail is active and sipAccount and pbx is not. |
| voicemail.notify | String | Notification method: NONE, SMS, EMAIL, BOTH. |
| voicemail.email | String | E-mail address to send notification of new voicemail to, if enabled. |
| voicemail.emailFile | Boolean | True to include recording in e-mail. |
| voicemail.pin | String | Pincode to listen to voicemail from a foreign phone or via web. |
| voicemail.pinBlockedUntil | Date | If login with pin has been blocked due to too many failed login attempts, this is the date and time when the blocking will be lifted. |
| Misc | ||
| donorSimNumber | String | ICC number of the SIM card at the donor operator that currently has the phone number to port. |
| sipAccount | Id | Id of the SIP account (sip trunk) all calls are routed through (if used). |
| pbx | Number | Id of hosted PBX cluster to use, null or 0 if not part of hosted PBX. |
| ratePlan | Id | Id of the MVNO rate plan product this account should be invoiced by. |
| extension | Id | Id of extension the MVNO account belongs to on the hosted PBX (only if pbx>0). |
| dnd | Boolean | True to not call phone when the extension it belongs to (if any) is called (only if pbx>0). |
| newRatePlan | Id | If a new rateplan should be applied at end of month, this is the plan. |
| socs | Array | Array of all active SOCS on the account, for debug (ADMIN only). |
| socsOverride | Array | Array of SOCS which must be overriden with another SOC (ADMIN only). |
| socsOverride[].soc | String | Name of SOC to replace. |
| socsOverride[].newSoc | String | Name of SOC to use instead. |
| socsOverride[].expireEOM | Boolean | True if the override must expire at the end of the month. |
| socsOverride[].startEOM | Boolean | True if the override should start during end of month update run. |
| socsOverride[].setBySystem | Boolean | True if the override has been set automatically by the system. |
| notes | String | Note about the account (RESELLER/ADMIN only). |
| custom | Object | Optional custom data that 3rd parties may append, max. 4Kb. |
| invoicedUntil | Date | The date the account has been invoiced until. |
| billingCustomer | ObjectID | Alternate customer to bill this MVNO to. |
| info | Object | Informational - things that cannot be changed by the user. |
| info.updating | Boolean | True if accounting is waiting to be updated and cannot be changed. |
| info.dataDisabled | Boolean | True if data has been disabled for the rest of the month because it has been used up. |
| info.imei | String | Mobile phone IMEI number. |
| info.deviceType | String | Make and model of the phone used, if available. |
| info.usageBlock | Boolean | True if highRate, international and roaming has been blocked due to high usage. Can only be unset by Reseller or Admin users. |
| numberState | String | State of the phone number: IN_USE - in normal use PORTING_IN - is currently being ported in PORTING_OUT - is currently being ported out |
| employee | Id | Id of employee the number is used by, if set. |
| name | String | Name of the employee or usage if no employee is set. |
| listed | Boolean | True if the number should be published in public phonebooks. |
| porting | Id | Id of the porting, if the number for this accounts is currently part of a porting. |
| purchaseInfo | Object | Purchase information (ADMIN only) |
| purchaseInfo.orderId | String | Order ID of the SIP Phone, references to external economic system |
| purchaseInfo.date | Date | Date the phone was purchased |
| purchaseInfo.paymentOption | String | How the phone is purchased or financed: BOUGHT or RENTED |
| purchaseInfo.serial | String | |
| topUp | Object | Information about whether the mobile has been topped up with data this month. |
| data | Number | Data bought outside of phone plan. It's reset every month. Given in bytes |
| restOfWorldRoaming | Object | Information regarding Rest-of-World (RoW) roaming |
| restOfWorldRoaming.productId | String | Product ID of the RoW package used by this mobile account |
| restOfWorldRoaming.name | String | Name of the RoW product used by this mobile account |
| restOfWorldRoaming.isOverride | Boolean | Whether this RoW-package is the one in the phone plan or has been overriden |
| restOfWorldRoaming.keepAfterExpire | Boolean | Whether this override only will be used for the next activation, or whether the override should be kept afterwards as well. Only reelvant when RoW-package is overwritten. |
| restOfWorldRoaming.price | Number | Price of the RoW package when activated |
Note that properties holding no value may be omitted from the object.
Example
{ _id: '1234567890ABCDEF12345678', customer: '1234567890ABCDEF12345678', active: true, type: 'MVNO', number: '+4512345678', feature: { highRate: true, international: true, data: true, chargedServices: false, publicIP: false, voicemail: false, secretNumber: false, fiveG: false, mms: true, roaming: true, roamingData: true, dataTopUpSms: false, smartWatchSim: false, disableHdAudio: false }, mvnoSim: { simNumber: '8945020184621234567', imsi: '1234578901', network: 'TELENOR', puk1: '12345678', puk2: '12345678', pin1: '1234', pin2: '1234', formFactor: 'MINI_MICRO' }, dataSharingSims: [ { simNumber: '12345678901234567890', imsi: '238012345678942', network: 'TELENOR', puk1: '123456', puk2: '123456', pin1: '1234', pin2: '1234', formFactor: 'NANO', number: '+4566336633' } ], mvnoSimChangeNetworkTo: null, voicemail: { notify: 'BOTH', email: 'donald@duck.com', emailFile: true, pin: '1234567890' }, sipAccount: '124567890ABCDEF12345678', pbx: null, extension: null, dnd: false, ratePlan: '1234567890ABCDEF12345678', newRatePlan: '1234567890ABCDEF12345679', socs: [ 'SOC1','SOC2','SOC3',... ], socsOverride: [ { soc: 'BADSOC', newSoc: 'GOODSOC', expireEOM: true, setBySystem: true }, ... ], notes: 'The is a mobile phone account used by John Doe', custom: null, invoicedUntil: '2015-01-01T00:00:00.000Z', info: { updating: false, dataDisabled: false, imei: '1234567890123', deviceType: 'Apple iPhone 6' }, topUp: { data: 1073741824 }, numberState: 'IN_USE', employee: '123457890ABCDEF12345678', name: 'Hans Christian Anderson', listed: true, porting: null, restOfWorldRoaming: { product: '1234567890ABCD1234567890', name: 'Roaming Package - 5 gb autostart', isIncluded: false, keepAfterExpire: false, price: 100 } }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | MVNO account not found in body of request |
| 403 | access_denied | Insufficient access level |
| 403 | number | Insufficient access level to authorize porting of number |
| 403 | customer | Customer is blocked |
| 404 | not_found | Product to use for invoicing next period not found |
| 404 | number | Phone number not found |
| 404 | donorSimNumber | Number requires porting but donor SIM number is invalid |
| 404 | customer | Customer not found |
| 404 | ratePlan | Rate plan not found or not valid |
| 404 | newRatePlan | New rate plan not found or not valid |
| 404 | sipAccount | SIP account not found |
| 404 | mvnoSim | SIM card not found |
| 404 | sim | No SIM creation option found - either mvnoSim, esim, or autoAssignSim should be set |
| 404 | autoAssignSim | No auto-assign SIMs available |
| 409 | number | The number is part of a range |
| 409 | number | Number is in use on another account |
| 409 | number | Number is being ported to another account |
| 409 | number | Insufficient access level to purchase number |
| 409 | number | The number is not available |
| 409 | mvnoSim | SIM card is not available |
| 409 | mvnoSim | Only mvnoSim, esim, or autoAssignSim can be set at the same time. |
| 409 | restOfWorldRoaming.productId | Product for Rest-of-World roaming not found |
| 409 | restOfWorldRoaming.productId | Rest-of-World product cannot be removed from a product, that has one included. |
| 422 | billingCustomer | An MVNO account can not be assigned a billing customer, not assosciated with the MVNO account\'s customer. |
| 422 | number | The number is invalid |
| 422 | custom | Custom data too large, max. 4Kb |
| 422 | number | Number is invalid |
| 422 | mvnoSim | MVNO SIM data is invalid |
| 422 | services | One or more services not found or not valid |
| 422 | donorSimNumber | Donor SIM number is not valid |
| 422 | donorSimNumber | SIM number not valid according to donors validation |
| 422 | pbx | Pbx is outside the valid range |
| 422 | socsOverride | SOC <soc> is invalid |
| 422 | startDate | Start date has to be either today, or in the future |
| 404 | extension | Extension not found |
| 409 | extension | Cannot be assigned to extension, is already assigned to trunk |
| 404 | dataSharingSims.simNumber | SIM card not found |
| 409 | dataSharingSims.simNumber | SIM card is not available |
| 422 | dataSharingSims.assignEsim | This property can not be true, if simNumber is not null |
| 409 | dataSharingSims.network | SIM card does not belong to same network as the primary SIM card |
| 404 | dataSharingSims.number | No available numbers to assign to data sharing sim |
| 500 | number | Failed to lookup operator for number |
| 500 | internal_error | <Unspecified> |
api/mvno/account/create.txt · Last modified: 2025/06/12 09:24 by Thomas Andersen