User Tools

Site Tools


api:mvno:account:list

API : MVNO Account List

Introduction

This request will return the list of MVNO accounts (Mobile phone subscriptions) that belongs to a customer.

Request

URL https://api.telecomx.dk/mvno
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller or a sub reseller.
ADMIN.
Query customer Id of the customer the MVNO accounts belongs to, defaults to users own customer.
offset [optional] Index of the first MVNO account to return, default 0.
limit [optional] The number of MVNO accounts to return, default 100, min 1, max 500.
filter [optional] To filter the MVNO accounts, this can be used. Number, deviceType, simNumber (ICC), IMSI and notes will be searched.
full [optional] If true, complete MVNO account objects will be returned instead of the condensed version.
pbx [optional] True to only return MVNO accounts that are part of a hosted PBX.
available [optional] True to only return MVNO accounts that are part of a hosted PBX and not assigned to an extension or trunk.
usage [optional] True to include usage statistics.
ratePlan [optional] Filters MVNO accounts on a specific rate plan ID.
network [optional] Filters MVNO accounts on a specific network.

Query examples

https://api.telecomx.dk/mvno?customer=1234567890ABCDEF12345678
https://api.telecomx.dk/mvno?customer=1234567890ABCDEF12345678&filter=81808&offset=10&limit=25&full=true
https://api.telecomx.dk/mvno?customer=1234567890ABCDEF12345678&available=true
https://api.telecomx.dk/mvno?customer=1234567890ABCDEF12345678&ratePlan=1234657980ABCD1234657980
https://api.telecomx.dk/mvno?customer=1234567890ABCDEF12345678&network=TDC

Response

JSON object
offset Index of the first MVNO account returned.
limit Number of MVNO accounts to return. Note that the actual number of MVNO accounts returned may be lower.
total Number of MVNO accounts that can be returned when offset and limit is not considered. This is to be used for paging through the data.
mvnoAccounts Array of MVNO accounts, see definition below
MVNO account object (JSON)
_id Id Unique MVNO account id.
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.
number String The phone number (E.164 format) this MVNO account uses.
ratePlan Id Id of the rate plan used for billing.
ratePlanName String Name/description of the rate plan.
newRatePlan Id If a new rateplan should be applied at end of month, this is the plan.
newRatePlanName String Name/description of the rate plan.
price Number Price of the rateplan.
wholesale Number Wholesale price of the rateplan (RESELLER ONLY)
cost Number Cost of the rateplan (ADMIN ONLY)
sipAccount Id Id of the SIP account (sip trunk) all calls are routed through (if used).
sipAccountName String Name of the SIP account (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).
extensionNumber String Extensions local number, or direct if no local number selected (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).
dataDisabled Boolean True if data has been disabled because the subscription data has been used up.
updating Boolean True if account is currently being updated and cannot be modified.
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.
employeeName String Name of the employee, if set.
name String Name of the user or usage if no employee is set.
porting Id Id of the porting, if the number for this accounts is currently part of a porting.
usageBlock Boolean True if highrate, international and roaming calls are blocked due to high usage or suspicion of fraud.
deviceType String Make and model of the phone used - if available.
startDate Date Date this MVNO account will be activated.
deleteDate Date Date this MVNO account will be deleted. Null if not determined
employeeDeleteDate Date Given if the employee of the MVNO account is set to be deleted, and this MVNO account will be deleted at the same time.
simNumber String Sim card ICC number.
imei String Mobile phone IMEI number.
socs Array Array of all active SOCS on the account, for debug (ADMIN only).
socsOverride Array Array of SOCS which must be overridden 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.
subscription Object Subscription details
subscription.minutes.homeland Integer Number of minutes included towards national destinations (not high-rate)
subscription.minutes.euNordic Integer Number of minutes included towards Nordic/EU destinations
subscription.minutes.restOfEurope Integer Number of minutes included towards rest of Europe
subscription.minutes.world1 Integer Number of minutes included towards region world 1
subscription.minutes.world2 Integer Number of minutes included towards region world 2
subscription.minutes.world3 Integer Number of minutes included towards region world 3
subscription.roaming.euNordic Integer Number of minutes included roaming in Nordic/EU region
subscription.roaming.restOfEurope Integer Number of minutes include roaming in rest of Europe
subscription.roaming.world1 Integer Number of minutes included roaming in world region 1
subscription.roaming.world2 Integer Number of minutes included roaming in world region 2
subscription.roaming.world3 Integer Number of minutes included roaming in world region 3
subscription.free.ownSip Boolean True if calls towards own SIP trunks/PBX is free
subscription.free.ownMvno Boolean True if calls towards own mobile phones is free
subscription.free.onNetSip Boolean True if calls towards all X-Telecom SIP numbers is free
subscription.free.onNetMvno Boolean True if calls towards all X-Telecom mobile numbers is free
subscription.free.smsMms Boolean True if SMS and MMS is free
subscription.data Integer Number of megabytes data included in homeland
subscription.roamingData.euNordic Integer Number of megabytes data included roaming in Nordic/EU region
subscription.roamingData.restOfEurope Integer Number of megabytes data included roaming in rest of Europe region
subscription.roamingData.world1 Integer Number of megabytes data included roaming in world region 1
subscription.roamingData.world2 Integer Number of megabytes data included roaming in world region 2
subscription.roamingData.world3 Integer Number of megabytes data included roaming in world region 3
subscription.roamingData.linkUsage Boolean True if usage in Nordic/EU/World1 also counts against homeland usage - and homeland usage also counts against eu/nordic/world1 usage if homeland is below the regions count.
dataUsage Array If usage is true, this is the data usage for the last 12 months.
dataUsage[].month String Year and month the usage occurred in the format YYYYMM.
dataUsage[].usage Number Bytes used.
dataUsage[].subscription Number Bytes included in subscription.
dataUsage[].percent Number Percentage of subscription used.
dataUsage[].usageEuNordic Number Bytes used.
dataUsage[].subscriptionEuNordic Number Bytes included in subscription.
dataUsage[].percentEuNordic Number Percentage of subscription used.
dataUsage[].usageRestOfEurope Number Bytes used.
dataUsage[].subscriptionRestOfEurope Number Bytes included in subscription.
dataUsage[].percentRestOfEurope Number Percentage of subscription used.
dataUsage[].usageWorld1 Number Bytes used.
dataUsage[].subscriptionWorld1 Number Bytes included in subscription.
dataUsage[].percentWorld1 Number Percentage of subscription used.
dataUsage[].usageWorld2 Number Bytes used.
dataUsage[].subscriptionWorld2 Number Bytes included in subscription.
dataUsage[].percentWorld2 Number Percentage of subscription used.
dataUsage[].usageWorld3 Number Bytes used.
dataUsage[].subscriptionWorld3 Number Bytes included in subscription.
dataUsage[].percentWorld3 Number Percentage of subscription used.
voiceUsage Array If usage is true, this is the voice usage for the last 12 months.
voiceUsage[].month String Year and month the usage occurred in the format YYYYMM.
voiceUsage[].usage Number Number of seconds used.
voiceUsage[].subscription Number Number of seconds included in subscription.
voiceUsage[].percent Number Percentage of subscription used.
voiceUsage[].usageEuNordic Number Number of seconds used.
voiceUsage[].subscriptionEuNordic Number Number of seconds included in subscription.
voiceUsage[].percentEuNordic Number Percentage of subscription used.
voiceUsage[].usageRestOfEurope Number Number of seconds used.
voiceUsage[].subscriptionRestOfEurope Number Number of seconds included in subscription.
voiceUsage[].percentRestOfEurope Number Percentage of subscription used.
voiceUsage[].usageWorld1 Number Number of seconds used.
voiceUsage[].subscriptionWorld1 Number Number of seconds included in subscription.
voiceUsage[].percentWorld1 Number Percentage of subscription used.
voiceUsage[].usageWorld2 Number Number of seconds used.
voiceUsage[].subscriptionWorld2 Number Number of seconds included in subscription.
voiceUsage[].percentWorld2 Number Percentage of subscription used.
voiceUsage[].usageWorld3 Number Number of seconds used.
voiceUsage[].subscriptionWorld3 Number Number of seconds included in subscription.
voiceUsage[].percentWorld3 Number Percentage of subscription used.
voiceUsage[].usageRoamingEuNordic Number Number of seconds used.
voiceUsage[].subscriptionRoamingEuNordic Number Number of seconds included in subscription.
voiceUsage[].percentRoamingEuNordic Number Percentage of subscription used.
voiceUsage[].usageRoamingRestOfEurope Number Number of seconds used.
voiceUsage[].subscriptionRoamingRestOfEurope Number Number of seconds included in subscription.
voiceUsage[].percentRoamingRestOfEurope Number Percentage of subscription used.
voiceUsage[].usageRoamingWorld1 Number Number of seconds used.
voiceUsage[].subscriptionRoamingWorld1 Number Number of seconds included in subscription.
voiceUsage[].percentRoamingWorld1 Number Percentage of subscription used.
voiceUsage[].usageRoamingWorld2 Number Number of seconds used.
voiceUsage[].subscriptionRoamingWorld2 Number Number of seconds included in subscription.
voiceUsage[].percentRoamingWorld2 Number Percentage of subscription used.
voiceUsage[].usageRoamingWorld3 Number Number of seconds used.
voiceUsage[].subscriptionRoamingWorld3 Number Number of seconds included in subscription.
voiceUsage[].percentRoamingWorld3 Number Percentage of subscription used.
socLimit Object Object containing details about the limits of the account's SOCs (ADMIN only)
data Number Data limit in megabytes
dataOverridden Boolean Whether the data limit is set by SOC overridden, or the SOC in the rate plan.
minutes Number Voice usage limit in minutes
minutesOverridden Boolean Whether the voice usage limit is set by SOC overridden, or the SOC in the rate plan.
socFeatures Object Features enabled by the rateplan's SOCs
socFeatures.broadband Boolean The MVNO account uses a broadband rate plan. It is currently only relevant for TDC phones. Phones provisioned with a broadband rate plan can not afterwards be provisioned with a non-broadband rateplan, and vice versa.
MVNO account object if full=true (JSON)
_id Id Unique MVNO account id.
customer Id Id of customer the account belongs to.
active Boolean True if account is active and can handle calls/sms/mms/data.
type String Type of account - always 'MVNO'.
number String The phone number in E.164 format.
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
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.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.
mvnoSim.activationCode String eSIM activation code.
dataSharingSims Array List of add-on data sharing SIM cards, max 3, only TDC network.
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.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.
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
sipAccount Id Id of the SIP account (sip trunk) all calls are routed through (if used).
sipAccountName String Name of the SIP account (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.
ratePlanName String Name/description of the rate plan.
newRatePlan Id If a new rateplan should be applied at end of month, this is the plan.
newRatePlanName String Name/description of the rate plan.
socs Array Array of all active SOCS on the account, for debug (ADMIN only).
socsOverride Array Array of SOCS which must be overridden 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.
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.
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.
employee Id Id of employee the number is used by, if set.
employeeName String Name of the employee, if set.
name String Name of the user or usage if no employee is set.
porting Id Id of the porting, if the number for this accounts is currently part of a porting.
Purchase Info (ADMIN only) Object
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
socLimit Object Object containing details about the limits of the account's SOCs (ADMIN only)
data Number Data limit in megabytes
dataOverridden Boolean Whether the data limit is set by SOC overridden, or the SOC in the rate plan.
minutes Number Voice usage limit in minutes
voiceOverridden Boolean Whether the voice usage limit is set by SOC overridden, or the SOC in the rate plan.
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.

Note that properties holding no value may be omitted from the object.

Example - normal

{
  offset: 10,
  limit: 20,
  total: 123,
  mvnoAccounts:
  [
    {
      _id: '1234567890ABCDEF12345678',
      state: 'ACTIVE',
      number: '+4512345678',
      ratePlan: '123457890ABCDEF12345678',
      ratePlanName: 'Free speech, free SMS/MMS, 5Gb data',
      sipAccount: '1234567890ABCDEF12345678',
      sipAccountName: 'Copenhagen branch PBX',
      pbx: null,
      extension: null,
      extensionNumber: null,
      dnd: false,
      dataDisabled: false,
      updating: false,
      numberState: 'IN_USE',
      employee: '123457890ABCDEF12345678',
      employeeName: 'Hans Christian Anderson',
      name: null,
      porting: null,
      usageBlock: false,
      startDate: '2023-03-04T22:00.000Z',
      deleteDate: null,
      topUp: {
        data: 10734741824
      },
      socFeatures: {
        broadband: false
      }
    },
    ...
  ]
}

Example - full=true

{
  offset: 10,
  limit: 20,
  total: 123,
  mvnoAccounts:
  [
    {
      _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,
        disableHdAudio: false
      },
      mvnoSim: {
        simNumber: '8945020184621234567',
        imsi: '1234578901',
        network: 'TELENOR',
        puk1: '12345678',
        puk2: '12345678',
        pin1: '1234',
        pin2: '1234',
        formFactor: 'MINI_MICRO',
        autoAssign: false
      },
      voicemail: {
        notify: 'BOTH',
        email: 'donald@duck.com',
        emailFile: true,
        pin: '1234567890'
      },
      sipAccount: '124567890ABCDEF12345678',
      sipAccountName: 'Copenhagen Branch PBX',
      pbx: null,
      extension: null,
      dnd: false,
      ratePlan: '1234567890ABCDEF12345678',
      ratePlanName: 'Free speech, free SMS/MMS, 5Gb data',
      newRatePlan: '1234567890ABCDEF12345679',
      startDate: '2023-03-01T22.00.000Z',
      deletDate: null,
      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',
      info: {
        updating: false,
        dataDisabled: false,
        imei: '1234567890123',
        deviceType: 'Apple iPhone 6',
      },
      numberState: 'IN_USE',
      employee: '123457890ABCDEF12345678',
      employeeName: 'Hans Christian Anderson',
      name: null,
      porting: null
    },
    purchaseInfo: {
      orderId: '2134'
      date: '2020-20-20T00:00:00Z',
      paymentOption: 'BOUGHT'
    },
    topUp: {
      data: 1073741824
    }
    ...
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level - no access to the customer.
500 internal_error Failed to lookup mvnoRT settings in Redis
500 internal_error <Unspecified error>
api/mvno/account/list.txt · Last modified: 2025/01/13 21:09 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki