User Tools

Site Tools


api:roaming:text:create

API : Roaming Text Create

Introduction

This request will create a new roaming text price object.

Request

URL https://api.telecomx.dk/roaming/text
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. message cost.
wholesale Number Pr. message reseller cost.
price Number Pr. message 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 text, 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. message cost (RESELLER_ADMIN/ADMIN only).
wholesale Number Pr. message reseller cost (RESELLER, RESELLER_ADMIN or ADMIN only).
price Number Pr. message 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/text/create.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki