General Information Example: API Usage Guide
General Information Example: API Usage Guide
General Information Example: API Usage Guide
TABLE OF CONTENTS
A.2 EXAMPLE
https://url/api/v1/get_users
A.3 CREDENTIALS
To add an user send a post request to /api/v1/add_user with the following data :
To add an user send a post request to /api/v1/add_user with the following data :
To edit an user send a post request to /api/v1/add_user with the following data :
To edit an user send a post request to /api/v1/add_user with the following data :
GET Method :
/api/v1/get_users
{
"status": "success",
"data": [
[
{
"User": {
"id": "3071",
"username": "samandrew",
"groupId": "90",
"status": "active",
"name": "Sam",
"phone": "9999999999",
"email": "sam@example.com",
"address": "",
"comments": "",
"activationTime": "2014-11-10 13:34:00",
"expirationTime": "2018-11-10 13:34:00"
}
},
{
"staticIpMac": [
{
"staticIpAddress": "10.0.0.10",
"staticIpBoundMac": "64:27:37:af:e3:4d"
},
{
"staticIpAddress": "10.0.0.12",
"staticIpBoundMac": "64:27:37:af:e3:4E"
}
API Usage Guide API-Document Page 10 of 68
]
}
]
]
}
API Usage Guide API-Document Page 11 of 68
GET Method :
/api/v1/get_details/<user_id>
"status":"success",
"data":[
"User":{
"id":"17766",
"username":"31508205064",
"groupId":"635",
"status":"terminated",
"name":"john",
"phone":"9999999999",
"email":"john@gmai.com",
"address":"",
"activationTime":"2015-03-06 19:27:58",
''createdTime'':''2016-04-18 00:00:00'',
"expirationTime":"2016-03-06 00:00:30",
API Usage Guide API-Document Page 12 of 68
"timezone":"Asia/Kolkata"
},
"currentBillingCycleUsage":{
"bandwidthTemplateId":"11",
"bandwidthTemplateName":"4048/4048",
"billingStartDate":"2015-06-07 00:00:00",
"billingEndDate":"2015-07-07 00:00:00",
"uploadDataUsage":"0",
"downloadDataUsage":"0",
"totalDataUsage":0,
"dataLimit":"104857600"
},
"staticIpMac":[
}
API Usage Guide API-Document Page 13 of 68
[download_rate] => 0
[upload_rate] => 0
API Usage Guide API-Document Page 14 of 68
[terminate_cause]=>'Disconnected by admin'
)
API Usage Guide API-Document Page 15 of 68
GET Method :
/api/v1/get_balance/<user_id>
{
"status": “success”,
“balance”:”146.67”,
“username”:”test1234”
}
API Usage Guide API-Document Page 16 of 68
Key Value
userId Numeric <Id of the user to make payment>
amount Numeric <amount to be paid in decimal>
(cash, cheque, creditCard, bankTransfer,
method
onlinePayment, debitCard, externalGateway)
paymentDate dd-mm-yyyy
bank Text, <for method cheque else null>
chequeNumber Text, <for method cheque else null>
chequeDate dd-mm-yyyy, <for method cheque else null>
notes Payment notes
cardExpiration Text, <Credit / debit card number>
bankTransferMethod Text, <Bank transfer method>
operator Text, <External gateway operator>
merchantTxnId Text, <External gateway transaction Id>
{
"status": “success”,
“message”:”Make payment successful”
}
API Usage Guide API-Document Page 17 of 68
GET Method :
/api/v1/get_usersession_details/<user_id> with the following data:
Input:
Argument Value
userId Numeric <Id of the user>
{
“session details as json encoded”
}
API Usage Guide API-Document Page 18 of 68
GET Method :
/api/v1/change_billing_cycle/<user_id> with the following data:
GET Method :
/api/v1/change_billing_cycle/<user_id>/<billing_period> with the following data:
Input:
Argument Value
userId Numeric <Id of the user>
billingPeriod Text <monthly, weekly, daily>
{
"status":“success”,
“message”:”billing cycle updated”
}
API Usage Guide API-Document Page 19 of 68
To add FUP quota to user send a post request to /api/v1/add_fup_quota with the following data:
Key Value
userId Numeric <Id of the user to be edited>
quota Numeric <value in bytes>
{
"status" : “success”,
“message” : ”FUP quota added successfullly”
}
API Usage Guide API-Document Page 20 of 68
GET Method:
/api/v1/user_exists/<user_id>
{
"status": 1
}
API Usage Guide API-Document Page 21 of 68
GET Method:
/api/v1/user_exists_by_username/<user_name>
{
"status": 0
}
API Usage Guide API-Document Page 22 of 68
Key Value
userId Numeric <Id of the user >
resetType Text <monthly, weekly, daily>
startDate dd-mm-yyyy
[
{
"0":{
},
"endDate":"01-10-2015",
"startDate":"01-09-2015"
},
"0":{
},
"endDate":"01-09-2015",
"startDate":"01-08-2015"
}
]
API Usage Guide API-Document Page 23 of 68
Key Value
userId Numeric <Id of the user >
resetType Text <monthly, weekly, daily>
startDate dd-mm-yyyy
"0":{
"download":"43.12 GB",
"upload":"16.28 GB",
"total":"59.4 GB"
},
"endDate":"06-10-2015",
"startDate":"06-09-2015"
},
"0":{
"download":"24.75 GB",
"upload":"3.64 GB",
API Usage Guide API-Document Page 24 of 68
"total":"28.39 GB"
},
"endDate":"06-09-2015",
"startDate":"06-08-2015"
},
"0":{
"download":"1.49 GB",
"upload":"1.05 GB",
"total":"2.54 GB"
},
"endDate":"06-08-2015",
"startDate":"06-07-2015"
]
API Usage Guide API-Document Page 25 of 68
"status":"success",
"password":"8515550701"
}
API Usage Guide API-Document Page 26 of 68
GET Method:
/api/v1/send_password/<user_id>/<method>/<template>
Input:
Argument Value
userId Numeric <Id of the user>
Text {sms}
method
<default value is 'sms'>
Text {otp, user_receipt}
template
<default value is 'otp'>
"status":"success",
"message":"Password is sent"
}
API Usage Guide API-Document Page 27 of 68
GET Method :
/api/v1/get_all_payment_ids/<fromDate>/<toDate> with the following data:
Input :
Argument Value
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
Sample Output :
{
"300":300,
"301":301,
"302":302,
"400":400,
"401":401,
"600":600,
"303":303
}
API Usage Guide API-Document Page 29 of 68
GET Method :
/api/v1/get_payment_details/<userId> with the following data:
Input :
Argument Value
userId Numeric <Id of the user>
Sample Output :
{ "customerNumber":"2"
}
{ "Payment":
{ "id":7400,
"amount":"50.0000000000",
"create_datetime":"2016-03-23 12:06:03.156+05:30"
}},
{ "PaymentInvoice":
{ "payment_id":7400,
"invoice_id":14700
}},
{ "PaymentInfoCheque":
{ "payment_id":7400,
"bank":"Cash"
}}
API Usage Guide API-Document Page 30 of 68
GET Method :
/api/v1/get_payment_details_by_date/<fromDate>/<toDate> with the following data:
Input :
Argument Value
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
Sample Output :
[[{
"customer_number":"1",
"user_id":"1",
"payment_id":200,
"amount":"115.0000000000",
"payment_date":"2016-09-08 19:23:04.693+05:30",
"invoices":
[{
"invoice_id":100
}],
"payment_type":"Payment gateway"
}]]
API Usage Guide API-Document Page 31 of 68
GET Method :
/api/v1/get_payment_details_by_userid_and_date/<userId>/<fromDate>/<toDate> with the
following data:
Input :
Argument Value
userId Numeric <Id of the user>
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
Sample Output :
{ "customerNumber":"2"
}
{ "Payment":
{ "id":7400,
"amount":"50.0000000000",
"create_datetime":"2016-03-23 12:06:03.156+05:30"
}},
{ "PaymentInvoice":
{ "payment_id":7400,
"invoice_id":14700
}},
{ "PaymentInfoCheque":
{ "payment_id":7400,
"bank":"Cash"
}}
API Usage Guide API-Document Page 32 of 68
GET Method :
/api/v1/get_payment_logs/<userId> with the following data:
Input :
Argument Value
userId Numeric <Id of the user>
Sample Output :
Note: This is a sample transaction, may differ based on the external payment gateway which user
chooses.
{ "ExternalPayment":{
"merchantTxnId":"56eddfdf3355d71458219261",
"gateway_txn_id":"2534341604",
"details":"{\u0022txn_status\u0022:\u00220300\u0022,\u0022txn_msg\u002
2:\u0022success\u0022,\u0022txn_err_msg\u0022:\u0022NA\u0022,\u0022clnt_tx
n_ref\u0022:\u002256easdqq55d71458219261\u0022,\u0022tpsl_bank_cd\u0022:\
u00221110\u0022,\u0022tpsl_txn_id\u0022:\u0022333321604\u0022,\u0022txn_a
mt\u0022:\u00221.01\u0022,\u0022clnt_rqst_meta\u0022:\u0022{itc:email}
{custname:user_name}\u0022,\u0022tpsl_txn_time\u0022:\u002217-03-2016
18:24:28\u0022,\u0022tpsl_rfnd_id\u0022:\u0022NA\u0022,\u0022bal_amt\u0022
:\u0022NA\u0022,\u0022rqst_token\u0022:\u002254849facd9-0917-43fa-b37a-
74543a361007\u0022,\u0022hash\u0022:\u0022f112a87af8544a662a3b77abeb132
e96e65bd228\u0022}",
"number":"INR",
"operator":"techprocess-pay"
}}
API Usage Guide API-Document Page 33 of 68
GET Method :
/api/v1/get_payment_logs_by_date/<fromDate>/<toDate> with the following data:
Input :
Argument Value
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
Sample Output :
Note: This is a sample transaction, may differ based on the external payment gateway which user
chooses.
{ "ExternalPayment":{
"merchantTxnId":"56eddfdf3355d71458219261",
"gateway_txn_id":"2534341604",
"details":"{\u0022txn_status\u0022:\u00220300\u0022,\u0022txn_msg\u002
2:\u0022success\u0022,\u0022txn_err_msg\u0022:\u0022NA\u0022,\u0022clnt_tx
n_ref\u0022:\u002256easdqq55d71458219261\u0022,\u0022tpsl_bank_cd\u0022:\
u00221110\u0022,\u0022tpsl_txn_id\u0022:\u0022333321604\u0022,\u0022txn_a
mt\u0022:\u00221.01\u0022,\u0022clnt_rqst_meta\u0022:\u0022{itc:email}
{custname:user_name}\u0022,\u0022tpsl_txn_time\u0022:\u002217-03-2016
18:24:28\u0022,\u0022tpsl_rfnd_id\u0022:\u0022NA\u0022,\u0022bal_amt\u0022
:\u0022NA\u0022,\u0022rqst_token\u0022:\u002254849facd9-0917-43fa-b37a-
74543a361007\u0022,\u0022hash\u0022:\u0022f112a87af8544a662a3b77abeb132
e96e65bd228\u0022}",
"number":"INR",
"operator":"techprocess-pay"
}}
API Usage Guide API-Document Page 34 of 68
GET Method :
/api/v1/get_payment_logs_by_userid_and_date/<userId>/<fromDate>/<toDate> with the
following data:
Input :
Argument Value
userId Numeric <Id of the user>
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
Sample Output :
Note: This is a sample transaction, may differ based on the external payment gateway which user
chooses.
{ "ExternalPayment":{
"merchantTxnId":"56eddfdf3355d71458219261",
"gateway_txn_id":"2534341604",
"details":"{\u0022txn_status\u0022:\u00220300\u0022,\u0022txn_msg\u002
2:\u0022success\u0022,\u0022txn_err_msg\u0022:\u0022NA\u0022,\u0022clnt_tx
n_ref\u0022:\u002256easdqq55d71458219261\u0022,\u0022tpsl_bank_cd\u0022:\
u00221110\u0022,\u0022tpsl_txn_id\u0022:\u0022333321604\u0022,\u0022txn_a
mt\u0022:\u00221.01\u0022,\u0022clnt_rqst_meta\u0022:\u0022{itc:email}
{custname:user_name}\u0022,\u0022tpsl_txn_time\u0022:\u002217-03-2016
18:24:28\u0022,\u0022tpsl_rfnd_id\u0022:\u0022NA\u0022,\u0022bal_amt\u0022
:\u0022NA\u0022,\u0022rqst_token\u0022:\u002254849facd9-0917-43fa-b37a-
74543a361007\u0022,\u0022hash\u0022:\u0022f112a87af8544a662a3b77abeb132
e96e65bd228\u0022}",
"number":"INR",
"operator":"techprocess-pay"
}}
API Usage Guide API-Document Page 35 of 68
GET Method :
/api/v1/get_all_invoice_ids/<fromDate>/<toDate> /<status>with the following data:
Input :
Argument Value
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
Status (Optional) String Keyword <“paid”, “unpaid”>
Sample Output :
{
"12960":12960,
"12961":12961,
"12855":12855
}
API Usage Guide API-Document Page 36 of 68
GET Method :
/api/v1/get_invoice_details/<invoiceId> with the following data:
Input :
Argument Value
invoiceId Numeric <Id of the invoice>
Sample Output :
[{
"invoiceNumber":"10",
"amount":"16.6666666665",
"billGeneratedDate":"2016-09-26 00:00:00+05:30",
"detailsOfInvoice": [ "", {
"amount": "799.00",
"description": "799 metro plus - Period from 01 Oct 2015 to 31 Oct 2015" }, {
"amount": "111.86",
"name":"",
"user_id":"8",
"circuit_id":"8",
"billingPeriodFrom":"2016-09-26",
"billingPeriodTo":"2016-09-30",
"billingDueDate":"2016-10-10"
}]
API Usage Guide API-Document Page 37 of 68
POST Method :
To get the renew default settings, send a post request to
/api/v1/renew_default_settings with the following data:
Input :
Argument Value
userBillingId Numeric <Billing Id of the user>
Sample Output :
{"amount":"114.50"},
{"oneClickRenew":1,
"renewFromPresentDate":1,
"renewForPaidUsers":1,
"payAsYouGoDays":"2",
"disableRenewWithDays":1}
]
API Usage Guide API-Document Page 38 of 68
U.2 RENEW
POST Method :
To renew a user, send a post request to
/api/v1/renew with the following data:
Input :
Argument Value
userId Numeric <Id of the user>
Additional Inputs :
Argument Value
renewDefaultSettings String < with a keyword “true”>
isForceMakePayment String < with a keyword “true”>
isRenewPresentDate String < with a keyword “true”>
isRenewPaidUsers String < with a keyword “true”>
isRenewWithDays String < with a keyword “true”>
payAsYouGoDays Numeric <Number of days to renew>
isChangePlan String < with a keyword “true”>
planId Numeric <Plan Id of the plan>
groupId Numeric <Group Id of the group>
isPreviousGroupchange String < with a keyword “true”>
renewPeriod String < “days” or “months” >
renewTimes Numeric <Number of times to renew>
String < with a keyword (cash, cheque,
creditCard, bankTransfer,
paymentType
Sample Output :
GET Method :
/api/v1/get_all
Sample Output :
{"User":
{"id":"1","username":"testuser","groupId":"5","status":"active","name":"","phone"
:"","email":"","address_line1":"","address_line2":"","address_city":"","address_pin
":"","address_state":"","comments":"","activationTime":"2016-06-29
19:21:27","expirationTime":"2016-08-24
00:00:00","billing_id":"112","type":"","modified":"2016-06-29
19:21:32","company_name":"jaze_networks"}},{"currentBillingCycleUsage":
{"billingResetType":"payAsYouGo","billingStartDate":"2016-08-04
00:00:00","billingEndDate":"2016-08-24
00:00:00","uploadDataUsage":"0","downloadDataUsage":"0","totalDataUsage":0,"
usedBandwidthQuota":0,"totalBandwidthQuota":0}},{"staticIpMac":[]}
API Usage Guide API-Document Page 41 of 68
GET Method :
/api/v1/get_group_details
Sample Output :
{"status":"success","data":
[{"Group_id":"3","Group_name":"Guest","Profile_id":"3","Profile_Name":"Guest
profile","Active_Users":0,"Total_Users":0},
{"Group_id":"5","Group_name":"General 1Mbps
Group","Profile_id":"5","Profile_Name":"General 1Mbps
Profile","Active_Users":7,"Total_Users":7},
{"Group_id":"6","Group_name":"General 2Mbps
Group","Profile_id":"6","Profile_Name":"General 2Mbps
Profile","Active_Users":4,"Total_Users":4},
{"Group_id":"7","Group_name":"General 3Mbps
Group","Profile_id":"7","Profile_Name":"General 3Mbps
Profile","Active_Users":4,"Total_Users":4},
{"Group_id":"15","Group_name":"Carried Invoice
Group","Profile_id":"15","Profile_Name":"Carried Invoice
Profile","Active_Users":10,"Total_Users":10}]}
API Usage Guide API-Document Page 42 of 68
POST Method :
/api/v1/update_sms_status
Input :
Argument Value
smsId Numeric <SMS Id of the sms>
statusCode Numeric <status code of the sms>
message String <Message of the sms>
operator String <Name of the operator>
Sample Output :
"success"
API Usage Guide API-Document Page 43 of 68
GET Method :
/api/v1/get_all_invoices_from_userid/<userId>/<status> with the following data:
Input :
Argument Value
userId Numeric <Id of the user>
status (Optional) String Keyword <“paid” or “unpaid”>
Sample Output :
[{"2109":2109,"2302":2302,"2704":2704}]
API Usage Guide API-Document Page 44 of 68
GET Method :
/api/v1/get_fup_details/<userId>/<FromDate>/<ToDate> with the following data:
Input :
Argument Value
userId Numeric <Id of the user>
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
Sample Output :
[{"id":"3","user_id":"3","account_id":"local2","quota":"+1","units":"gb","price":n
ull,"fup_data_when_added":null,"date_created":"2016-07-21 12:35:01"}
API Usage Guide API-Document Page 45 of 68
GET Method :
/api/v1/get_users_by_date/<fromDate>/<toDate>/<basedOn> with the following data:
Here the users are filtered based on the modified date in default.
The optional field “basedOn” used to filter based on created date or modified date.
Input :
Argument Value
fromDate From Date <Date Format yyyy-mm-dd>
toDate To Date <Date Format yyyy-mm-dd>
basedOn String keyword(“created” or “modified”)
Sample Output :
{ "status":"success",
"data":
[{"id":"533","username":"sekark","groupId":"49","status":"suspended","name":"S
EKAR","phone":"9745741812","email":"testid@gmail.com","address_line1":"31
mainroad,","address_line2":"","address_city":"chennai","address_pin":"621729","a
ddress_state":"TAMILNADU","comments":"","activationTime":"2016-04-18
00:00:00",''createdTime'':''2016-04-18 00:00:00'',"expirationTime":"2999-12-31
23:59:59","billing_id":"279","type":"home","modified":"2016-09-01
17:00:08","company_name":null,"staticIp":[]}
API Usage Guide API-Document Page 46 of 68
POST Method :
/api/v1/authenticate_user with the following POST data:
Input :
Argument Value
username Login user name of the user
password Password for the user
Sample Output :
[ "success",
"1"
]
API Usage Guide API-Document Page 47 of 68
POST Method :
/api/v1/raise_ticket with the following POST data:
Input :
Argument Value
type String <Name of the ticket type>
subject String <Name of the ticket subject>
priority Text <low, medium, high, urgent>
userId Numeric <Id of the user>
comments String <Issue>
Sample Output :
{
"status": "success",
"message": "Your ticket with the ID 91 has been raised. Please wait for the
response and note the ticket Id for future reference.",
"ticketId": "91"
}
API Usage Guide API-Document Page 48 of 68
GET Method :
/api/v1/get_tickets/<userId>/<status> with the following data:
Here the tickets are filtered based on the status.
Input :
Argument Value
userId Numeric <Id of the user>
Text <unresolved, overdue, duetoday, open,
status
onhold, unassigned, closed>
Sample Output :
{
"status": "success",
"data": [
{
"Ticket": {
"id": "11",
"account_id": "jazenetworks",
"user": "6",
"subject": "Unable to pay online",
"type": "Payment",
"priority": "medium",
"due": "2016-11-22 05:01:51",
"status": "unassigned",
API Usage Guide API-Document Page 49 of 68
"assigned_to": "test@gmail.com",
"group_name": "Payment",
"created": "2016-11-21 17:01:51"
}
},
{
"Ticket": {
"id": "12",
"account_id": "jazenetworks",
"user": "6",
"subject": "Unable to pay online",
"type": "Payment",
"priority": "medium",
"due": "2016-11-22 05:03:23",
"status": "unassigned",
"assigned_to": "NULL",
"group_name": "Payment",
"created": "2016-11-21 17:03:23"
}
}
]
}
API Usage Guide API-Document Page 50 of 68
POST Method :
/api/v1/send_message with the following POST data:
Input :
Argument Value
ticketId Numeric <Id of the ticket>
ticketMessage String <reply for the ticket>
sender Text <admin, user>
sender_name Numeric <Name of the sender>
showToUser Text <true, false>
Sample Output :
{
"status": "success",
"message": "The message has been sent to the <sender>"
}
API Usage Guide API-Document Page 51 of 68
GET Method :
/api/v1/get_ticket_details/<ticketId> with the following data:
Input :
Argument Value
ticketId Numeric <Id of the ticket>
Sample Output :
{
"status": "success",
"message": {
"ticket_conversation": [
{
"sender": "user",
"sender_name": "max",
"ticket_message": "connection timeout",
"created": "2016-11-16 13:07:26",
"show_to_user": "0"
},
{
"sender": "admin",
"sender_name": "test@gmail.com",
"ticket_message": "ok. Looking on it",
"created": "2016-11-21 19:06:34",
API Usage Guide API-Document Page 52 of 68
"show_to_user": "0"
},
{
"sender": "admin",
"sender_name": "test@gmail.com",
"ticket_message": "issue is solved",
"created": "2016-11-21 19:07:11",
"show_to_user": "0"
}
],
"ticket_details": {
"status": "closed",
"assigned_to": "test@gmail.com",
"created": "2016-11-21 19:36:54"
}
}
}
API Usage Guide API-Document Page 53 of 68
GET Method :
/api/v1/close_ticket/<ticketId> with the following data:
Input :
Argument Value
ticketId Numeric <Id of the ticket>
Sample Output :
{
"status": "success",
"message": "The ticket has been closed"
}
API Usage Guide API-Document Page 54 of 68
POST Method :
/api/v1/authenticate_user_from_myaccounts with the following POST data:
Input :
Argument Value
username Login user name of the user
password Password for the user
Sample Output :
{
"username":"test",
"userId":"2",
"accountId":"jazenetworks"
}
API Usage Guide API-Document Page 55 of 68
GET Method :
/api/v1/get_account_details
Sample Output :
[ {
"accountId":"local3",
"accountName":"local3",
"apiKey":"cddb0d8f0da027aea083f75d16",
"companyName":"jazenetworks1",
"parentAccountId":"local1",
"dateCreated":"2016-09-23 13:42:30"
},
{
"accountId":"local1",
"accountName":"local1",
"apiKey":"4be9491968d7270a73233713",
"companyName":"jazenetworks1",
"parentAccountId":"jazenetworks",
"dateCreated":"2016-09-23 12:44:22"
} ]
API Usage Guide API-Document Page 56 of 68
GET Method :
/api/v1/get_all_profile_ids
Sample Output :
[
{
"Profile": {
"id": "2",
"name": "Guest profile"
}
},
{
"Profile": {
"id": "3",
"name": "1mbps"
}
}
]
API Usage Guide API-Document Page 57 of 68
GET Method :
/api/v1/get_profile_details/<profileId> with the following data:
Input :
Argument Value
profileId Numeric <Id of the profile>
Sample Output :
{
"status": "success",
"message": {
"profile Details": [
{
"property": "Reset billing cycle",
"value": "weekly"
},
{
"property": "Day of the week to reset billing cycle",
"value": "Sunday"
},
{
"property": "Day of the week to reset billing cycle",
"value": "Sunday"
},
{
API Usage Guide API-Document Page 58 of 68
"value": "servicetax"
},
{
"property": "period",
"value": "1month(s)"
},
{
"property": "period",
"value": "1month(s)"
},
{
"property": "Total Price",
"value": 1000
}
]
}
}
API Usage Guide API-Document Page 60 of 68
GET Method :
/api/v1/get_all_user_ids
Sample Output :
[
"5",
"6",
"8",
"9",
"10",
"11"
]
API Usage Guide API-Document Page 61 of 68
Argument Value
type “phone” or “email”
action “block” or “unblock”
Argument Value
{"contact_persons_details":
{"phone":"9876543210"}}
JSONString or
{"contact_persons_details":
{"email":"example@example.com"}}
Sample Output :
{
"status": "success",
"message": "The user has been unblocked"
}
{
"status": "success",
"message": "The user has been blocked"
}
API Usage Guide API-Document Page 62 of 68
POST Method :
/api/v1/get_users_by_phone with the following POST data:
Input :
Sample Output :
[
"success":"2,3"
]
API Usage Guide API-Document Page 63 of 68
GET Method :
/api/v1/get_user_by_phone/<phone>/<status> with the following data:
Input :
Sample Output :
{ "status":"success",
"data":
[{"id":"533","username":"sekark","groupId":"49","status":"suspended","name":"S
EKAR","phone":"9745741812","email":"testid@gmail.com","address_line1":"31
mainroad,","address_line2":"","address_city":"chennai","address_pin":"621729","a
ddress_state":"TAMILNADU","comments":"","activationTime":"2016-04-18
00:00:00","expirationTime":"2999-12-31
23:59:59","billing_id":"279","type":"home","modified":"2016-09-01
17:00:08","company_name":null,"staticIp":[]}
API Usage Guide API-Document Page 64 of 68
GET Method :
/api/v1/get_sub_account_apis
Sample Output :
{
"status": "success",
"message": [
{
"Account": {
"company_name": "ABC Technologies",
"api_token": "abctech",
"api_key": "87bef06b612c39d6b8315f90ed0248bdd96903ef"
}
},
{
"Account": {
"company_name": "XYZ Technologies",
"api_token": "xyztech",
"api_key": "c3f1eee7fb1553533c7c6ed8624373465d9ec17a"
}
}
]
}
API Usage Guide API-Document Page 65 of 68
GET Method :
/api/v1/get_user_by_username/<username> with the following data:
Input :
Sample Output :
{
[{"id":"533","username":"sekark","groupId":"49","status":"suspended","name":"S
EKAR","phone":"9745741812","email":"testid@gmail.com","address_line1":"31
mainroad,","address_line2":"","address_city":"chennai","address_pin":"621729","a
ddress_state":"TAMILNADU","comments":"","activationTime":"2016-04-18
00:00:00","expirationTime":"2999-12-31
23:59:59","billing_id":"279","type":"home","modified":"2016-09-01
17:00:08","company_name":null,"staticIp":[]
}
API Usage Guide API-Document Page 66 of 68
GET Method :
/api/v1/get_active_usersession_details/<user_id> with the following data:
Input:
Argument Value
userId Numeric <Id of the user>
{
“session details as json encoded”
}
API Usage Guide API-Document Page 67 of 68
POST Method :
/api/v1/day_wise_data with the following data:
Input:
Argument Value
userId Numeric <Id of the user>
startDate Start Date <Date Format dd-mm-yyyy>
endDate End Date <Date Format dd-mm-yyyy>
[
{
"download": "525.4 GB",
"upload": "4.22 GB",
"total": "529.62 GB",
"date": "05-09-2017"
}
],
[
{
"download": "4.23 GB",
"upload": "86.32 GB",
"total": "90.56 GB",
"date": "19-09-2017"
}
]
API Usage Guide API-Document Page 68 of 68
Key Value
userId Numeric <Id of the user to make payment>
groupId Numeric <group Id of the user group to move>
String value with keyword <moveImmediately,
type previousBillingCycle, nextbillingCycle,
customDate>
customDateTo yyyy-mm-dd
clearUserDataUsage String value with keyword <yes or no >
clearUserPolicies String value with keyword <yes or no >
moveBilling String value with keyword <yes or no >
Sample Output
{
"status": “success”,
“message”:”The User 62148684 Moved”
}