{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"Number Order","type":"basic","slug":"number-order","excerpt":"API to order available tracking numbers","body":"[block:api-header]\n{\n \"title\": \"Use the Number Order API to order available tracking numbers\"\n}\n[/block]\nUse the Number Order API to order available tracking numbers from DialogTech's inventory.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Base URL for Number Order\",\n \"body\": \"https://secure.dialogtech.com/ibp_api.php\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Parameter List\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Parameter\",\n \"h-1\": \"Required\",\n \"h-2\": \"Accepts\",\n \"h-3\": \"Max Length\",\n \"h-4\": \"Notes\",\n \"h-5\": \"Usage\",\n \"0-0\": \"action\",\n \"0-1\": \"Yes\",\n \"0-2\": \"String: **numbers.order**\",\n \"0-3\": \"n/a\",\n \"0-4\": \"Only accepts **numbers.order** to order numbers\",\n \"0-5\": \"Defines the API Call as \\\"Number Order\\\" type\",\n \"1-0\": \"access_key\",\n \"1-1\": \"Yes\",\n \"1-2\": \"String\",\n \"1-3\": \"n/a\",\n \"2-0\": \"secret_access_key\",\n \"2-1\": \"Yes\",\n \"2-2\": \"String\",\n \"2-3\": \"n/a\",\n \"1-4\": \"Access Key from the Key Manager within a DialogTech account\",\n \"1-5\": \"Credentials used for access to the API for a particular DialogTech account\",\n \"2-5\": \"Credentials used for access to the API for a particular DialogTech account\",\n \"2-4\": \"Secret Access Key from the Key Manager within a DialogTech account\",\n \"3-0\": \"type\",\n \"4-0\": \"search*\",\n \"3-1\": \"Yes\",\n \"3-2\": \"String: **local** or **tollfree** or **true800** or **canadian_local**\",\n \"4-2\": \"area code, or area code + exchange\",\n \"4-1\": \"Yes\",\n \"3-3\": \"n/a\",\n \"4-3\": \"6\",\n \"3-4\": \"**local** - Order a local number\\n**tollfree** - Order a toll free number\\n**true800** - Order a True 800 number\\n**canadian_local** - Order a Canadian Local number\",\n \"4-4\": \"If searching by area code it must be 3 digits and for NpaNxx it must be 6 digits. *Toll free numbers are not supported.*\",\n \"3-5\": \"Defines the type of number being ordered if available\",\n \"4-5\": \"Defines the pattern being searched for within inventory\",\n \"5-0\": \"quantity\",\n \"5-1\": \"Yes\",\n \"5-2\": \"String\",\n \"5-3\": \"**Range 0-25**\",\n \"5-4\": \"*Default: 10*\",\n \"5-5\": \"Amount of phone numbers to return if available\",\n \"6-0\": \"fill_quantity\",\n \"6-1\": \"Yes\",\n \"6-2\": \"**0** or **1**\",\n \"6-3\": \"n/a\",\n \"6-4\": \"**0** - Allow a partial order\\n**1** - Do not allow a partial order\",\n \"6-5\": \"Determines if a partial order is acceptable. If 5 numbers are requested, and only 3 are available, a **0** on this value will purchase those 3 numbers. **1** will purchase no numbers as not all 5 are available to fulfill the order.\",\n \"7-0\": \"cleansed_only\",\n \"7-1\": \"No\",\n \"7-2\": \"**0** or **1**\",\n \"7-3\": \"n/a\",\n \"7-4\": \"**0** - Acquire numbers which passed Carrier cleansing\\n**Note:** *DialogTech cleansed numbers are still preferred and acquired prior to acquiring numbers from a cleansed carrier inventory*\\n\\n**1** - Only acquire numbers which passed carrier cleansing and DialogTech cleansing **Note:** *This will reduce the size inventory which will be reviewed to fulfill your order*\",\n \"7-5\": \"Specifies if numbers which are acquired on the order only come from DialogTech's cleansed inventory rather than preferring DialogTech's cleansed inventory, and using a carrier cleansed inventory when the DialogTech inventory cannot fulfill your order.\",\n \"8-0\": \"distance\",\n \"8-1\": \"No\",\n \"8-2\": \"Number\",\n \"8-3\": \"n/a\",\n \"8-4\": \"Passing `0` will cause this parameter to be ignored.\",\n \"8-5\": \"Defines the distance in miles that a returned number's locality, based on zip code, can be from your original search criteria.\",\n \"9-0\": \"sms_supported\",\n \"9-1\": \"No\",\n \"9-2\": \"**0** or **1**\",\n \"9-3\": \"1\",\n \"9-4\": \"**0** - return any phone numbers matching search criteria, regardless of SMS support (default)\\n\\n**1** - return only phone numbers that can be enabled for SMS\",\n \"9-5\": \"Used to limit the phone number(s) returned to only those that support SMS.\\n\\nNote that phone numbers must still be explicitly registered to receive SMS messages using the [SMS APIs](https://apidocs.dialogtech.com/docs/sms-api-overview).\",\n \"10-0\": \"order_slot\",\n \"10-1\": \"No\",\n \"11-0\": \"allow_overlay\",\n \"11-1\": \"No\",\n \"10-2\": \"**0** or **1**\",\n \"10-3\": \"1\",\n \"10-4\": \"**0** - no slots will be ordered. Slot management is the responsibility of the user (default)\\n\\n**1** - when a number(s) order is fulfilled, a slot will be purchased for each number fulfilled.\",\n \"10-5\": \"If \\\"1\\\", slots will be ordered regardless if there are current slots available in the account\",\n \"11-2\": \"**0** or **1**\",\n \"11-3\": \"1\",\n \"11-4\": \"**0** - if the requested number criteria is not available, the request will fail (default)\\n\\n**1** - if the requested number criteria is not available, we will request a number overlay from the carrier\",\n \"11-5\": \"This is only supported for NPA-NXX searches\\n\\nNot supported for 'cleansed only' requests\"\n },\n \"cols\": 6,\n \"rows\": 12\n}\n[/block]\n*Required when `type=local` or when `type=canadian_local`\n[block:api-header]\n{\n \"title\": \"Using this API\"\n}\n[/block]\nThese code examples are meant to show a basic method of accessing DialogTech's IVR Report API.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"<?php\\n /*\\n Order Number EX:\\n This example will order from DialogTech's\\n inventory, 3 local numbers matching\\n the area code of 555.\\n */\\n\\n // Create cURL resource\\n $ch = curl_init(); \\n $baseuri = \\\"https://secure.dialogtech.com/ibp_api.php?\\\";\\n\\n // API Specific Static Parameters\\n $action = \\\"numbers.order\\\";\\n\\n // Required User Parameters To Request the API\\n $access_key = \\\"foo\\\";\\n $secret_access_key = \\\"bar\\\";\\n $type = \\\"local\\\";\\n $search = \\\"555\\\";\\n $quantity = \\\"3\\\";\\n $fill_quantity = \\\"1\\\";\\n\\n // Construct the full URL\\n $full_url = $baseuri . \\\"&action=\\\" . $action .\\n \\\"&access_key=\\\" . $access_key .\\n \\\"&secret_access_key=\\\" . $secret_access_key .\\n \\\"&type=\\\" . $type .\\n \\\"&search=\\\" . $search .\\n \\\"&quantity=\\\" . $quantity .\\n \\\"&fill_quantity=\\\" . $fill_quantity;\\n\\n\\n // Set the URL\\n curl_setopt($ch, CURLOPT_URL, $full_url);\\n\\n // Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n\\n // Sets the $output variable to the result of the curl\\n $output = curl_exec($ch);\\n\\n // Close curl resource to free up system resources\\n curl_close($ch);\\n\\n // Echo the XML response to the page\\n echo $output;\\n?>\",\n \"language\": \"text\",\n \"name\": \"PHP Example\"\n },\n {\n \"code\": \"curl -X \\\"\\\"\",\n \"language\": \"text\",\n \"name\": \"cURL\"\n }\n ]\n}\n[/block]\n**Example Response**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<!DOCTYPE response [\\n <!ELEMENT response (result,result_description)>\\n <!ELEMENT result (#PCDATA)>\\n <!ELEMENT result_description (#PCDATA)>\\n \\n ]>\\n<response>\\n<result>success</result>\\n<result_description>\\n <quantity>3</quantity>\\n <numbers>\\n <number>5551112222</number>\\n <number>5553334444</number>\\n <number>5556667777</number>\\n </numbers>\\n</result_description>\\n</response>\",\n \"language\": \"xml\",\n \"name\": \"xml\"\n }\n ]\n}\n[/block]","updates":[],"order":4,"isReference":false,"hidden":true,"sync_unique":"","link_url":"","link_external":false,"_id":"59082c040eeb150f00810a16","parentDoc":null,"user":"58cadf93d223510f005d27db","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["558d9c33beb7c719007f631d","558db0bc7afc102f008ed863","558db0d07afc102f008ed864","558db3c84cd25f0d00b7ecb2","558dbace7afc102f008ed894","558dbd104cd25f0d00b7ecca","558dbd4c4cd25f0d00b7eccb","559d3e858639bd21008e90a6","55bb8ca5a8400c2d00873e70","58fdfb438fbd2819000db9eb","590829c7ade4172d006a87b8","59082a11beedcf0f00235d87","5908bd2cba2afd23007d6d12","5908d1f64f544425002b6aae","591e5e9e2c1b1f0f000fa4e5","5a283434aba91f002834ea86","5a69fe5cde745d002c936c66","5a81e6ef761cf300127317f8","5a81e7d63b1e120012bed5a1","5f6cf225ba56a40011bff62d","5f970e8b7617eb041ae758bb","602adb88243fbc0056918566","602adbb91828a600535980c4"],"_id":"558d9c33beb7c719007f631c","createdAt":"2015-06-26T18:38:43.154Z","project":"558d9c32beb7c719007f6319","releaseDate":"2015-06-26T18:38:43.153Z","__v":23},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Administration APIs","slug":"administration-apis","order":1,"from_sync":false,"reference":false,"_id":"590829c7ade4172d006a87b8","createdAt":"2017-05-02T06:40:07.955Z","project":"558d9c32beb7c719007f6319","__v":0,"version":"558d9c33beb7c719007f631c"},"githubsync":"","__v":0,"project":"558d9c32beb7c719007f6319","createdAt":"2017-05-02T06:49:40.885Z"}
Number Order
Use the Number Order API to order available tracking numbers from DialogTech's inventory.
Base URL for Number Order
action
Yes
String: numbers.order
n/a
Only accepts numbers.order to order numbers
Defines the API Call as "Number Order" type
access_key
Yes
String
n/a
Access Key from the Key Manager within a DialogTech account
Credentials used for access to the API for a particular DialogTech account
secret_access_key
Yes
String
n/a
Secret Access Key from the Key Manager within a DialogTech account
Credentials used for access to the API for a particular DialogTech account
type
Yes
String: local or tollfree or true800 or canadian_local
n/a
local - Order a local number
tollfree - Order a toll free number
true800 - Order a True 800 number
canadian_local - Order a Canadian Local number
Defines the type of number being ordered if available
search*
Yes
area code, or area code + exchange
6
If searching by area code it must be 3 digits and for NpaNxx it must be 6 digits. Toll free numbers are not supported.
Defines the pattern being searched for within inventory
quantity
Yes
String
Range 0-25
Default: 10
Amount of phone numbers to return if available
fill_quantity
Yes
0 or 1
n/a
0 - Allow a partial order
1 - Do not allow a partial order
Determines if a partial order is acceptable. If 5 numbers are requested, and only 3 are available, a 0 on this value will purchase those 3 numbers. 1 will purchase no numbers as not all 5 are available to fulfill the order.
cleansed_only
No
0 or 1
n/a
0 - Acquire numbers which passed Carrier cleansing
Note: DialogTech cleansed numbers are still preferred and acquired prior to acquiring numbers from a cleansed carrier inventory
1 - Only acquire numbers which passed carrier cleansing and DialogTech cleansing Note: This will reduce the size inventory which will be reviewed to fulfill your order
Specifies if numbers which are acquired on the order only come from DialogTech's cleansed inventory rather than preferring DialogTech's cleansed inventory, and using a carrier cleansed inventory when the DialogTech inventory cannot fulfill your order.
distance
No
Number
n/a
Passing 0
will cause this parameter to be ignored.
Defines the distance in miles that a returned number's locality, based on zip code, can be from your original search criteria.
sms_supported
No
0 or 1
1
0 - return any phone numbers matching search criteria, regardless of SMS support (default)
1 - return only phone numbers that can be enabled for SMS
Used to limit the phone number(s) returned to only those that support SMS.
Note that phone numbers must still be explicitly registered to receive SMS messages using the SMS APIs.
order_slot
No
0 or 1
1
0 - no slots will be ordered. Slot management is the responsibility of the user (default)
1 - when a number(s) order is fulfilled, a slot will be purchased for each number fulfilled.
If "1", slots will be ordered regardless if there are current slots available in the account
allow_overlay
No
0 or 1
1
0 - if the requested number criteria is not available, the request will fail (default)
1 - if the requested number criteria is not available, we will request a number overlay from the carrier
This is only supported for NPA-NXX searches
Not supported for 'cleansed only' requests
*Required when type=local
or when type=canadian_local
These code examples are meant to show a basic method of accessing DialogTech's IVR Report API.
<?php
/*
Order Number EX:
This example will order from DialogTech's
inventory, 3 local numbers matching
the area code of 555.
*/
// Create cURL resource
$ch = curl_init();
$baseuri = "https://secure.dialogtech.com/ibp_api.php?";
// API Specific Static Parameters
$action = "numbers.order";
// Required User Parameters To Request the API
$access_key = "foo";
$secret_access_key = "bar";
$type = "local";
$search = "555";
$quantity = "3";
$fill_quantity = "1";
// Construct the full URL
$full_url = $baseuri . "&action=" . $action .
"&access_key=" . $access_key .
"&secret_access_key=" . $secret_access_key .
"&type=" . $type .
"&search=" . $search .
"&quantity=" . $quantity .
"&fill_quantity=" . $fill_quantity;
// Set the URL
curl_setopt($ch, CURLOPT_URL, $full_url);
// Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Sets the $output variable to the result of the curl
$output = curl_exec($ch);
// Close curl resource to free up system resources
curl_close($ch);
// Echo the XML response to the page
echo $output;
?>
curl -X ""
Example Response
<response>
<result>success</result>
<result_description>
<quantity>3</quantity>
<numbers>
<number>5551112222</number>
<number>5553334444</number>
<number>5556667777</number>
</numbers>
</result_description>
</response>