API to order available tracking numbers
Use the Number Order API to order available tracking numbers
Use the Number Order API to order available tracking numbers from DialogTech's inventory.
Base URL for Number Order
Parameter List
Parameter | Required | Accepts | Max Length | Notes | Usage |
---|---|---|---|---|---|
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
Using this API
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE response [
<!ELEMENT response (result,result_description)>
<!ELEMENT result (#PCDATA)>
<!ELEMENT result_description (#PCDATA)>
]>
<response>
<result>success</result>
<result_description>
<quantity>3</quantity>
<numbers>
<number>5551112222</number>
<number>5553334444</number>
<number>5556667777</number>
</numbers>
</result_description>
</response>