Dids

Table of Contents

Overview

The dids controller is anything you might want to do with our phone numbers. The ones you haven't purchased yet. But you will purchase, right? Yeah, those. It is where you can get a list of our available numbers, search for available ratecenters, etc.

Controller: /dids
Full Url: https://apiv1.teleapi.net/dids/

Functions

/states

Full Url: https://apiv1.teleapi.net/dids/states

Arguments:

Info: Get a list of available states

Example Success
{
    "code": 200,
    "status": "success",
    "data": {
        "AB":"Alberta",
        "AK":"Alaska",
        "AL":"Alabama",
        "AR":"Arkansas",
        "AZ":"Arizona",
        ...
    }
}

Example Error

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

/ratecenters

Full Url: https://apiv1.teleapi.net/dids/ratecenters

Arguments:

Info: Get a list of ratecenters by state

Example Success
{
    "code": 200,
    "status": "success",
    "data": ["AGUILAR","AKRON","ALAMOSA","ALLISON","ALLNSPKLYN","ANTON","ANTONITO","ASPEN","AURORA",...]
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Missing variable: state"
}

/list

Full Url: https://apiv1.teleapi.net/dids/list

Arguments:

Info: Get a list of phone numbers based on parameters passed

Example Success

{
    "code": 200,
    "status": "success",
    "data": [
        {
            "id": 222,
            "npa": 555,
            "nxx": 555,
            "xxxx": 5555,
            "number": 5555555555,
            "ratecenter": "BLARG",
            "state": "CO"
        },
        {
            "id": 333,
            "npa": 555,
            "nxx": 555,
            "xxxx": 5554,
            "number": 5555555554,
            "ratecenter": "BLARG",
            "state": "CO"
        }
    ]
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Missing variable: token"
}

/tollfree/vanity

Full Url: https://apiv1.teleapi.net/dids/tollfree/vanity

Arguments:

Info: Search for a vanity tollfree number. Please note, the search must be 10 digits. For instance, to search for WONKA at the end of a tollfree number, your search parameter would be *****WONKA. Additionally, ordering vanity tollfree does not work with the direct order function. You must use the shopping cart.

/backorder/count

Full Url: https://apiv1.teleapi.net/dids/backorder/count

Arguments:

Info: Get a count of how many numbers you have on backorder for a state/ratecenter combination

Example Success
{
    "code": 200,
    "status": "success",
    "data": 42
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Missing variable: state"
}

/cart

Full Url: https://apiv1.teleapi.net/dids/cart

Arguments:

Info: Pass in the number you want and it will add it to your shopping cart. Optionally, you can mark it as a fax number by passing in fax=true. To order a vanity tollfree number, supply the field vanity_tf=yes, otherwise it will assume that it is not a vanity tollfree number.

/order

Full Url: https://apiv1.teleapi.net/dids/order

Arguments:

Info: If, like James, you don't like the idea of a shopping cart and don't care if you have way too many invoices, use this. One API call, one number. Simple as that. Note that the optional fax=true overrides call flow, channel group, cnam and voicemail inbox. Otherwise, pass those in and it'll set it immediately

/backorder/cart

Full Url: https://apiv1.teleapi.net/dids/backorder/cart

Arguments:

Info: Add a backorder for a state/ratecenter.