Restricted Users

Table of Contents

Overview

This is where you manage all of your restricted user accounts.

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

Functions

/create

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

Arguments:

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

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

/list

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

Arguments:

Info: Get a list of all of your restrited users.

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/rusers/update

Arguments:

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

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

/enable

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

Arugments:

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

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

/disable

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

Arguments:

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

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

/rates

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

Agurments:

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

/fund

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

Arguments:

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

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

/groups/available

Full Url: https://apiv1.teleapi.net/rusers/groups/available

Arguments:

Info: List the permission groups that are available to you to assign to a restricted user

/groups/list

Full Url: https://apiv1.teleapi.net/rusers/groups/list

Arguments:

Info: List all the permission groups that are assigned to a specific restricted user

/groups/set

Full Url: https://apiv1.teleapi.net/rusers/groups/set

Arguments:

Info: Add or remove a permission group from a restricted user. Passing in enabled=yes will add that group, passing in enabled=no will disabled it