api:roaming:data:create
Table of Contents
API : Roaming Data Create
Introduction
This request will create a new roaming data price object.
Request
| URL | https://api.telecomx.dk/roaming/data | ||
|---|---|---|---|
| Method | POST | ||
| Access level | RESELLER_ADMIN with FINANCE feature, or ADMIN. | ||
| Body | stayingRegion | String | The region the mobile phone is staying in: EU_NORDIC, REST_OF_EUROPE, WORLD1, WORLD2, WORLD3. |
| cost | Number | Pr. mb data cost. | |
| wholesale | Number | Pr. mb data reseller cost. | |
| price | Number | Pr. mb data customer price. | |
Request body example
{ "stayingRegion": "EU_NORDIC", "cost": 1.0, "wholesale": 1.5, "price": 1.75 }
Response
The response will be the newly created roaming data, 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. |
| cost | Number | Pr. mb data cost (RESELLER_ADMIN/ADMIN only). |
| wholesale | Number | Pr. mb data reseller cost (RESELLER, RESELLER_ADMIN or ADMIN only). |
| price | Number | Pr. mb data customer price. |
Example
{ "_id": "650000000000000000000001", "stayingRegion": "EU_NORDIC", "cost": 1.0, "wholesale": 1.5, "price": 1.75 }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | stayingRegion | Staying region is not recognized |
| 422 | cost | Cost is invalid |
| 422 | wholesale | Wholesale is invalid |
| 422 | price | Price is invalid |
| 409 | stayingRegion | There already exists an entry for the selected staying region |
| 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> |
api/roaming/data/create.txt · Last modified: by Mikkel Meerwaldt Jørgensen