Customers

Table of Contents

Overview

This is where you manage all of your customer accounts.

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

Functions

/create

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

Arguments:

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

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

/list

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

Arguments:

Info: Get a list of all of your customers.

Example Success
{
    "code": 200,
    "status": "success",
    "data": [
        {
            "id": 42,
            "reseller_id": 33,
            "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",
            "reseller_id": 33,
            "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
{
    "code": 200,
    "status": "success",
    "data": []
}

/update

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

Arguments:

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

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

/enable

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

Arugments:

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

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

/disable

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

Arguments:

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

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

/rates

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

Agurments:

Info: Get a specified customer'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 customer id"
}

/fund

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

Arguments:

Info: This call will allocate a given number of dollars to the customer's account.

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully allocated funds"
}