api:destination:provider:upload
Table of Contents
API : Destination provider Upload
Introduction
This request will upload an Excel file from a provider, and return all destinations updated with the provider data. Note that it doesn't directly save this data, but will be able to if used in conjunction with Destination Provider Update
Request
| URL | https://api.telecomx.dk/mvno/roamingpartner/upload | ||
|---|---|---|---|
| Method | POST | ||
| Access level | RESELLLER_ADMIN with FINANCE feature, or ADMIN. | ||
| Property | Type | Description | |
| file | file | An Excel file containing a provider's prices | |
Query example
https://api.telecomx.dk/destination/provider/upload
Response
| JSON object | ||
|---|---|---|
| _id | String | ISO3166 2-char uppercase country code. |
| prefix | String | Prefix for the country, e.g. +45. |
| region | String | The region the country belongs to: HOMELAND, EU_NORDIC, REST_OF_EUROPE, WORLD1, WORLD2, WORLD3. |
| breakouts | Array | List of breakouts within a country, with prefix, type, fee-cost, fee-rate |
| 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 each peer (ADMIN only). |
| breakouts[].cost.<PeerId> | String | Id of peer the cost prices applies to. |
| breakouts[].cost.<PeerId>.fee | Number | Connection fee cost. |
| breakouts[].cost.<PeerId>.rate | Number | Pr. minute cost. |
| breakouts[].cost.<PeerId>.rates | Array | List of cost rates for the prefixes in this breakout. |
| fixed | Object | prices for fixed destinations |
| fixed.wholesaleFee | Number | Connection fee for reseller (RESELLER/ADMIN only) |
| fixed.customerFee | Number | Connection fee for customer |
| fixed.wholesaleRate | Number | Pr. minute rate for reseller (RESELLER/ADMIN only) |
| fixed.customerRate | Number | Pr. minute rate for customer |
| mobile | Object | prices for mobile destinations |
| mobile.wholesaleFee | Number | Connection fee for reseller (RESELLER/ADMIN only) |
| mobile.customerFee | Number | Connection fee for customer |
| mobile.wholesaleRate | Number | Pr. minute rate for reseller (RESELLER/ADMIN only) |
| mobile.customerRate | Number | Pr. minute rate for customer |
| special | Object | prices for fixed destinations |
| special.wholesaleFee | Number | Connection fee for reseller (RESELLER/ADMIN only) |
| special.customerFee | Number | Connection fee for customer |
| special.wholesaleRate | Number | Pr. minute rate for reseller (RESELLER/ADMIN only) |
| special.customerRate | Number | Pr. minute rate for customer |
Note that properties holding no value may be omitted from the object.
Full
{ offset: 100, limit: 50, total: 999, destinations: [ { _id: 'DE', prefix: '+49', region: 'EU_NORDIC', breakouts: [ { prefix: [ '+4915', '+49151', '+49152', '+491521', '+49155', '+49157', '+49159', '+4916', '+49160', '+49162', '+49163', '+49170', '+49171', '+49172', '+49173', '+49174', '+49175', '+49176', '+49177', '+49178', '+49179' ], type: 'MOBILE', cost: { TELENOR: { fee: 0.02, rate: 0.1795, rates: [ 0.1795 ] }, TDC: { fee: 0, rate: 0.2931, rates: [ 0.1523, 0.1629, 0.1695, 0.2931 ] } } }, { prefix: [ '+49', '+49164', '+491672', '+49168' ], type: 'FIXED', cost: { TELENOR: { fee: 0.02, rate: 0.0955, rates : [ 0.055, 0.0955 ] }, TDC: { fee: 0, rate: 0.4266, rates: [ 0.0647, 0.4266 ] } } }, { prefix: [ '+49700', '+49701' ], type: 'SPECIAL', cost: { TELENOR: { rate: 0.1975, fee: 0.2 }, TDC: { rate: 0.18, fee: 0 } } } ], fixed: { wholesaleFee: 0.1, wholesaleRate: 0.15, customerFee: 0.2, customerRate: 0.25 }, mobile: { wholesaleFee: 0.1, wholesaleRate: 0.5, customerFee: 0.2, customerRate: 0.75 }, special: { wholesaleFee: 0.2, wholesaleRate: 0.5, customerFee: 0.2, customerRate: 0.6 } }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 422 | invalid_data | Datatype of fee invalid |
| 422 | invalid_data | File type or name invalid |
| 500 | internal_error | <Unspecified> |
api/destination/provider/upload.txt · Last modified: 2023/10/30 21:15 by Per Møller