Table of Contents

API : Destination provider Upload

Introduction

This request will upload a provider price Excel file, and return all matched destinations updated with the provider's cost prices. Note that it doesn't directly save this data, but the result can be saved with Destination Provider Update.

The file must be a Telenor ILD price file: an .xlsx workbook whose filename contains “ild priser”. The prices are read from the second sheet of the workbook.

Request

URL https://api.telecomx.dk/destination/provider/upload
Method POST
Access level RESELLER_ADMIN with FINANCE feature, or ADMIN.
Property Type Description
file file The provider price Excel file, sent as multipart/form-data.

Query example

https://api.telecomx.dk/destination/provider/upload

Response

A JSON array with one entry pr. matched destination, holding the provider cost prices from the file merged with the destination's known prefixes.

JSON object
_id String ISO3166 2-char uppercase country code.
prefix String Prefix for the country, e.g. +45.
breakouts Array One breakout pr. type (MOBILE, FIXED, SPECIAL) with the cost prices read from the file.
breakouts[].prefix Array Array of strings, which is the prefixes, that this destination/type covers
breakouts[].type String FIXED, MOBILE, SPECIAL
breakouts[].cost Object Cost prices for the provider.
breakouts[].cost.TELENOR.fee Number Connection fee cost.
breakouts[].cost.TELENOR.rate Number Pr. minute cost.
newPrefixes Boolean True when the file contained prefixes that are not yet stored on the destination.
roamingRegion Object The destination's stored roaming regions (telenor/tdc ids), carried over unchanged.

Example

[
  {
    "_id": "DE",
    "prefix": "+49",
    "breakouts": [
      {
        "prefix": [ "+4915", "+49151", "+49152", "+49160", "+49170" ],
        "type": "MOBILE",
        "cost": { "TELENOR": { "fee": 0.02, "rate": 0.1795 } }
      },
      {
        "prefix": [ "+49", "+4930", "+4940" ],
        "type": "FIXED",
        "cost": { "TELENOR": { "fee": 0.02, "rate": 0.0955 } }
      },
      {
        "prefix": [ "+49700", "+49701" ],
        "type": "SPECIAL",
        "cost": { "TELENOR": { "fee": 0.2, "rate": 0.1975 } }
      }
    ],
    "newPrefixes": true,
    "roamingRegion": {
      "telenor": "650000000000000000000003",
      "tdc": "650000000000000000000002"
    }
  }
]

Errors

Error code Message Description
422 file.invalid_name File type or name invalid
422 file.invalid_provider_format The file data does not match the provider's format
403 access_denied Insufficient access level
500 internal_error <Unspecified>