User Tools

Site Tools


api:roaming:voice:create

API : Roaming Voice Create

Introduction

This request will create a new roaming voice price object.

Request

URL https://api.telecomx.dk/roaming/voice
Method POST
Access level RESELLER_ADMIN with FINANCE feature, or ADMIN.
Body direction String [optional] OUT for outbound call prices, IN for inbound call prices. Defaults to OUT.
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. Required for direction OUT, not used for IN.
connectionFeeCost Number Connection fee cost (direction OUT only - ignored for IN).
connectionFeeWholesale Number Connection fee for resellers (direction OUT only - ignored for IN).
connectionFee Number Connection fee for customers (direction OUT only - ignored for IN).
rateCost Number Pr. minute cost.
rateWholesale Number Pr. minute reseller cost.
rate Number Pr. minute customer price.

Request body example

{
  "direction": "OUT",
  "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
}

Response

The response will be the newly created 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
422 stayingRegion Staying region is not recognized
422 calledRegion Called region is not recognized
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
409 stayingRegion There already exists an entry for the selected staying/called region
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/voice/create.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki