User Tools

Site Tools


api:product:get

API : Product Get

Introduction

This request will return the the specified product if the user may access it.

VIEWER, MANAGER and OWNER may access their resellers products that does not have the applyByResellerOnly flag set. RESELLER and ADMIN may access resellers products and master products.

Request

URL https://api.telecomx.dk/product/PRODUCT_ID
Method GET
Access level VIEWER, MANAGER or OWNER if product belongs to their parent reseller.
RESELLER if product belongs to the reseller or is a master product.
ADMIN.
Param PRODUCT_ID Id of the product (24 hex char string)
Query  usage [optional]

Query example

https://api.telecomx.dk/product/123456780ABCDEF12345678

Response

JSON object
_id Id Unique product id.
start Date The date from which the product can be used, null for no limit.
end Date The date from which the product can not be used anymore, null for no limit.
type String Type of product: SIP_RATEPLAN, MVNO_RATEPLAN, DSL, FIBER, NUMBER_RENT, DNS, OTHER.
productCode String Product code, short name for accounting integration and for selecting when invoicing.
name String Product name.
unitType String The type of units this product is measured in: MIN, MB, UNITS, HOURS, KM, MONTHS.
recurrence String If product is recurring, this is the interval: MONTHLY, QUARTERLY, YEARLY.
For no recurrence: NONE.
For types SIP_RATEPLAN, MVNO_RATEPLAN, DSL and FIBER recurrence is never NONE.
recurrenceFullMonth Boolean If true the product must be invoiced for whole months, if false the product will only be invoiced for the fraction of the month that it has been active.
cost Number The cost of the product, pr. month if recurring. (ADMIN only).
wholesale Number The reseller price, pr. month if recurring. (RESELLER/ADMIN only).
price Number The customer price, pr. month if recurring.
reseller Id Id of the reseller the product belongs to and whose customers it can be applied to. Null if master product.
inheritFrom Id Id of the master product this product inherited from, null if product is a master product (RESELLER/ADMIN only).
inheritFromReseller ObjectID Id of reseller product that this product inherits from, null if master/reseller product.
inheritBy Array Id's of resellers who may inherit from this product, null if product may be inherited by any reseller. It can also be used by reseller products, to determine which customers may create a customer product from this.
inheritByCustomers property if the product is a reseller product
inheritByCustomers Array List of customer objects which can inherit from this reseller product - only used by reseller products.
inheritByCustomers[]._id ObjectId Id of customer that can inherit from this product
inheritByCustomers[].customerName String Customer name
standard Boolean If true, then whenever a customer is under the product's reseller, then there will automatically be created a customer product inheriting from this reseller product. Only used by reseller products.
applyByResellerOnly Boolean True if this product may only be used by a reseller (RESELLER/ADMIN only, customer cannot see these types of products).
inheritedBy Array If product is a master product, this is an array of reseller products that inherits from this products. Each item holds an _id (product id) and reseller (reseller id).
standard Boolean If true, then whenever a customer is under the product's reseller, then there will automatically be created a customer product inheriting from this reseller product. Only used by reseller products.
SIP_RATEPLAN properties
invoiceFromFirstNumber Boolean If true, then this account will only be invoiced when its first number is added to the account, and not before.
subscription.minutes.homeland Integer Number of minutes included towards national destinations (not special).
subscription.minutes.euNordic Integer Number of minutes included towards Nordic and European destinations (not special).
subscription.minutes.restOfEurope Integer Number of minutes included towards rest of Europe (not special).
subscription.minutes.world1 Integer Number of minutes included towards countries in region world 1 (not special).
subscription.minutes.world2 Integer Number of minutes included towards countries in region world 2 (not special).
subscription.minutes.world3 Integer Number of minutes included towards countries in region world 3 (not special).
subscription.free.ownSip Boolean True if calls towards the customers own SIP numbers are free.
subscription.free.ownMvno Boolean True if calls towards the customers own mobile numbers are free.
subscription.free.onNetSip Boolean True if calls towards Telecom X SIP numbers are free.
subscription.free.onNetMvno Boolean True if calls towards Telecom X mobile numbers are free.
ratePercentDiscount Number Percent discount on all call minutes - use with care, null if not used.
override.connectionFee Number Connection fee for all calls, will override the destinations connection fee. Null if not used.
override.connectionFeeOnCallAttempt Boolean True if connection fee should also be changed on unanswered calls.
destinations.<country-code>.fixed Object prices for fixed destinations
destinations.<country-code>.fixed.wholesaleFee Number Connection fee for reseller, null if not used
destinations.<country-code>.fixed.customerFee Number Connection fee for customer, null if not used
destinations.<country-code>.fixed.wholesaleRate Number Pr. minute rate for reseller, null if not used
destinations.<country-code>.fixed.customerRate Number Pr. minute rate for customer, null if not used
destinations.<country-code>.mobile Object prices for mobile destinations
destinations.<country-code>.mobile.wholesaleFee Number Connection fee for reseller, null if not used
destinations.<country-code>.mobile.customerFee Number Connection fee for customer, null if not used
destinations.<country-code>.mobile.wholesaleRate Number Pr. minute rate for reseller, null if not used
destinations.<country-code>.mobile.customerRate Number Pr. minute rate for customer, null if not used
MVNO_RATEPLAN properties
pbxProduct Boolean If true, then this product can only be used by mobiles which are on a PBX.
dataSharingSimsIncluded Number Amount of data sharing SIMS included - defaults to 0, maximum value is 3.
network String Which mobile network is this product valid for: TELENOR, TDC, BOTH, default BOTH.
smartWatchIncluded Boolean If true, smartwatch eSIM subscription included in this product
socFeatures Object Features enabled by the rateplan's SOCs
socFeatures.tdc Object Features when rate plan is used on TDC network. This property will be omitted, if the rate plan is not valid for TDC mobiles.
socFeatures.tdc.broadband Boolean The rate plan is a broadband rate plan. Phones provisioned with a broadband rate plan can not afterwards be provisioned with a non-broadband rateplan, and vice versa
socFeatures.tdc.highRate Boolean Permit calls towards high rated numbers (homeland only).
socFeatures.tdc.international Boolean Permit calls towards international destinations.
socFeatures.tdc.data Boolean Enable data for homeland.
socFeatures.tdc.fiveG Boolean Enable 5G.
socFeatures.tdc.publicIP Boolean Data connections gets a public IP address instead of a private NAT'ed IP.
socFeatures.tdc.chargedServices Boolean Permit overcharged SMS and purchase of physical goods.
socFeatures.tdc.voicemail Boolean Enable voicemail on stand-alone phones.
socFeatures.tdc.secretNumber Boolean Secret a-number (do not present number).
socFeatures.tdc.roaming Boolean Permit roaming (outside homeland).
socFeatures.tdc.roamingData Boolean Enable data while roaming, if roaming is permitted.
socFeatures.tdc.restOfWorldRoamingSoc String Which roaming SOC is included in this rate plan subscription.
socFeatures.tdc.restOfWorldRoamingSocType Enum The type of the included roaming SOC. Allowed values are 'AUTOSTART', 'PURCHASE'.
socFeatures.telenor Object Features when rate plan is used on Telenor network. This property will be omitted, if the rate plan is not valid for Telenor mobiles.
socFeatures.telenor.broadband Boolean Not currently in use on Telenor.
socFeatures.telenor.highRate Boolean Permit calls towards high rated numbers (homeland only).
socFeatures.telenor.international Boolean Permit calls towards international destinations.
socFeatures.telenor.data Boolean Enable data for homeland.
socFeatures.telenor.fiveG Boolean Enable 5G.
socFeatures.telenor.publicIP Boolean Data connections gets a public IP address instead of a private NAT'ed IP.
socFeatures.telenor.chargedServices Boolean Permit overcharged SMS and purchase of physical goods.
socFeatures.telenor.voicemail Boolean Enable voicemail on stand-alone phones.
socFeatures.telenor.secretNumber Boolean Secret a-number (do not present number).
socFeatures.telenor.roaming Boolean Permit roaming (outside homeland).
socFeatures.telenor.roamingData Boolean Enable data while roaming, if roaming is permitted.
socs Array Array of strings with SOCs that must be applied for this product. Reseller Admin and above only.
subscription.minutes.homeland Integer Number of minutes included towards national destinations (not special).
subscription.minutes.euNordic Integer Number of minutes included towards Nordic and European destinations (not special).
subscription.minutes.restOfEurope Integer Number of minutes included towards rest of Europe (not special).
subscription.minutes.world1 Integer Number of minutes included towards countries in region world 1 (not special).
subscription.minutes.world2 Integer Number of minutes included towards countries in region world 2 (not special).
subscription.minutes.world3 Integer Number of minutes included towards countries in region world 3 (not special).
subscription.free.ownSip Boolean True if calls towards the customers own SIP numbers are free.
subscription.free.ownMvno Boolean True if calls towards the customers own mobile numbers are free.
subscription.free.onNetSip Boolean True if calls towards Telecom X SIP numbers are free.
subscription.free.onNetMvno Boolean True if calls towards Telecom X mobile numbers are free.
subscription.free.smsMms Boolean True if national SMS and MMS is free.
subscription.roaming Array List of roaming regions, with the number of included minutes when roaming in the specific region
subscription.roaming[]._id ObjectId ID of the roaming region
subscription.roaming[].minutes Number Included minutes. Defaults to 0.
subscription.data Number Megabytes of data included.
subscription.dataEu Number Megabytes of data included while roaming in the EU region.
ratePercentDiscount Number Percent discount on all call minutes - use with care, null if not used.
override.connectionFee Number Connection fee for all calls, will override the destinations connection fee. Null if not used.
override.connectionFeeOnCallAttempt Boolean True if connection fee should also be changed on unanswered calls.
sms.nationalCost Number Cost pr. national SMS message (ADMIN only).
sms.nationalWholesale Number Reseller cost pr. national SMS message (RESELLER/ADMIN only).
sms.nationalPrice Number Customer price pr. national SMS message.
sms.internationalCost Number Cost pr. international SMS message (ADMIN only).
sms.internationalWholesale Number Reseller cost pr. international SMS message (RESELLER/ADMIN only).
sms.internationalPrice Number Customer price pr. international SMS message.
mms.nationalCost Number Cost pr. national MMS message (ADMIN only).
mms.nationalWholesale Number Reseller cost pr. national MMS message (RESELLER/ADMIN only).
mms.nationalPrice Number Customer price pr. national MMS message.
mms.internationalCost Number Cost pr. international MMS message (ADMIN only).
mms.internationalWholesale Number Reseller cost pr. international MMS message (RESELLER/ADMIN only).
mms.internationalPrice Number Customer price pr. international MMS message.
data.nationalCost Number Cost pr. megabyte of data (ADMIN only).
data.nationalWholesale Number Reseller cost pr. megabyte of data (RESELLER/ADMIN only).
data.nationalPrice Number Customer price pr. megabyte of data.
destinations.<country-code>.fixed Object prices for fixed destinations
destinations.<country-code>.fixed.wholesaleFee Number Connection fee for reseller, null if not used
destinations.<country-code>.fixed.customerFee Number Connection fee for customer, null if not used
destinations.<country-code>.fixed.wholesaleRate Number Pr. minute rate for reseller, null if not used
destinations.<country-code>.fixed.customerRate Number Pr. minute rate for customer, null if not used
destinations.<country-code>.mobile Object prices for mobile destinations
destinations.<country-code>.mobile.wholesaleFee Number Connection fee for reseller, null if not used
destinations.<country-code>.mobile.customerFee Number Connection fee for customer, null if not used
destinations.<country-code>.mobile.wholesaleRate Number Pr. minute rate for reseller, null if not used
destinations.<country-code>.mobile.customerRate Number Pr. minute rate for customer, null if not used
DSL properties
dslSpeed String DSL speed product name.
NUMBER_RENT properties
costExtra Double Number rent cost pr. month pr. additional number. (cost above holds the first-number cost).
cost100 Double Number rent cost pr. month pr. 100-series.
wholesaleExtra Double Wholesale number rent pr. month pr. additional number. (wholesale above holds the first-number wholesale price).
wholesale100 Double Wholesale number rent pr. month pr. 100-series.
priceExtra Double Customer number rent pr. month pr. additional number. (price above holds the first-number price).
price100 Double Customer number rent pr. month pr. 100-series.
PBX_USER properties
includedProducts Array Array of products that are included in this PBX user product. Only products of type MVNO_RATEPLAN, PBX_EXTENSION, or PBX_SIP_PHONE are allowed, and only one type of each kind is allowed, meaning that you can ie. only have multiple MVNO_RATEPLANs if they are they the same kind.
includedProducts[]._id ObjectID Id of product that is included
includedProducts[].amount Number Amount of products of this kind that are included.
communicatorAccess Boolean Whether the user with this product has access to Communicator. Defaults to true
MVNO_DATA_TOP_UP properties
mvnoTopUp Object Contains top-up properties
mvnoTopUp.data Number Data of the top-up package. Given in bytes
MVNO_ROW_ROAMING properties
soc String The SOC this product relates to.
EXTERNAL_LICENSE properties
externalLicense Object Information about the license from the third party system.
externalLicense.platformId String ID of the platform, which this license represents. Only allowed value is ALSO
externalLicense.also String ALSO specific properties
externalLicense.also.provisioningId String The provisioning ID of the ALSO license, which is used to match with a product in ALSO.
externalLicense.also.bindingPeriod String The binding period in ALSO. Allowed values are MONTHLY and YEARLY.
USAGE properties if usage=true
usage Array All the accounts using this product
usage[].where String The type of subscription
usage[]._id Id The id of the customer the account belongs to
usage[].label String The name of the account
dataUsage[] Array The data usage for the last month (empty if not an MVNO account)
voiceUsage[] Array The voice usage for the last month.
dataUsage Array The data usage for the last month (empty if not an MVNO account)
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 The voice usage for the last month.
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
minutes Number Voice usage limit in minutes
InheritedBy property if the product is a reseller product
inheritedBy Array List of customer objects and their products which inherit from this product - only used by reseller products.
inheritedBy[]._id ObjectId Id of customer that inherits from this product
inheritedBy[].customerName String Customer name
inheritedBy[].totalUsageCount Number Amount of accounts that use one of the customer's products, i.e. amount of mobile phones that use one a rateplan inherited from the reseller's rateplan
inheritedBy[].products Array List of customer products made from the given reseller product
inheritedBy[].products[]._id Id Customer product ID
inheritedBy[].products[].productName Id Customer product name
inheritedBy[].products[].usageCount Number Amount of times this product is used

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

Response examples

SIP_RATEPLAN

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'SIP_RATEPLAN',
  productCode: 'SR0123A',
  name: 'SIP account, flatrate DK',
  unitType: 'MONTHS',
  recurrence: 'MONTHLY'
  recurrenceFullMonth: true,
  cost: 150.00,
  wholesale: 180.00,
  price: 250.00,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  inheritByCustomers: [],
  applyByResellerOnly: false,
  pbxProduct: false,
  dataSharingSimsIncluded: 0,
  subscription: {
    minutes: {
      homeland: 1800,
      euNordic: 0,
      restOfEurope: 0,
      world1: 0,
      world2: 0,
      world3: 0
    },
    free: {
      ownSip: true,
      ownMvno: false,
      onNetSip: false,
      onNetMvno: false
    }
  },
  ratePercentDiscount: null,
  override: {
    connectionFee: 0.00,
    override.connectionFeeOnCallAttempt: true
  },
  destinations: {
    DK: {
      fixed: {
        wholesaleFee: 0.10,
        customerFee: 0.20,
        wholesaleRate: 0.07,
        customerRate: 0.10
      },
      mobile: {
        customerRate: 0.79
      }
    }
  }
}

MVNO_RATEPLAN

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'MVNO_RATEPLAN',
  productCode: 'MRFREE25G',
  name: 'Free voice, SMS, MMS, 25GB data & 5 hours EU',
  unitType: 'MONTHS',
  recurrence: 'MONTHLY'
  recurrenceFullMonth: true,
  cost: 150.00,
  wholesale: 180.00,
  price: 250.00,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  inheritByCustomers: [],
  applyByResellerOnly: false,
  pbxProduct: false,
  dataSharingSimsIncluded: 0,
  network: 'BOTH',
  socFeatures: {
    tdc: {
      broadband: false,
      international: true,
      data: true,
      fiveG: true,
      publicIP: true,
      chargedServices: false,
      secretNumber: true,
      roaming: true,
      roamingData: true,
      satellite: false,
      restOfWorldRoamingSoc: '12345ABCD',
      restOfWorldRoamingSocType: 'PURCHASE'
    },
    telenor: {
      broadband: false,
      international: true,
      data: true,
      fiveG: true,
      publicIP: true,
      chargedServices: false,
      secretNumber: true,
      roaming: true,
      roamingData: true,
      satellite: false
    }
  },
  subscription: {
    minutes: {
      homeland: 44640,
      euNordic: 0,
      restOfEurope: 0,
      world1: 0,
      world2: 0,
      world3: 0
    },
    free: {
      ownSip: true,
      ownMvno: true,
      onNetSip: false,
      onNetMvno: false,
      smsMms: true
    },
    roaming: [
      {
        _id: '1234567890ABCD1234567890',
        minutes: 3000
      },
      ...
    ],
    data: 25600,
    dataEu: 8192
  },
  sms: {
    nationalCost: 0.10,
    nationalWholesale: 0.15,
    nationalPrice: 0.20,
    internationalCost: 0.50,
    internationalWholesale: 1.00,
    internationalPrice: 1.50
  },
  mms: {
    nationalCost: 0.50,
    nationalWholesale: 0.75,
    nationalPrice: 1.00,
    internationalCost: 2.50,
    internationalWholesale: 4.00,
    internationalPrice: 5.00
  },
  data: {
    nationalCost: 0.50,
    nationalWholesale: 1.00,
    nationalPrice: 1.50
  },
  destinations: {
    DK: {
      fixed: {
        wholesaleFee: 0.10,
        customerFee: 0.20,
        wholesaleRate: 0.07,
        customerRate: 0.10
      },
      mobile: {
        customerRate: 0.79
      }
    }
  }
}

MVNO_RATEPLAN if usage=true (JSON)

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'MVNO_RATEPLAN',
  productCode: 'MRFREE25G',
  name: 'Free voice, SMS, MMS, 25GB data & 5 hours EU',
  unitType: 'MONTHS',
  recurrence: 'MONTHLY'
  recurrenceFullMonth: true,
  cost: 150.00,
  wholesale: 180.00,
  price: 250.00,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  inheritByCustomers: [],
  applyByResellerOnly: false,
  pbxProduct: false,
  dataSharingSimsIncluded: 0,
  network: 'BOTH',
  subscription: {
    minutes: {
      homeland: 44640,
      euNordic: 0,
      restOfEurope: 0,
      world1: 0,
      world2: 0,
      world3: 0
    },
    free: {
      ownSip: true,
      ownMvno: true,
      onNetSip: false,
      onNetMvno: false,
      smsMms: true
    },
    roaming: {
      euNordic: 300,
      restOfEurope: 0,
      world1: 0,
      world2: 0,
      world3: 0
    },
    data: 25600,
    dataEu: 8192
  },
  sms: {
    nationalCost: 0.10,
    nationalWholesale: 0.15,
    nationalPrice: 0.20,
    internationalCost: 0.50,
    internationalWholesale: 1.00,
    internationalPrice: 1.50
  },
  mms: {
    nationalCost: 0.50,
    nationalWholesale: 0.75,
    nationalPrice: 1.00,
    internationalCost: 2.50,
    internationalWholesale: 4.00,
    internationalPrice: 5.00
  },
  data: {
    nationalCost: 0.50,
    nationalWholesale: 1.00,
    nationalPrice: 1.50
  },
  destinations: {
    DK: {
      fixed: {
        wholesaleFee: 0.10,
        customerFee: 0.20,
        wholesaleRate: 0.07,
        customerRate: 0.10
      },
      mobile: {
        customerRate: 0.79
      }
    }
  },
  usage: [
    {
        where: 'DNS',
        _id: 'bob.dk',
        customer: '542dc062002e2fa8807d6',
        label: 'bob.dk',
        dataUsage: [
        {
            month: '201906',
            usage: 730442752,
            subscription: 6442450944,
            percent: 11,
            usageEuNordic: 0,
            subscriptionEuNordic: 0,
            percentEuNordic: 0,
            usageRestOfEurope: 0,
            subscriptionRestOfEurope: 0,
            percentRestOfEurope: 0,
            usageWorld1: 0,
            subscriptionWorld1: 0,
            percentWorld1: 0,
            usageWorld2: 0,
            subscriptionWorld2: 0,
            percentWorld2: 0,
            usageWorld3: 0,
            subscriptionWorld3: 0,
            percentWorld3: 0  
           }
        ],
        voiceUsage: [
          {
            month: '201906',
            usage: 0,
            subscription: 7200,
            percent: 0,
            usageEuNordic: 0,
            subscriptionEuNordic: 0,
            percentEuNordic: 0,
            usageRestOfEurope: 0,
            subscriptionRestOfEurope: 0,
            percentRestOfEurope: 0,
            usageWorld1: 0,
            subscriptionWorld1: 0,
            percentWorld1: 0,
            usageWorld2: 0,
            subscriptionWorld2: 0,
            percentWorld2: 0,
            usageWorld3: 0,
            subscriptionWorld3: 0,
            percentWorld3: 0,
            usageRoamingEuNordic: 0,
            subscriptionRoamingEuNordic: 0,
            percentRoamingEuNordic: 0,
            usageRoamingRestOfEurope: 0,
            subscriptionRoamingRestOfEurope: 0,
            percentRoamingRestOfEurope: 0,
            usageRoamingWorld1: 0,
            subscriptionRoamingWorld: 0, 
            percentRoamingWorld1: 0,
            usageRoamingWorld2: 0,
            subscriptionRoamingWorld2: 0,
            percentRoamingWorld2: 0,
            usageRoamingWorld3: 0,
            subscriptionRoamingWorld3: 0,
            percentRoamingWorld3: 0      
          } 
        ]
        customerName: 'Bob Robertsen'
    }
  ]
}

