User Tools

Site Tools


api:number:assign

API : Number assign

Introduction

This request will assign a number or the range it belongs to, to a customer.

If the numbers are currently owned by the user then they are re-assigned, if they are available for purchase, then the customer is invoiced for the number(s).

If you wish to assign numbers to a customer SIP account or MVNO account, then this is NOT the API call to use, instead just add the numbers to the SIP/MVNO account and it/they will automatically be assigned. The primary purpose of this API call is to allow a customer to buy a range of numbers for future use, and to ensure nobody else will use it.

Request

URL https://api.telecomx.dk/number/NUMBER_ID/assign
Method GET
Access level OWNER (can only purchase numbers in state AVAILABLE).
RESELLER (can assign own and AVAILABLE numbers if the customer belongs to the reseller).
ADMIN.
Param NUMBER_ID The number (E.164 format) to pre-reserve
Query customer Id of the customer to assign the number(s) to (24-char hex string)

Query example

GET https://api.telecomx.dk/number/+4570305050/assign?customer=1234567890ABCDEF12345678

Response

Json object
success Boolean True on success

Example

{
  success: true
}

Errors

Error code Message Description
400 bad_request Number not found in request URI
422 customer Customer is not valid
409 id Number(s) are not available
403 access_denied Insufficient access level
404 not_found Number not found
api/number/assign.txt · Last modified: 2019/05/28 06:01 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki