API : Roaming Voice Update
Introduction
This request will update a roaming voice price object. Set a property to null or omit it to leave it unchanged. The staying and called regions cannot be changed.
Request
| URL | https://api.telecomx.dk/roaming/voice/ID |
| Method | POST |
| Access level | RESELLER_ADMIN with FINANCE feature, or ADMIN. |
| Param | ID | Id of the roaming voice (24-char hex string). |
| Body | connectionFeeCost | Number | [optional] Connection fee cost. |
| connectionFeeWholesale | Number | [optional] Connection fee for resellers. |
| connectionFee | Number | [optional] Connection fee for customers. |
| rateCost | Number | [optional] Pr. minute cost. |
| rateWholesale | Number | [optional] Pr. minute reseller cost. |
| rate | Number | [optional] Pr. minute customer price. |
Request body example
{
"connectionFeeCost": 0.02,
"connectionFeeWholesale": 0.05,
"connectionFee": 0.2,
"rateCost": 1.0,
"rateWholesale": 1.5,
"rate": 1.75
}
Response
The response will be the updated roaming voice, if no errors occurred.
| JSON object |
| _id | Id | Id |
| stayingRegion | String | The region the mobile phone is staying in: EU_NORDIC, REST_OF_EUROPE, WORLD1, WORLD2, WORLD3. |
| calledRegion | String | The region called: EU_NORDIC, REST_OF_EUROPE, WORLD1, WORLD2, WORLD3 (only for direction OUT). |
| connectionFeeCost | Number | Connection fee cost (RESELLER_ADMIN/ADMIN only). |
| connectionFeeWholesale | Number | Connection fee for resellers (RESELLER, RESELLER_ADMIN or ADMIN only). |
| connectionFee | Number | Connection fee for customers. |
| rateCost | Number | Pr. minute cost (RESELLER_ADMIN/ADMIN only). |
| rateWholesale | Number | Pr. minute reseller cost (RESELLER, RESELLER_ADMIN or ADMIN only). |
| rate | Number | Pr. minute customer price. |
Example
{
"_id": "650000000000000000000001",
"stayingRegion": "EU_NORDIC",
"calledRegion": "REST_OF_EUROPE",
"connectionFeeCost": 0.02,
"connectionFeeWholesale": 0.05,
"connectionFee": 0.2,
"rateCost": 1.0,
"rateWholesale": 1.5,
"rate": 1.75
}
Errors
| Error code | Message | Description |
| 400 | bad_request | Id not found in request URI |
| 404 | id | Roaming voice not found |
| 422 | connectionFeeCost | ConnectionFeeCost is invalid |
| 422 | connectionFeeWholesale | ConnectionFeeWholesale is invalid |
| 422 | connectionFee | ConnectionFee is invalid |
| 422 | rateCost | RateCost is invalid |
| 422 | rateWholesale | RateWholesale is invalid |
| 422 | rate | Rate is invalid |
| 403 | access_denied | A minimum access level of 'RESELLER_ADMIN' required |
| 403 | access_denied | Employees does not have the required feature FINANCE |
| 500 | internal_error | <Unspecified> |