DSL

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'DSL',
  productCode: 'DSL5/5F',
  name: 'ADSL 5/5Mbit flex',
  unitType: 'MONTHS',
  recurrence: 'MONTHLY'
  recurrenceFullMonth: true,
  cost: 150.00,
  wholesale: 180.00,
  price: 250.00,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  applyByResellerOnly: false,
  dslSpeed: '5120/5120FL'
}

FIBER

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'FIBER',
  productCode: 'F2432',
  name: 'Redundant cityring fiber',
  unitType: 'MONTHS',
  recurrence: 'MONTHLY'
  recurrenceFullMonth: true,
  cost: 1500.00,
  wholesale: 1800.00,
  price: 2500.00,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  applyByResellerOnly: false
}

NUMBER_RENT

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'NUMBER_RENT',
  productCode: 'NUM01',
  name: 'Number rent',
  unitType: 'MONTH',
  recurrence: 'QUARTERLY'
  cost: 0.00,
  costExtra: 0.00,
  cost100: 0.00,
  wholesale: 20.00,
  wholesaleExtra: 2.50,
  wholesale100: 350.00,
  price: 25.00,
  priceExtra: 5.00,
  price100: 500.00,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  applyByResellerOnly: false
}

PBX_USER

{
  _id: ObjectID('1234567890ABCDEF102345678'),
  start: ISODate('2014-01-01T12:34:56.123Z'),
  end: null,
  type: 'PBX_USER',
  productCode: 'PBXUSER02',
  name: 'Lille brugerpakke',
  unitType: 'MONTHS',
  recurrence: 'QUARTERLY',
  recurrenceFullMonth: false,
  cost: 0.00,
  wholesale: 20.00,
  price: 25.00,
  reseller: '4234567890ABCDEF102345678',
  inheritFrom: '6534567890ABCDEF102345672',
  inheritFromReseller: '1364567890ABCDEF102345672',
  applyByResellerOnly: false,
  includedProducts: [
    {
      product: '1364567890ABCDEF102345672',
      amount: 1
    },
    {
      product: '7364567890ABCDEF102345144',
      amount: 2
    },
    {
      product: '1524567890ABCDEF102345982',
      amount: 1
    }
  ],
  communicatorAccess: true,
  recordingAccess: true,
  extensionAccess: true,
  sipPhoneAccess: true
}

MVNO_DATA_TOP_UP

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'MVNO_DATA_TOP_UP',
  productCode: 'TOPUP5G',
  name: 'Data top-up',
  unitType: 'UNITS',
  recurrence: 'NONE'
  cost: 49,
  wholesale: 49,
  price: 59,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  applyByResellerOnly: false,
  mvnoTopUp: {
    data: 1073741824
  }
}

EXTERNAL_LICENSE

{
  _id: ObjectID('1234567890ABCDEF102345678'),
  start: ISODate('2022-01-01T12:34:56.123Z'),
  end: null,
  type: 'EXTERNAL_LICENSE',
  productCode: 'OFFICE_365_E3',
  name: 'Office 365 E3 2022',
  unitType: 'UNITS',
  recurrence: 'NONE',
  recurrenceFullMonth: false,
  cost: 0.00,
  wholesale: 20.00,
  price: 25.00,
  reseller: '4234567890ABCDEF102345678',
  inheritFrom: '6534567890ABCDEF102345672',
  inheritFromReseller: '1364567890ABCDEF102345672',
  applyByResellerOnly: false,
  platformId: 'ALSO',
  externalLicense: {
    also: {
      provisioningId: '123456-abcdef-123456',
      bindingPeriod: 'MONTHLY'
    }
  }
}

MVNO_ROW_ROAMING

{
  _id: ObjectID('1234567890ABCDEF102345678'),
  start: ISODate('2014-01-01T12:34:56.123Z'),
  end: null,
  type: 'MVNO_DATA_TOP_UP',
  productCode: 'MVNO_DATA_TOP_UP_5GB',
  name: 'Data top-up pakke: 5 Gb',
  unitType: 'UNITS',
  recurrence: 'NONE',
  recurrenceFullMonth: false,
  cost: 0.00,
  wholesale: 20.00,
  price: 25.00,
  reseller: '4234567890ABCDEF102345678',
  inheritFrom: '6534567890ABCDEF102345672',
  inheritFromReseller: '1364567890ABCDEF102345672',
  applyByResellerOnly: false,
  soc: 'ABCDE18GJH'
}

OTHER

{
  _id: '1234567890ABCDEF12345678',
  start: '2014-01-01T00:00:00.000Z',
  end: null,
  type: 'OTHER',
  productCode: 'NUMSER',
  name: 'Number series, 10 premium numbers',
  unitType: 'UNITS',
  recurrence: 'NONE'
  cost: 1000.00,
  wholesale: 1200.00,
  price: 1400.00,
  reseller: '1234567890ABCDEF12345678',
  inheritFrom: '1234567890ABCDEF1234578',
  applyByResellerOnly: false
}

Errors

Error code Message Description
400 bad_request Id not found in request URI
404 not_found Product not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/product/get.txt · Last modified: 2025/08/27 13:52 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki