api:mvno:account:update
Table of Contents
API : MVNO Account Update
Introduction
This request will update an existing MVNO account.
The phone number and the SIM card (ICC) cannot be changed here - instead use the change number and change SIM API.
When updating a MVNO account, you do not need to send the full MVNO account object. As little as a single property can be sent, so only send the properties you need to update, and the rest will be untouched.
Request
| URL | https://api.telecomx.dk/mvno/ACCOUNT_ID | ||
|---|---|---|---|
| Method | POST | ||
| Access level | MANAGER or OWNER when user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
||
| Param | ACCOUNT_ID | Id of the MVNO account (24 hex-char string) | |
| Body | state | String | The state of the MVNO account. Allowed values are ACTIVE or BLOCKED. If state is BLOCKED, then the account cannot handle calls/sms/mms/data. |
| 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), default true. | |
| feature.international | Boolean | Permit calls towards international destinations, default true. | |
| feature.data | Boolean | Enable data for homeland, default true. | |
| feature.fiveG | Boolean | Enable 5G, default true. | |
| feature.publicIP | Boolean | Data connections gets a public IP address instead of a private NAT'ed IP, default false. | |
| feature.chargedServices | Boolean | Permit overcharged SMS and purchase of physical goods, default false. | |
| feature.voicemail | Boolean | Enable voicemail on stand-alone phones, default false. | |
| feature.secretNumber | Boolean | Secret a-number (do not present number), default false. | |
| feature.roaming | Boolean | Permit roaming (outside homeland), default true. | |
| feature.roamingData | Boolean | Enable data while roaming, if roaming is permitted, default true. | |
| feature.mms | Boolean | Enable MMS. | |
| feature.dataTopUpSms | Boolean | If true, then a link allowing the MVNO account to buy top-up data, will be included in the SMS that warns the mobile user that they are approaching their data limit. Switching this property will switch all of the customer's MVNO account, to use the same variable, e.g if this is switched from true → false, then all MVNO accounts on this customer will have their “dataTopUpSms”-property set to false, no matter their previous state. | |
| 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 | |||
| donorSimNumber | String | ICC number of the SIM card at the donor operator that currently has the phone number to port. | |
| sipAccount | Id | 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. Can only be set if account requires porting and the porting has not yet been ordered, otherwise this field is ignored and newRatePlan should be used instead. | |
| newRatePlan | Id | Id of the MVNO rate plan product this account should be invoiced by from the next month. | |
| newRatePlanNow | Boolean | True if the MVNO rate plan should be changed immediately - this will incur a fee. | |
| notes | String | Note about the account (RESELLER/ADMIN only). | |
| custom | Object | Custom data that 3rd parties may append, max. 4Kb. | |
| billingCustomer | ObjectID | Alternate customer to bill this MVNO to. | |
| startDate | Date | Date this MVNO account will be activated. | |
| deleteDate | Date | Date this MVNO account will be deleted. Null if not determined | |
| 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 | |
| purchaseInfo | Object | Purchase info (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 | Serial of the phone | |
| 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 relevant when RoW-package is overwritten. | |
| changeSimType | Boolean | If true, then the MVNO account update is allowed to change the account's rate plan to a plan with another SIM type, effectively changing the type of the MVNO account. Needs to be used together with newRatePlan. | |
Request body example
{ feature: { highRate: false, international: false }, notes: 'Removed international and highrate calling due to stuff' }
Response
The response will be the updated 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 the 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. |
| 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. |
| 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. |
| dataSharingSims[].name | String | Name of data sharing SIM, can be provided by the user |
| 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.autoAssign | Boolean | Whether this SIM is an “auto-assign” SIM-card. |
| 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. |
| 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 | ||
| 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. |
| 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. |
| 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. |
| startDate | Date | Date this MVNO account will be activated. |
| deleteDate | Date | Date this MVNO account will be deleted. Null if not determined |
| 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. |
| 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 info (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 | Serial of the phone. |
| topUp | Object | Information about whether the mobile has been topped up with data this month. |
| data | Number | Additional data in bytes, purchased in addition to that in the ratePlan. Reset every month. |
| smartWatch | Object | Data for smart watch |
| smartWatch.eid | String | 32 digit code for smartwatch |
| smartWatch.model | String | android or ios |
| smartWatch.number | String | Number assigned to smartwatch |
| smartWatch.state | String | Status of activation. NONE, CREATING, ORDERED, ACTIVE, FAILED or DELETING |
| smartWatch.createdAt | Date | Date for activation of smartwatch eSIM |
| invoicedUntil | Date | The date the smartwatch has been invoiced until. |
| smartWatch.orderState | String | Status of order. 'Cancelled', 'Partially Failed', 'Success', 'Failure', 'Blocked', 'Acknowledged' or 'Waiting'. Gets set by status response from TDC during activation |
| smartWatch.smartWatchSim | Object | Contains info for eSIM for smartwatch |
| smartWatch.smartWatchSim.simNumber | String | ICC for smartwatch |
| smartWatch.smartWatchSim.imsi | String | Imsi for smartwatch sim |
| smartWatch.smartWatchSim.pin1 | String | Pin 1 code |
| smartWatch.smartWatchSim.pin2 | String | Pin 2 code |
| smartWatch.smartWatchSim.puk1 | String | Puk 1 code |
| smartWatch.smartWatchSim.puk2 | String | Puk 2 code |
| smartWatch.smartWatchSim.network | String | Network provider, should always be TDC |
| smartWatch.smartWatchSim.formFactor | String | Size of SIM card. 'eSIM'. Should always be eSIM |
| smartWatch.smartWatchSim.activationCode | String | eSIM activation code. |
| 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', state: 'ACTIVE', 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', autoAssign: false }, dataSharingSims: [ { simNumber: '12345678901234567890', imsi: '238012345678942', network: 'TELENOR', puk1: '123456', puk2: '123456', pin1: '1234', pin2: '1234', formFactor: 'NANO', number: '+4566336633', name: 'iPad' } ], 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 }, ... ], notes: 'The is a mobile phone account used by John Doe', custom: null, invoicedUntil: '2015-01-01T00:00:00.000Z', startDate: '2015-01-01T00:00:00.000Z', info: { updating: false, dataDisabled: false, imei: '1234567890123', deviceType: 'Apple iPhone 6' }, numberState: 'IN_USE', employee: '123457890ABCDEF12345678', name: 'Hans Christian Anderson', listed: true, porting: null, topUp: { data: 1073741824 }, smartWatch: { eid: '12121212121212121212121212121212', model: 'ios', number: '+4522334455', state: 'ACTIVE', orderState: 'Successful', createdAt: '2020-20-20T00:00:00Z', invoicedUntil: '2020-20-20T00:00:00Z', smartWatchSim: { simNumber: '8945020184621234567', imsi: '1234578901', network: 'TDC', puk1: '12345678', puk2: '12345678', pin1: '1234', pin2: '1234', formFactor: 'eSIM' } }, 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 |
| 400 | bad_request | MVNO account id not found in request URI |
| 403 | access_denied | Insufficient access level |
| 403 | updating | MVNO cannot be changed as it is currently being updated |
| 403 | customer | Customer is blocked |
| 403 | porting | Cannot update while porting in progress |
| 404 | _id | MVNO account not found |
| 404 | not_found | Product to use for invoicing next period not found |
| 409 | state | MVNO account is under deletion |
| 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 |
| 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 | restOfWorldRoaming.productId | Product for Rest-of-World roaming not found |
| 409 | restOfWorldRoaming.productId | Rest-of-World product cannot be removed from a product which 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 | pbx | Pbx is outside the valid range |
| 422 | socsOverride | SOC <soc> is invalid |
| 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 |
| 422 | dataSharingSimsAmount | The amount of data sharing SIMs must not exceed 3. |
| 409 | dataSharingSims_ratePlanChange | The amount of datasharing SIMs cannot be changed at the same time as the rate plan is immediately changed, if the new rate plan does not have the same amount of included datasharing SIMs. |
| 500 | internal_error | <Unspecified> |
api/mvno/account/update.txt · Last modified: 2025/03/05 08:47 by Joakim Andersen