This request will update multiple existing destinations.
A destination consists of the prefixes (e.g. +4677 and +4674 for Swedish high-rated numbers) that is the beginning of the number you dial to get to a number in that destination, the country it belongs to, the type of numbers that the destination holds (landline, mobile, special, free) and the connection fee and rates for calling a number in the destination.
This request only updates the prices, and not country code or country name.
| URL | https://api.telecomx.dk/destination/bulk | ||
|---|---|---|---|
| Method | POST | ||
| Access level | RESELLER_ADMIN with FINANCE feature, or ADMIN | ||
| Query | format | [optional] Format can either be csv or json, defaults to json. | |
If format is csv, then the request has to be made as a multipart-form with exactly one file.
| Form | ||
|---|---|---|
| File | file | CSV file containing destinations with their mobile and fixed prices. |
The file must be semicolon separated with decimal comma as the decimal separator, and its header line must match the template exactly. The template can be downloaded with Destination List using format=csv.
CountryCode;Country;Prefix;Region;TDC region;Telenor region;CustomerFixedFee;CustomerFixedRate;CustomerMobileFee;CustomerMobileRate;ResellerFixedFee;ResellerFixedRate;ResellerMobileFee;ResellerMobileRate SE;Sweden;+"46";EU_NORDIC;Europa;Europa;0,5;1,5;0,5;1;0,02;0,5;0,02;0,3 NO;Norway;+"47";EU_NORDIC;Europa;Europa;0,5;1,5;0,5;1;0,02;0,5;0,02;0,3
Body is an array of destinations.
| Destination object | ||
|---|---|---|
| _id | String | 2-Char ISO3166 country code, e.g DK, SE, FR |
| fixed | Object | prices for fixed destinations |
| fixed.wholesaleFee | Number | Connection fee for reseller |
| fixed.customerFee | Number | Connection fee for customer |
| fixed.wholesaleRate | Number | Pr. minute rate for reseller |
| fixed.customerRate | Number | Pr. minute rate for customer |
| mobile | Object | prices for mobile destinations |
| mobile.wholesaleFee | Number | Connection fee for reseller |
| mobile.customerFee | Number | Connection fee for customer |
| mobile.wholesaleRate | Number | Pr. minute rate for reseller |
| mobile.customerRate | Number | Pr. minute rate for customer |
[ { "_id": "FR", "fixed": { "customerFee": 0.5, "customerRate": 2, "wholesaleFee": 0.5, "wholesaleRate": 3 }, "mobile": { "customerFee": 0.5, "customerRate": 2, "wholesaleFee": 0.5, "wholesaleRate": 3 } }, { "_id": "DE", "fixed": { "customerFee": 0.5, "customerRate": 2.3, "wholesaleFee": 0.5, "wholesaleRate": 1.8 }, "mobile": { "customerFee": 0.5, "customerRate": 3, "wholesaleFee": 0.5, "wholesaleRate": 1.2 } } ]
{
"success": true
}
| Error code | Message | Description |
|---|---|---|
| 404 | destinations | No destinations found in request |
| 404 | id | Destination not found |
| 404 | file | File not found |
| 422 | files | Only one file can be uploaded |
| 422 | csv | CSV contains no destination rows |
| 422 | csv.headers | The headers of the file does not match the template's |
| 422 | fixed.wholesaleFee | Not a valid number |
| 422 | fixed.wholesaleRate | Not a valid number |
| 422 | fixed.customerFee | Not a valid number |
| 422 | fixed.customerRate | Not a valid number |
| 422 | mobile.wholesaleFee | Not a valid number |
| 422 | mobile.wholesaleRate | Not a valid number |
| 422 | mobile.customerFee | Not a valid number |
| 422 | mobile.customerRate | Not a valid number |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |