CLIENT FUNCTIONS
The following table explains the additional parameters needed by the Client Functions and provides an example of their output when status is 'success'.
| addCharge | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115)
charge => [Required] Amount of money that will be Debited from the customer (Example: 4.99)
description => Charge Description
test => Set to true if testing how adding charges works
|
| Output |
Array
(
[status] => success
)
|
| addPayment | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115)
payment => [Required] Amount of money that will be Credited to the customer (Example: 4.99)
description => Payment Description
test => Set to true if testing how adding payments works
|
| Output |
Array
(
[status] => success
)
|
| getBalanceManagement | |
| Parameters |
balance_management => Code for a specific Balance Management Setting (Example: 1) |
| Output |
Array
(
[status] => success
[balance_management] => Array
(
[0] => Array
(
[value] => 1
[description] => Hard - suspend the client
)
)
)
|
| getCharges | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115) |
| Output |
Array
(
[status] => success
[charges] => Array
(
[0] => Array
(
[id] => 475568
[date] => 2010-10-29
[amount] => 2.00
[description] => DID5551234567
)
[1] => Array
(
[id] => 475567
[date] => 2010-10-29
[amount] => 1.00
[description] => SETUP5551234567
)
[3] => Array
(
[id] => 467988
[date] => 2010-09-15
[amount] => 3.00
[description] => SETUPPACKAGE:8378
)
)
)
|
| getClientPackages | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115) |
| Output |
Array
(
[status] => success
[packages] => Array
(
[0] => Array
(
[value] => 8378
[description] => VoIP
)
)
)
|
| getClients | |
| Parameters |
client => Parameter could have the following values:
* Empty Value [Not Required]
* Specific Reseller Client ID (Example: 561115)
* Specific Reseller Client e-mail (Example: 'john.doe@mydomain.com')
|
| Output |
Array
(
[status] => success
[clients] => Array
(
[0] => Array
(
[client] => 561115
[email] => john.doe@my-domain.com
[password] => johnspassword
[company] => Consulting
[firstname] => John
[lastname] => Doe
[address] => 5491 190TH
[city] => OPA LOCKA
[state] => FLORIDA
[country] => UNITED STATES
[zip] => 33055
[phone_number] => 5551112222
[balance_management] => 1
)
)
)
|
| getClientThreshold | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115) |
| Output |
Array
(
[status] => success
[threshold_information] => Array
(
[threshold] => 130
[email] => john.doe@my-domain.com
)
)
|
| getDeposits | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115) |
| Output |
Array
(
[status] => success
[deposits] => Array
(
[0] => Array
(
[id] => 808639
[date] => 2010-10-15
[amount] => 4.00
[description] => Credit : 2 Setup Charges
)
[1] => Array
(
[id] => 808384
[date] => 2010-11-30
[amount] => 10.00
[description] => Want To Keep Positive Balance
)
)
)
|
| getPackages | |
| Parameters |
package => Code for a specific Package (Example: 8378) |
| Output |
Array
(
[status] => success
[packages] => Array
(
[0] => Array
(
[package] => 8378
[name] => VoIP
[markup_fixed] => 0.01
[markup_percentage] => 50
[pulse] => 60
[international_route] => 1
[canada_route] => 1
[monthly_fee] => 2.00
[setup_fee] => 1.00
[free_minutes] => 0
)
)
)
|
| getResellerBalance | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115) |
| Output |
Array
(
[status] => success
[balance] => Array
(
[current_balance] => 8.0588
[spent_total] => 1.9012
[calls_total] => 56
[time_total] => 51:35
[spent_today] => 0.045
[calls_today] => 2
[time_today] => 2:50
)
)
|
| setClient | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115)
email => [Required] Client's e-mail
password => [Required] Client's Password
company => Client's Company
firstname => [Required] Client's Firstname
lastname => [Required] Client's Lastname
address => Client's Address
city => Client's City
state => Client's State
country => Client's Country (Values from getCountries)
zip => Client's Zip Code
phone_number => [Required] Client's Phone Number
balance_management => Balance Management for Client
(Values from getBalanceManagement)
|
| Output |
Array
(
[status] => success
)
|
| setClientThreshold | |
| Parameters |
client => [Required] ID for a specific Reseller Client (Example: 561115)
threshold => [Required] Threshold amount between 1 and 250 (Example: 10)
email => Client's e-mail for balance threshold notification
|
| Output |
Array
(
[status] => success
)
|
| signupClient | |
| Parameters |
firstname => [Required] Client's Firstname
lastname => [Required] Client's Lastname
company => Client's Company
address => [Required] Client's Address
city => [Required] Client's City
state => [Required] Client's State
country => [Required] Client's Country (Values from getCountries)
zip => [Required] Client's Zip Code
phone_number => [Required] Client's Phone Number
email => [Required] Client's e-mail
confirm_email => [Required] Client's Confirmation e-mail
password => [Required] Client's Password
confirm_password => [Required] Client's Confirmation Password
activate => Activates Client (Boolean: 1/0)
balance_management => Balance Management for Client
(Values from getBalanceManagement)
|
| Output |
Array
(
[status] => success
)
|