Request
|
Endpoint:
|
/api/number-porting-requests
|
|
Method:
|
POST
|
|
Headers:
|
Accept: application/vnd.cloudlx.v1+json
|
|
Authorization: Bearer <access_token>
|
JSON Request
{
"name": "My Porting Request",
"country": "GB",
"number_service_type": "GEOGRAPHIC",
"numbers":[
{
"number": "+442031234566",
"operator": "BT"
},
{
"number": "+442031234567",
"operator": "BT",
"range_holder": "BT",
"account_number": "12345",
"channel": 10,
"number_translation": {
"all": "+44203123456700001"
}
}
],
"emergency_address_id": 17,
"trunk_group_ids": [
82
]
}
JSON Parameters
|
name
|
Description
|
A friendly name for the porting request
|
|
Type
|
String
|
|
Example
|
My Porting Request
|
|
country
|
Description
|
The ISO2 code for the country to which the number belongs. A list of ISO codes can be found using the Countries API Endpoint.
|
|
Type
|
String
|
|
Example
|
"GB"
|
|
number_service_type
|
Description
|
The code representing the Number Service Type. Permitted values; GEOGRAPHIC, TOLL FREE, PREMIUM, MOBILE
|
|
Type
|
String
|
|
Example
|
GEOGRAPHIC
|
|
numbers
|
Description
|
Array of objects describing the numbers to port
|
|
Type
|
Array[Object]
|
|
Example
|
{
"number": "+442031234567",
"operator": "BT",
"range_holder": "BT",
"account_number": "12345",
"channel": 10
}
|
|
trunk_group_ids
|
Description
|
Array of integers representing IDs of outbound trunk groups. Found via the Trunk Groups API.
|
|
Type
|
Array[Integer]
|
|
Example
|
|
Optional JSON Parameters
|
emergency_address_id
|
Description
|
An integer representing the ID of emergency address. Found via the Number Addresses API (the address must be marked as useForEmergencyAddress).
|
|
Type
|
Integer
|
|
Example
|
17
|
numbers Parameters
|
number
|
Description
|
The number which is to be ported. This should be in e164 format including the + symbol at the start of the number.
|
|
Type
|
String
|
|
Example
|
"+442031234567"
|
|
operator
|
Description
|
The name of the current operator of the number.
|
|
Type
|
String
|
|
Example
|
"British Telecommunications PLC"
|
|
range_holder
|
Description
|
The name of the range holder for the number.
|
|
Type
|
String
|
|
Example
|
"British Telecommunications PLC"
|
|
account_number
|
Description
|
The account number with the losing provider for the number
|
|
Type
|
String
|
|
Example
|
"123123123"
|
|
channel
|
Description
|
The channel information for the number
|
|
Type
|
String
|
|
Example
|
"4"
|
|
number_translation
|
Description
|
An object with keys indicating translation numbers.
For TOLL FREE numbers provide all of fixed, mobile or payphone.
For any other type, provide all.
|
|
Type
|
Object
|
|
Required
|
No
|
|
Example
|
Toll Free:
{
"fixed": "+4480011111111",
"mobile": "+4480011111112",
"payphone": "+4480011111113"
}
Any other number type:
{
"all": "+44203123456700001"
}
|
Response
Example:
{
"success": true,
"message": "Number Porting Requested created successfully",
"id": 147
}
|
success
|
Description
|
Boolean indicator for a successful request.
|
|
Type
|
Boolean
|
|
Example
|
true
|
|
message
|
Description
|
A human-readable message of the status.
|
|
Type
|
String
|
|
Example
|
"Number Porting Requested created successfully"
|
|
id
|
Description
|
The unique ID associated to the newly created porting request.
|
|
Type
|
Integer
|
|
Example
|
147
|