Resellers

Table of Contents

Overview

This is where you manage all of your reseller accounts.

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

Functions

/create

Full Url: https://apiv1.teleapi.net/resellers/create

Arguments:

Info: Create a reseller, what more is there to say?

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully created reseller"
}
Example Error
{
    "code": 500,
    "status": "error",
    "data": "Could not create reseller"
}

Another crappy error. They will get better. More //TODOs

/list

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

Arguments:

Info: Get a list of all of your resellers.

Example Success
{
    "code": 200,
    "status": "success",
    "data": [
        {
            "id": 42,
            "username": "bobby",
            "email": "bobby@example.com",
            "first_name": "Bobby",
            "last_name": "McFrobby",
            "phone_number": 5555555555,
            "address": "321 Some Street",
            "city": "Denver",
            "state": "CO",
            "zip": "80112",
            "brand": null,
            "domain": null,
            "custom_css": 0,
            "custom_logo": 0,
            "user_statu": "inactive-no-funds",
            "create_dt": "2016-02-02 05:23:55",
            "modify_dt": "2016-02-02 05:23:55"
        },
        {
            "id": "55",
            "username": "ralph",
            "email": "ralph@example.com",
            "first_name": "Ralph",
            "last_name": "Dingo",
            "phone_number": "5555555554",
            "address" "321 Some Street",
            "city": "Englewood",
            "state": "CO",
            "zip": "80112",
            "brand": "Monkeys Telecom",
            "domain": "monkeys",
            "custom_css": 1,
            "custom_logo": 1,
            "user_status": "active",
            "create_dt": "2016-02-02 05:23:55",
            "modify_dt": "2016-02-02 05:23:55"
        }
    ]
}
Example Error

About the closest thing you should ever see to an error here is if you have no resellers

{
    "code": 200,
    "status": "success",
    "data": []
}

Not much of an error, I know. But this one is hard to break. Really.

/update

Full Url: https://apiv1.teleapi.net/resellers/update

Arguments:

Info: Get reseller_id from /list. Everything is optional except reseller_id. Send as much or as little as you want.

Example Success
{
    "code": 200,
    "status": "success",
    "data": "successfully updated reseller"
}
Example Error
{
    "code": "500",
    "status": "error",
    "data": "Could not update reseller"
}

/enable

Full Url: https://apiv1.teleapi.net/resellers/enable

Arugments:

Info: You can only enable resellers that have a user_status of "inactive-disabled"

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully enabled reseller"
}
Example Error
{
    "code": 200,
    "status": "success",
    "data": "Reseller was already active"
}

So it's not really an error, but it works.

/disable

Full Url: https://apiv1.teleapi.net/resellers/disable

Arguments:

Info: You can only disable resellers that have a user_status of "active". Otherwise, though, they're kind of already inactive..

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully disabled reseller"
}
Example Error
{
    "code": 200,
    "status": "error",
    "data": "Invalid reseller id"
}

/rates

Full Url: https://apiv1.teleapi.net/resellers/rates

Agurments:

Info: Get a specified reseller's rates

Example Success
{
    "code" 200,
    "status": "success",
    "data": {
        "standard_local_mrc": "1.500000",
        "standard_local_nrc": "1.500000",
        "standard_local_pm": "0.001500",
        "standard_tollfree_mrc": "1.500000",
        "standard_tollfree_nrc": "1.500000",
        "standard_tollfree_pm": "0.001500",
        "standard_backorder_nrc": "0.0000000",
        "channel_group_channel_mrc": "18.000000",
        "port_fee": "0.000000"
    }
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid reseller id"
}

/fund

Full Url: https://apiv1.teleapi.net/resellers/fund

Arguments:

Info: This call will allocate a given number of dollars to the resellers "account"

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully allocated funds"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "The amount you are attempting to allocate is larger than the amount you have available"
}