Overview
Telecom Lookup Tools
Powered By GitBook
List Ratecenters
This function will allow you to list all states available for ordering numbers.

Post/ Get Information

URL:
Argument
Required
Type
state
yes
string
Simply send us a GET/POST to the above URL to get an API response with the list of ratecenters, just pass state=[abbreviated_state]. Response codes are in the menu to the left.
shell
PHP+CURL
PHP+PLAIN
RESPONSE
Shell/CURL
1
curl -v -X GET "https://apiv1.teleapi.net/dids/ratecenters?token=XXXX&state=CA"
Copied!
Using PHP+CURL
1
<?php
2
โ€‹
3
$baseurl = "https://apiv1.teleapi.net/dids/states?token=XXXX&state=CA";
4
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
5
$retval = curl_exec($ch);
6
curl_close($ch);
7
โ€‹
8
$object = json_decode($retval);
9
print_r($object);
Copied!
PHP - file_get_contents
1
<?php
2
$url = "https://apiv1.teleapi.net/dids/states?token=XXXX&state=CA";
3
$x = file_get_contents($url);
4
$object = json_decode($x);
5
print_r($object);
Copied!

Successful Ratecenter Listing

1
{
2
"code": 200,
3
"status": "success",
4
"data": ["AGUILAR","AKRON","ALAMOSA","ALLISON","ALLNSPKLYN","ANTON","ANTONITO","ASPEN","AURORA"]
5
}
Copied!

Failed Ratecenter Listing

1
{
2
"code": 400,
3
"status": "error",
4
"data": "Missing variable: state"
5
}
Copied!
Last modified 1yr ago
Copy link