api:product:create
Table of Contents
API : Product Create
Introduction
This request will create a new product - either a master product or a reseller product which inherits from a master product.
The platform works with 2 levels of products:
- Master products - These are ADMIN defined base products that defines all the details of a product. A master product cannot be assigned to a customer but must be inherited by a reseller product. A master product can be inherited multiple times.
- Reseller products - A product that is based on a master product and on which the reseller can control the name, product code, price, certain settings, if the product may only be applied by the reseller and if it can only be used on a specific customer. A Reseller product can be used on the resellers direct customers (not sub-resellers customers).
When a master product is updated, all inherited products are also updated to reflect the changes.
Request
| URL | https://api.telecomx.dk/product | ||
|---|---|---|---|
| Method | POST | ||
| Access level | RESELLER if product is an inherited reseller or inherited customer product. RESELLER_ADMIN with FINANCE feature or ADMIN for any type of product. |
||
| Properties for an inherited customer product | |||
|---|---|---|---|
| Body | inheritFromReseller | ObjectID | Id of reseller product that this product inherits from, null if master/reseller product. |
| reseller | Id | Id of the reseller the product belongs to. If user is reseller this is automatically set to the reseller. | |
| customer | Id | Id of the customer this product belongs | |
| productCode | String | Product code, short name for accounting integration and for selecting when invoicing. | |
| name | String | Product name. | |
| recurrence | String | If product is recurring, this is the interval: MONTHLY, QUARTERLY, YEARLY. For no recurrence: NONE. For types SIP_RATEPLAN, MVNO_RATEPLAN, DSL, FIBER and NUMBER_RENT recurrence is never NONE. (minimum RESELLER) |
|
| 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. (minimum RESELLER) | |
| price | Number | Customer price for one unit of the product. | |
| applyByResellerOnly | Boolean | True if only the reseller can use this product on a customer. | |
| 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. | |
| NUMBER_RENT properties | |||
| priceExtra | Number | Number rent extra number for customer, if product type is NUMBER_RENT. | |
| price100 | Number | Number rent 100-series for customer, if product type is NUMBER_RENT. | |
| SIP_RATEPLAN properties | |||
| 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> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. | |
| destinations.<country-code>.fixed | Object | prices for fixed destinations | |
| destinations.<country-code>.fixed.customerFee | Number | Connection fee for customer, 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.customerFee | Number | Connection fee for customer, 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. (Only used on customer products) | |
| dataSharingSimsIncluded | Number | Amount of data sharing SIMS included - defaults to 0, maximum value is 3. | |
| 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.nationalPrice | Number | Customer price pr. national SMS message. | |
| sms.internationalPrice | Number | Customer price pr. international SMS message. | |
| mms.nationalPrice | Number | Customer price pr. national MMS message. | |
| mms.internationalPrice | Number | Customer price pr. international MMS message. | |
| data.nationalPrice | Number | Customer price pr. megabyte of data. | |
| destinations.<country-code> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. | |
| destinations.<country-code>.fixed | Object | prices for fixed destinations | |
| destinations.<country-code>.fixed.customerFee | Number | Connection fee for customer, 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.customerFee | Number | Connection fee for customer, null if not used | |
| destinations.<country-code>.mobile.customerRate | Number | Pr. minute rate for customer, null if not used | |
| 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 | |
| Properties for an inherited reseller product | |||
|---|---|---|---|
| Body | inheritFrom | Id | Id of the master product this product inherits its settings from. |
| reseller | Id | Id of the reseller the product belongs to. If user is reseller this is automatically set to the reseller. | |
| productCode | String | Product code, short name for accounting integration and for selecting when invoicing. | |
| name | String | Product name. | |
| recurrence | String | If product is recurring, this is the interval: MONTHLY, QUARTERLY, YEARLY. For no recurrence: NONE. For types SIP_RATEPLAN, MVNO_RATEPLAN, DSL, FIBER and NUMBER_RENT recurrence is never NONE. (minimum RESELLER) |
|
| 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. (minimum RESELLER) | |
| price | Number | Customer price for one unit of the product. | |
| wholesale | Number | Resellers price for one unit of the product (ADMIN only). | |
| applyByResellerOnly | Boolean | True if only the reseller can use this product on a customer. | |
| customer | Id | If the product can only be used by a single customer, this is the id of that customer. | |
| NUMBER_RENT properties | |||
| wholesaleExtra | Number | Number rent extra number for reseller, if product type is NUMBER_RENT (ADMIN only). | |
| wholesale100 | Number | Number rent 100-series for reseller, if product type is NUMBER_RENT (ADMIN only). | |
| priceExtra | Number | Number rent extra number for customer, if product type is NUMBER_RENT. | |
| price100 | Number | Number rent 100-series for customer, if product type is NUMBER_RENT. | |
| SIP_RATEPLAN properties | |||
| 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> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. | |
| 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 | |||
| 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.nationalWholesale | Number | Reseller cost pr. national SMS message (ADMIN only). | |
| sms.nationalPrice | Number | Customer price pr. national SMS message. | |
| sms.internationalWholesale | Number | Reseller cost pr. international SMS message (ADMIN only). | |
| sms.internationalPrice | Number | Customer price pr. international SMS message. | |
| mms.nationalWholesale | Number | Reseller cost pr. national MMS message (ADMIN only). | |
| mms.nationalPrice | Number | Customer price pr. national MMS message. | |
| mms.internationalWholesale | Number | Reseller cost pr. international MMS message (ADMIN only). | |
| mms.internationalPrice | Number | Customer price pr. international MMS message. | |
| data.nationalWholesale | Number | Reseller cost pr. megabyte of data (ADMIN only). | |
| data.nationalPrice | Number | Customer price pr. megabyte of data. | |
| destinations.<country-code> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. | |
| 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 | |
| Properties for a master product (which only ADMIN can create) | |||
|---|---|---|---|
| body | start | Date | [optional] The date from which the product can be used, null for no limit. |
| end | Date | [optional] 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, FIBER and NUMBER_RENT 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. | |
| wholesale | Number | The reseller price, pr. month if recurring. | |
| price | Number | The customer price pr. month if recurring. | |
| 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 | Array | Id's of customers who may inherit from this reseller product, empty if product may be inherited by any customer - 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> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. | |
| 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. (Only used on customer products) | |
| dataSharingSimsIncluded | Number | Amount of data sharing SIMS included - defaults to 0, maximum value is 3. | |
| 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. | |
| sms.nationalWholesale | Number | Reseller cost pr. national SMS message. | |
| sms.nationalPrice | Number | Customer price pr. national SMS message. | |
| sms.internationalCost | Number | Cost pr. international SMS message. | |
| sms.internationalWholesale | Number | Reseller cost pr. international SMS message. | |
| sms.internationalPrice | Number | Customer price pr. international SMS message. | |
| mms.nationalCost | Number | Cost pr. national MMS message. | |
| mms.nationalWholesale | Number | Reseller cost pr. national MMS message. | |
| mms.nationalPrice | Number | Customer price pr. national MMS message. | |
| mms.internationalCost | Number | Cost pr. international MMS message. | |
| mms.internationalWholesale | Number | Reseller cost pr. international MMS message. | |
| mms.internationalPrice | Number | Customer price pr. international MMS message. | |
| data.nationalCost | Number | Cost pr. megabyte of data. | |
| data.nationalWholesale | Number | Reseller cost pr. megabyte of data. | |
| data.nationalPrice | Number | Customer price pr. megabyte of data. | |
| socs | Array | Array of strings with SOCs that must be applied for this product. | |
| destinations.<country-code> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. | |
| 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 | |
| smartWatchIncluded | Boolean | If true, smartwatch eSIM subscription included in this product | |
| dataSharingSimsIncluded | Number | 0-3. Number of included datasharing sims in product | |
| 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. | |
| MVNO_DATA_TOP_UP properties | |||
| mvnoTopUp | Object | Contains top-up properties | |
| mvnoTopUp.data | Number | Data of the top-up package. Given in bytes | |
| 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. | |
| MVNO_ROW_ROAMING properties | |||
| soc | String | The SOC this product relates to. | |
Query example - Reseller product
{ inheritFrom: '1234567890ABCDEF12345678', reseller: '1234567890ABCDEF12345679', productCode: 'MBB25', name: 'Mobil bredbånd 25GB', price: 199.00, applyByResellerOnly: false }
Query example - Master product
{ 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, inheritBy: null, inheritByCustomers: [], invoiceFromFirstNumber: false, 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 } }
See Product Get for examples of more types.
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, FIBER and NUMBER_RENT 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. for 1 unit of this product. |
| 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). |
| 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. |
| applyByResellerOnly | Boolean | True if this product may only be used by a reseller (RESELLER/ADMIN only, customer cannot see these types of products). |
| customer | Id | If product can only be used by a single customer, this is the id of that customer. |
| 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). |
| 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. |
| 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> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. |
| 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 |
| numberRent.wholesaleFirst | Number | Number rent first number on SIP trunk - for reseller |
| numberRent.wholesaleExtra | Number | Number rent extra number on SIP trunk - for reseller |
| numberRent.wholesale100 | Number | Number rent 100-series on SIP trunk - for reseller |
| numberRent.customerFirst | Number | Number rent first number on SIP trunk |
| numberRent.customerExtra | Number | Number rent extra number on SIP trunk |
| numberRent.customer100 | Number | Number rent 100-series on SIP trunk |
| MVNO_RATEPLAN properties | ||
| 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. |
| socs | Array | Array of strings with SOCs that must be applied for this product. |
| destinations.<country-code> | Object | overrides the prices for calling destinations in a given country, e.g. 'SE'. |
| 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 |
| 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 allow value is ALSO |
| externalLicense.platformProductId | String | ID of the product on the external platform. |
| MVNO_ROW_ROAMING properties | ||
| soc | String | The SOC this product relates to. |
Note that properties holding no value may be omitted from the object.
Response examples
Type 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, invoiceFromFirstNumber: false, 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 } }
Type 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, 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 } }
Type 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' }
Type 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 }
Type 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 }
Type 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 }
Type MVNO_DATA_TOP_UP
{ _id: '1234567890ABCDEF12345678', start: '2014-01-01T00:00:00.000Z', end: null, type: 'OTHER', productCode: 'DATA_TOP_UP_5GB', name: 'Data top-up: 5 Gb', unitType: 'UNITS', recurrence: 'NONE' cost: 58, wholesale: 60, price: 65, 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, externalLicense: { platformId: 'ALSO', also: { provisioningId: '123456-adcdef-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' }
Type 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 - customer product
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Product not found in body of request |
| 404 | reseller | Reseller not found |
| 404 | inheritFrom | Product to inherit from was not found |
| 409 | inheritFrom_alreadyExistsOnCustomer | This product has already been inherited to this customer |
| 422 | productCode | Product code is invalid |
| 422 | name | Name is invalid |
| 422 | price | Price is invalid |
| 422 | priceExtra | PriceExtra is invalid |
| 422 | price100 | Price100 is invalid |
| 422 | wholesale | Wholesale is invalid |
| 422 | wholesaleExtra | WholesaleExtra is invalid |
| 422 | wholesale100 | Wholesale100 is invalid |
| 404 | customer | Customer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
Errors - reseller product
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Product not found in body of request |
| 404 | reseller | Reseller not found |
| 404 | inheritFrom | Product to inherit from was not found |
| 409 | inheritFrom_alreadyExistsOnReseller | This product has already been inherited to this reseller |
| 409 | inheritByCustomers_standard | A product that only can be inherited by specific customers cannot be a standard product |
| 409 | inheritByCustomers | The product cannot inherit from the given reseller product |
| 422 | productCode | Product code is invalid |
| 422 | name | Name is invalid |
| 422 | price | Price is invalid |
| 422 | priceExtra | PriceExtra is invalid |
| 422 | price100 | Price100 is invalid |
| 422 | wholesale | Wholesale is invalid |
| 422 | wholesaleExtra | WholesaleExtra is invalid |
| 422 | wholesale100 | Wholesale100 is invalid |
| 404 | customer | Customer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
Errors - master product
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Product not found in body of request |
| 404 | soc | SOC not found |
| 422 | start | Start date is invalid - must be null or between 2014 and 2049 |
| 422 | end | End date is invalid - must be null or between 2014 and 2049 |
| 409 | start | Start date if after end date |
| 422 | type | Type is not recognized |
| 409 | type | Type cannot be changed |
| 422 | productCode | Product code is required |
| 409 | productCode | The product code is already in use |
| 422 | name | Product name is required |
| 422 | unitType | Unit type is not recognized |
| 422 | recurrence | Recurrence type is not recognized |
| 422 | cost | Cost is invalid |
| 422 | costExtra | CostExtra is invalid |
| 422 | cost100 | Cost100 is invalid |
| 422 | price | Price is invalid |
| 422 | priceExtra | PriceExtra is invalid |
| 422 | price100 | Price100 is invalid |
| 422 | wholesale | Wholesale is invalid |
| 422 | wholesaleExtra | WholesaleExtra is invalid |
| 422 | wholesale100 | Wholesale100 is invalid |
| 409 | reseller | Product belongs to reseller, but inheritFrom is missing |
| 409 | inheritFrom | Product inherits from a master product but reseller is missing |
| 409 | applyByResellerOnly | Cannot set apply by reseller only when no reseller is selected |
| 422 | subscription.minutes.homeland | Subscription minutes for homeland is invalid |
| 422 | subscription.minutes.euNordic | Subscription minutes for euNordic is invalid |
| 422 | subscription.minutes.restOfEurope | Subscription minutes for restOfEurope is invalid |
| 422 | subscription.minutes.world1 | Subscription minutes for world1 is invalid |
| 422 | subscription.minutes.world2 | Subscription minutes for world2 is invalid |
| 422 | subscription.minutes.world3 | Subscription minutes for world3 is invalid |
| 422 | ratePercentDiscount | The discount percentage on the rate is invalid |
| 422 | override.connectionFee | Connection fee override is invalid, must be null or between 0 and 1000 |
| 422 | sms.nationalCost | nationalCost is invalid, must be between 0 and 100 |
| 422 | sms.nationalWholesale | nationalWholesale is invalid, must be between 0 and 100 |
| 422 | sms.nationalPrice | nationalPrice is invalid, must be between 0 and 100 |
| 422 | sms.internationalCost | internationalCost is invalid, must be between 0 and 100 |
| 422 | sms.internationalWholesale | internationalWholesale is invalid, must be between 0 and 100 |
| 422 | sms.internationalPrice | internationalPrice is invalid, must be between 0 and 100 |
| 422 | sms.nationalCost | nationalCost is missing |
| 422 | mms.nationalCost | nationalCost is invalid, must be between 0 and 100 |
| 422 | mms.nationalWholesale | nationalWholesale is invalid, must be between 0 and 100 |
| 422 | mms.nationalPrice | nationalPrice is invalid, must be between 0 and 100 |
| 422 | mms.internationalCost | internationalCost is invalid, must be between 0 and 100 |
| 422 | mms.internationalWholesale | internationalWholesale is invalid, must be between 0 and 100 |
| 422 | mms.internationalPrice | internationalPrice is invalid, must be between 0 and 100 |
| 422 | mms.nationalCost | nationalCost is missing |
| 422 | data.nationalCost | nationalCost is invalid, must be between 0 and 100 |
| 422 | data.nationalWholesale | nationalWholesale is invalid, must be between 0 and 100 |
| 422 | data.nationalPrice | nationalPrice is invalid, must be between 0 and 100 |
| 422 | data.nationalCost | nationalCost is missing |
| 422 | data | Data is invalid, must be between 0 and 1048576 |
| 404 | socs | No SOCS found |
| 422 | socs | Duplicate SOCS detected |
| 422 | socs | The following socs are invalid: XXX, XXX… |
| 422 | freeData | Free data is invalid, must be null or between 0 and 1048576 |
| 404 | reseller | Reseller not found |
| 422 | inheritFrom | Product has to inherit from a master product but inheritFrom is missing |
| 422 | inheritFromReseller | Product has to inherit from a reseller product, but inheritFromReseller is missing |
| 422 | reseller | Product belongs to a customer, but reseller is missing |
| 422 | customer | Product belongs to a customer, but customer is missing |
| 404 | inheritFrom | Master product not found |
| 409 | inheritFrom | Master product is not a master product |
| 404 | dslSpeed | DSL speed not found |
| 404 | inheritBy | All resellers was not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/product/create.txt · Last modified: 2025/06/12 13:34 by Joakim Andersen