Table of Contents

API : Roaming : Region Create

Introduction

This request will create a single roaming region.

Creating a region has side effects: the new region is added to every other region on the same network as an outbound call price entry (and gets entries for them and itself, price 0 where not supplied), and a non-homeland region is added to every MVNO_RATEPLAN product's roaming subscription with 0 included minutes.

Request

URL https://api.telecomx.dk/roaming/region
Method POST
Access level RESELLER_ADMIN with FINANCE feature, or ADMIN.

Request body

Field Type Description
names Array List of names, used for localization
names[].language String Two-letter language code. Allowed values are da, en.
names[].text String The localization of the region name (2-50 characters)
network String Which network this region belongs to. Allowed values are TELENOR, TDC.
roamLikeHome Boolean Whether this region allows roam like home - for now, only used for EU countries.
homeland Boolean Whether this region is a “homeland” region. For now it's only used for Denmark.
notes String Notes if necessary (max 512 characters)
sms Object SMS properties
sms.cost Number Cost price for SMS's in this region
sms.wholesale Number Wholesale price for SMS's in this region
sms.price Number Customer price for SMS's in this region
data Object Data properties
data.cost Number Cost price per megabyte data usage in this region
data.wholesale Number Wholesale price per megabyte data usage in this region
data.price Number Customer price per megabyte data usage in this region
voice Object Voice properties
voice.inbound Object Inbound voice properties
voice.inbound.rateCost Number Cost price per minute, when receiving a call in this region
voice.inbound.rateWholesale Number Wholesale price per minute, when receiving a call in this region
voice.inbound.rate Number Customer price per minute, when receiving a call in this region
voice.outbound Array List of regions, with the prices for calling them.
voice.outbound[]._id ObjectId ID of region
voice.outbound[].connectionFeeCost Number Cost price for starting a call to this region
voice.outbound[].connectionFeeWholesale Number Wholesale price for starting a call to this region
voice.outbound[].connectionFee Number Customer price for starting a call to this region
voice.outbound[].rateCost Number Cost price per minute, when calling this region
voice.outbound[].rateWholesale Number Wholesale price per minute, when calling this region
voice.outbound[].rate Number Customer price per minute, when calling this region

Request body example

{
  "names": [
    { "language": "da", "text": "EU & Vesteuropa" },
    { "language": "en", "text": "EU & Western Europe" }
  ],
  "network": "TELENOR",
  "roamLikeHome": true,
  "homeland": false,
  "notes": "All EU and EEA countries",
  "sms": { "cost": 0.05, "wholesale": 0.06, "price": 0.07 },
  "data": { "cost": 0.078, "wholesale": 0.082, "price": 0.09 },
  "voice": {
    "inbound": { "rateCost": 0.1, "rateWholesale": 0.15, "rate": 0.18 },
    "outbound": [
      {
        "_id": "650000000000000000000002",
        "connectionFeeCost": 0.15,
        "connectionFeeWholesale": 0.19,
        "connectionFee": 0.21,
        "rateCost": 0.1,
        "rateWholesale": 0.15,
        "rate": 0.18
      }
    ]
  }
}

Response

Field Type Description
_id ObjectID Id
names Array List of names, used for localization
names[].language String Two-letter language code. Allowed values are da, en.
names[].text String The localization of the region name (2-50 characters)
network String Which network this region belongs to. Allowed values are TELENOR, TDC.
roamLikeHome Boolean Whether this region allows roam like home - for now, only used for EU countries.
homeland Boolean Whether this region is a “homeland” region. For now it's only used for Denmark.
notes String Notes if necessary (max 512 characters)
sms Object SMS properties
sms.cost Number Cost price for SMS's in this region
sms.wholesale Number Wholesale price for SMS's in this region
sms.price Number Customer price for SMS's in this region
data Object Data properties
data.cost Number Cost price per megabyte data usage in this region
data.wholesale Number Wholesale price per megabyte data usage in this region
data.price Number Customer price per megabyte data usage in this region
voice Object Voice properties
voice.inbound Object Inbound voice properties
voice.inbound.rateCost Number Cost price per minute, when receiving a call in this region
voice.inbound.rateWholesale Number Wholesale price per minute, when receiving a call in this region
voice.inbound.rate Number Customer price per minute, when receiving a call in this region
voice.outbound Array List of regions, with the prices for calling them.
voice.outbound[]._id ObjectId ID of region
voice.outbound[].connectionFeeCost Number Cost price for starting a call to this region
voice.outbound[].connectionFeeWholesale Number Wholesale price for starting a call to this region
voice.outbound[].connectionFee Number Customer price for starting a call to this region
voice.outbound[].rateCost Number Cost price per minute, when calling this region
voice.outbound[].rateWholesale Number Wholesale price per minute, when calling this region
voice.outbound[].rate Number Customer price per minute, when calling this region

Example

{
  "_id": "650000000000000000000001",
  "names": [
    { "language": "da", "text": "EU & Vesteuropa" },
    { "language": "en", "text": "EU & Western Europe" }
  ],
  "network": "TELENOR",
  "roamLikeHome": true,
  "homeland": false,
  "notes": "All EU and EEA countries",
  "sms": { "cost": 0.05, "wholesale": 0.06, "price": 0.07 },
  "data": { "cost": 0.078, "wholesale": 0.082, "price": 0.09 },
  "voice": {
    "inbound": { "rateCost": 0.1, "rateWholesale": 0.15, "rate": 0.18 },
    "outbound": [
      {
        "_id": "650000000000000000000002",
        "connectionFeeCost": 0.15,
        "connectionFeeWholesale": 0.19,
        "connectionFee": 0.21,
        "rateCost": 0.1,
        "rateWholesale": 0.15,
        "rate": 0.18
      }
    ]
  }
}

Errors

Error code Message Description
403 access_denied A minimum access level of 'RESELLER_ADMIN' required
403 access_denied Employees does not have the required feature FINANCE
409 homeland There is already a region for the given network, that has “homeland” set to true
409 roamLikeHome There is already a region for the given network, that has “roamLikeHome” set to true
409 homeland_roamLikeHome A region cannot both have “roamLikeHome” and “homeland” set to true
500 unknown_error Omitting names or voice currently fails
500 internal_error <Unspecified>