Listing States

This function will allow you to list all states available for ordering numbers.

Post/ Get Information

URL:

https://apiv1.teleapi.net/dids/ratecenters?token=XXXXXXX

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/CURL

curl -v -X GET  "https://apiv1.teleapi.net/dids/ratecenters?token=XXXX&state=CA"

Using PHP+CURL

<?php

$baseurl = "https://apiv1.teleapi.net/dids/states?token=XXXX&state=CA";
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
$url = "https://apiv1.teleapi.net/dids/states?token=XXXX&state=CA";
$x = file_get_contents($url);
$object = json_decode($x);
print_r($object);

Successful Ratecenter Listing

{
    "code": 200,
    "status": "success",
    "data": ["AGUILAR","AKRON","ALAMOSA","ALLISON","ALLNSPKLYN","ANTON","ANTONITO","ASPEN","AURORA"]
}

Failed Ratecenter Listing

{
    "code": 400,
    "status": "error",
    "data": "Missing variable: state"
}

results matching ""

    No results matching ""