Tollfree Vanity Order

This allows you to order a vanity toll free number, after you have searched and learned that it is available.

Get / Post Information

URL:
Argument
Required
Type
Example
did_number
yes
int
3035551212
vanity_tf
no
string
yes
Note, after calling this function, you will need to do a "Cart - Complete" which is located here
shell
PHP+CURL
PHP+PLAIN
RESPONSE
Shell/CURL
curl -v -X GET "https://apiv1.teleapi.net/dids/cart?token=XXXX&did_number=3035551212&vanity_tf=yes"
Using PHP+CURL
<?php
$data = array("did_number" => "3035551212",
"vanity_tf" => "yes"
);
$data = http_build_query($data);
$baseurl = "https://apiv1.teleapi.net/dids/cart?token=XXXX&".$data;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$retval = curl_exec($ch);
curl_close($ch);
$object = json_decode($retval);
print_r($object);
PHP - file_get_contents
<?php
$data = array("did_number" => "3035551212",
"vanity_tf" => "yes"
);
$data = http_build_query($data);
$url = "https://apiv1.teleapi.net/dids/cart?token=XXXX&".$data;
$x = file_get_contents($url);
$object = json_decode($x);
print_r($object);

Successful Addition to Cart

{
"code":200,
"status":"success",
"data":"successfully added item to cart"
}

Failed Adding (Number not Available)

{
"code": 400,
"status": "error",
"data": "invalid did id"
}