User Tools

Site Tools


api:product:create

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 for reseller and customer products under the user's own reseller.
RESELLER_ADMIN or ADMIN for reseller and customer products under any reseller.
Master products: ADMIN, or RESELLER_ADMIN with the FINANCE feature.
Properties for an inherited customer product
Body inheritFromReseller ObjectID Id of the reseller product this product inherits from.
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 to.
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, DNS, PBX_USER and PBX_EXTENSION 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.
price Number Customer price for one unit of the product.
applyByResellerOnly Boolean True if only the reseller can use this product on a customer.
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.
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 customer products of type MVNO_RATEPLAN, PBX_EXTENSION, or PBX_SIP_PHONE belonging to the same customer are allowed.
includedProducts[]._id ObjectID Id of product that is included
includedProducts[].amount Number Amount of products of this kind that are included.
Properties for an inherited reseller product
Body inheritFrom Id Id of the master product this product inherits its settings from. Omit for the stand-alone types below.
type String Only used to create a stand-alone reseller product of type AD_HOC, IPTV_SERVICE or EXTERNAL_LICENSE (no inheritFrom); all other types are set by the master product.
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 DNS 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.
price Number Customer price for one unit of the product.
wholesale Number Resellers price for one unit of the product (RESELLER_ADMIN/ADMIN only; any RESELLER for AD_HOC, IPTV_SERVICE and EXTERNAL_LICENSE products).
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.
standard Boolean If true, then whenever a customer is created under the product's reseller, a customer product inheriting from this product is automatically created. Only for types MVNO_RATEPLAN, SIP_RATEPLAN, NUMBER_RENT, PBX_USER, PBX_EXTENSION and PBX_SIP_PHONE.
inheritByCustomers Array Ids of the customers that may inherit this product; empty for all customers (RESELLER_ADMIN/ADMIN only).
Stand-alone types (AD_HOC, IPTV_SERVICE, EXTERNAL_LICENSE)
start Date [optional] AD_HOC only: the date from which the product can be used.
end Date [optional] AD_HOC only: the date from which the product can not be used anymore.
unitType String AD_HOC only: the type of units this product is measured in: MIN, MB, UNITS, HOURS, KM, MONTHS.
externalLicense Object EXTERNAL_LICENSE only: 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.provisioningId String The provisioning ID of the ALSO license, which is used to match with a product in ALSO. Max 50 characters.
externalLicense.also.bindingPeriod String The binding period in ALSO. Allowed values are NONE, MONTHLY and YEARLY.
NUMBER_RENT properties
wholesaleExtra Number Number rent extra number for reseller, if product type is NUMBER_RENT (RESELLER_ADMIN/ADMIN only).
wholesale100 Number Number rent 100-series for reseller, if product type is NUMBER_RENT (RESELLER_ADMIN/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 (RESELLER_ADMIN/ADMIN only).
sms.nationalPrice Number Customer price pr. national SMS message.
sms.internationalWholesale Number Reseller cost pr. international SMS message (RESELLER_ADMIN/ADMIN only).
sms.internationalPrice Number Customer price pr. international SMS message.
mms.nationalWholesale Number Reseller cost pr. national MMS message (RESELLER_ADMIN/ADMIN only).
mms.nationalPrice Number Customer price pr. national MMS message.
mms.internationalWholesale Number Reseller cost pr. international MMS message (RESELLER_ADMIN/ADMIN only).
mms.internationalPrice Number Customer price pr. international MMS message.
data.nationalWholesale Number Reseller cost pr. megabyte of data (RESELLER_ADMIN/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
productInfo
productInfo.shortDescription String Short description of the product. Used for “Privat telefoni portal”. max 64 characters. [optional]
productInfo.description String Description of the product. Used for “Privat telefoni portal”. max 512 characters. [optional]
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. Must be between 2014 and 2049.
end Date [optional] The date from which the product can not be used anymore, null for no limit. Must be between 2014 and 2049.
type String Type of product: SIP_RATEPLAN, MVNO_RATEPLAN, DSL, FIBER, NUMBER_RENT, DNS, PBX_USER, PBX_EXTENSION, PBX_SIP_PHONE, MVNO_DATA_TOP_UP, MVNO_ROW_ROAMING, IPTV_SERVICE, 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, DNS, PBX_USER, PBX_EXTENSION and PBX_SIP_PHONE 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.
autoInherit Boolean If true, then whenever a new reseller is created, a reseller product inheriting from this master product is automatically created.
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
network String Which mobile network this product is valid for: TELENOR, TDC or BOTH.
dataSharingSimsIncluded Number Amount of data sharing SIMS included - defaults to 0, maximum value is 3.
smartWatchIncluded Boolean If true, smartwatch eSIM subscription included in this product
dataRateplan Boolean If true, this is a data-only rate plan; smartWatchIncluded and dataSharingSimsIncluded are then forced off.
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.dataRoamLikeHome 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
DSL properties
dslSpeed String DSL speed product name. See Product DSL Speed List.
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
communicatorAccess Boolean Whether users with this product have access to Communicator. Defaults to true.
recordingAccess Boolean Whether users with this product have access to call recording. Defaults to true.
extensionAccess Boolean Whether users with this product can have PBX extensions. Defaults to true.
sipPhoneAccess Boolean Whether users with this product can have SIP phones. 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, min 1073741824 (1 GiB), max 107374182400 (100 GiB).
MVNO_ROW_ROAMING properties
soc String The SOC this product relates to. Must be a TDC SOC in the DataRoamROW group; unitType and recurrence are forced to UNITS and NONE.

Query example - Reseller product

{
  "inheritFrom": "650000000000000000000030",
  "reseller": "650000000000000000000020",
  "productCode": "MBB25",
  "name": "Mobile broadband 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,
  "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,
    "connectionFeeOnCallAttempt": true
  },
  "destinations": {}
}

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, PBX_USER, PBX_EXTENSION, PBX_SIP_PHONE, MVNO_DATA_TOP_UP, MVNO_ROW_ROAMING, IPTV_SERVICE, AD_HOC, EXTERNAL_LICENSE, 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. (RESELLER_ADMIN/ADMIN only).
wholesale Number The reseller price, pr. month if recurring. (RESELLER, RESELLER_ADMIN or 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, RESELLER_ADMIN or 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 applied to accounts by the reseller, not by the customer itself.
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 product. Each item holds _id (product id), name (product name), reseller (reseller id) and resellerName.
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[].name 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
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.dataRoamLikeHome Number Megabytes of data included while roaming in the EU region.
subscription.dataEu Number Legacy name for dataRoamLikeHome - only present on older products.
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 (RESELLER_ADMIN/ADMIN only).
sms.nationalWholesale Number Reseller cost pr. national SMS message (RESELLER, RESELLER_ADMIN or ADMIN only).
sms.nationalPrice Number Customer price pr. national SMS message.
sms.internationalCost Number Cost pr. international SMS message (RESELLER_ADMIN/ADMIN only).
sms.internationalWholesale Number Reseller cost pr. international SMS message (RESELLER, RESELLER_ADMIN or ADMIN only).
sms.internationalPrice Number Customer price pr. international SMS message.
mms.nationalCost Number Cost pr. national MMS message (RESELLER_ADMIN/ADMIN only).
mms.nationalWholesale Number Reseller cost pr. national MMS message (RESELLER, RESELLER_ADMIN or ADMIN only).
mms.nationalPrice Number Customer price pr. national MMS message.
mms.internationalCost Number Cost pr. international MMS message (RESELLER_ADMIN/ADMIN only).
mms.internationalWholesale Number Reseller cost pr. international MMS message (RESELLER, RESELLER_ADMIN or ADMIN only).
mms.internationalPrice Number Customer price pr. international MMS message.
data.nationalCost Number Cost pr. megabyte of data (RESELLER_ADMIN/ADMIN only).
data.nationalWholesale Number Reseller cost pr. megabyte of data (RESELLER, RESELLER_ADMIN or 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
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": "650000000000000000000010",
  "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": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "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,
    "connectionFeeOnCallAttempt": true
  }
}

Type MVNO_RATEPLAN

{
  "_id": "650000000000000000000011",
  "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": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false,
  "pbxProduct": false,
  "dataSharingSimsIncluded": 0,
  "smartWatchIncluded": false,
  "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": [
      { "_id": "650000000000000000000040", "minutes": 3000 }
    ],
    "data": 25600,
    "dataRoamLikeHome": 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": "650000000000000000000012",
  "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": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false,
  "dslSpeed": "5120/512FL"
}

Type FIBER

{
  "_id": "650000000000000000000013",
  "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": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false
}

Type NUMBER_RENT

{
  "_id": "650000000000000000000014",
  "start": "2014-01-01T00:00:00.000Z",
  "end": null,
  "type": "NUMBER_RENT",
  "productCode": "NUM01",
  "name": "Number rent",
  "unitType": "MONTHS",
  "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": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false
}

Type PBX_USER

{
  "_id": "650000000000000000000015",
  "start": "2014-01-01T00:00:00.000Z",
  "end": null,
  "type": "PBX_USER",
  "productCode": "PBXUSER02",
  "name": "Small user package",
  "unitType": "MONTHS",
  "recurrence": "QUARTERLY",
  "recurrenceFullMonth": false,
  "cost": 0.00,
  "wholesale": 20.00,
  "price": 25.00,
  "reseller": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false,
  "includedProducts": [
    { "_id": "650000000000000000000031", "amount": 1 },
    { "_id": "650000000000000000000032", "amount": 2 }
  ],
  "communicatorAccess": true,
  "recordingAccess": true,
  "extensionAccess": true,
  "sipPhoneAccess": true
}

Type MVNO_DATA_TOP_UP

{
  "_id": "650000000000000000000016",
  "start": "2014-01-01T00:00:00.000Z",
  "end": null,
  "type": "MVNO_DATA_TOP_UP",
  "productCode": "TOPUP5G",
  "name": "Data top-up 5 GB",
  "unitType": "UNITS",
  "recurrence": "NONE",
  "cost": 49,
  "wholesale": 49,
  "price": 59,
  "reseller": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false,
  "mvnoTopUp": {
    "data": 5368709120
  }
}

Type EXTERNAL_LICENSE

{
  "_id": "650000000000000000000017",
  "start": "2022-01-01T00:00:00.000Z",
  "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": "650000000000000000000020",
  "inheritByCustomers": [],
  "applyByResellerOnly": false,
  "externalLicense": {
    "platformId": "ALSO",
    "also": {
      "provisioningId": "123456-abcdef-123456",
      "bindingPeriod": "MONTHLY"
    }
  }
}

Type MVNO_ROW_ROAMING

{
  "_id": "650000000000000000000018",
  "start": "2014-01-01T00:00:00.000Z",
  "end": null,
  "type": "MVNO_ROW_ROAMING",
  "productCode": "ROW5GB",
  "name": "Rest of World roaming: 5 GB",
  "unitType": "UNITS",
  "recurrence": "NONE",
  "recurrenceFullMonth": false,
  "cost": 0.00,
  "wholesale": 20.00,
  "price": 25.00,
  "reseller": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false,
  "soc": "ABCDE18GJH"
}

Type OTHER

{
  "_id": "650000000000000000000019",
  "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": "650000000000000000000020",
  "inheritFrom": "650000000000000000000030",
  "inheritByCustomers": [],
  "applyByResellerOnly": false
}

Errors - customer product

Error code Message Description
400 bad_request Product not found in body of request
403 access_denied Insufficient access level
404 inheritFrom Reseller product not found
404 reseller Reseller not found
404 customer Customer not found
409 reseller Reseller is not the reseller of the given customer
409 inheritFrom The product cannot inherit from the given reseller product
409 inheritFrom_alreadyExistsOnCustomer This OTHER product is already inherited to this customer
404 product.includedProducts Included products not found
409 start Start date if after end date
409 voiceAccounts There are <X> that use this MVNO account
422 start / end Start/End date is invalid - must be null or between 2014 and 2049
422 recurrence Product type does not allow recurrence mode NONE
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 subscription.minutes.<region> Subscription minutes for <region> is invalid
422 destinations.cc.<section>.<price> <Section> destination override for <CC> <price> is invalid
422 sms.<field> / mms.<field> / data.<field> <field> is invalid, must be between 0 and 100
nationalCost is missing
422 costExtra / wholesaleExtra / priceExtra / cost100 / wholesale100 / price100 Number rent <field> is invalid - min 0, max 999999
404 socs No SOCS found
422 socs Duplicate SOCS detected
The following socs are invalid: <soc>, …
404 dslSpeed DSL speed not found
404 <property> Property is missing.
409 <property> Value is not one of the permitted values.
Invalid property type.
422 <property> Invalid value. Must not be lower than <N>. / Must not be higher than <N>.
422 multiple More than one validation error - the response body holds the individual errors
500 internal_error <Unspecified>

Errors - reseller product

Error code Message Description
400 bad_request Product not found in body of request
403 access_denied Insufficient access level
404 inheritFrom Master product not found
404 reseller Reseller not found
409 inheritFrom_alreadyExistsOnReseller This product is already inherited to this reseller
422 inherit The product needs to be either a reseller product with the “inheritFrom” property or a customer product with the “inheritFromReseller” product
409 inheritFrom Master product is not a master product
409 productCode The product code is already in use
409 inheritByCustomers_standard A product that only can be inherited by specific customers cannot be a standard product
409 start Start date if after end date
409 reseller Product belongs to reseller, but inheritFrom is missing
409 inheritFrom Product inherits from a master product but reseller is missing
422 type Type is not recognized
422 recurrence Product type does not allow recurrence mode NONE
Recurrence type is not recognized
422 productCode Product code is required
422 name Product name is required
422 unitType Unit type is not recognized
422 start / end Start/End date is invalid - must be null or between 2014 and 2049
422 cost / wholesale / price <Field> is invalid - min 0, max 999999
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 subscription.minutes.<region> Subscription minutes for <region> is invalid
422 destinations.cc.<section>.<price> <Section> destination override for <CC> <price> is invalid
422 sms.<field> / mms.<field> / data.<field> <field> is invalid, must be between 0 and 100
nationalCost is missing
422 costExtra / wholesaleExtra / priceExtra / cost100 / wholesale100 / price100 Number rent <field> is invalid - min 0, max 999999
404 socs No SOCS found
422 socs Duplicate SOCS detected
The following socs are invalid: <soc>, …
404 dslSpeed DSL speed not found
404 <property> Property is missing.
409 <property> Value is not one of the permitted values.
Invalid property type.
422 <property> Invalid value. Must not be lower than <N>. / Must not be higher than <N>.
422 multiple More than one validation error - the response body holds the individual errors
500 unknown_error Omitting wholesale or price on an AD_HOC, IPTV_SERVICE or EXTERNAL_LICENSE product currently fails
500 internal_error <Unspecified>

Errors - master product

Error code Message Description
400 bad_request Product not found in body of request
403 access_denied Insufficient access level
404 reseller Reseller not found
404 inheritFrom Master product not found
404 dslSpeed DSL speed not found
404 socs No SOCS found
404 soc SOC not found
404 inheritBy All resellers were not found
409 start Start date if after end date
409 productCode The product code is already in use
409 soc_in_use The SOC is already in use on another master product
409 reseller Product belongs to reseller, but inheritFrom is missing
409 inheritFrom Product inherits from a master product but reseller is missing
409 inheritFrom Master product is not a master product
409 applyByResellerOnly Cannot set apply by reseller only when no reseller is selected
422 start / end Start/End date is invalid - must be null or between 2014 and 2049
422 productCode Product code is required
422 name Product name is required
422 unitType Unit type is not recognized
422 recurrence Product type does not allow recurrence mode NONE
422 destinations.cc.<section>.<price> <Section> destination override for <CC> <price> is invalid
422 socs Duplicate SOCS detected
The following socs are invalid: <soc>, …
404 <property> Property is missing.
409 <property> Value is not one of the permitted values.
Invalid property type.
422 <property> Invalid value. Must not be lower than <N>. / Must not be higher than <N>.
422 multiple More than one validation error - the response body holds the individual errors
500 unknown_error Omitting cost, wholesale or price currently fails
500 internal_error <Unspecified>
api/product/create.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki