Table of Contents

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.
The receiving customer must have the SIP or MVNO feature.
Param NUMBER_ID The number (E.164 format) to assign
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
422 id Number is invalid (not E.164 format)
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
500 internal_error <Unspecified>