Section E - Get user details API

E1 - General Information

GET Method :

/api/v1/get_details/< user_id >

E2 - Sample output

{ 
 "status":"success",
 "errorCode" = 200,
 "data":[ 
      { 
       "User":{ 
       "id":"17766",
       "username":"31508205064",
       "groupId":"635",
       "status":"terminated",
       "name":"john",
       "phone":"9999999999",
       "email":"[email protected]",
       "address":"",
       "comments":"“Chief at Tech Park”",
       "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 14 of 269
       "timezone":"Asia/Kolkata"
       "group_name":"demo"
      }}, { 
      "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": []
      },
      {
      "location": {
      "latitude": "89",
      "longitude": "12",
      "area_id": "2",
      "area": "PTC",
      "street_id": "2",
      "street": "45th Street",
      "block_id": "2",
      "block": "MAS Apt"
 }

E3 - Get all user details

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":[]}

E4 - Get all user details by date

GET Method :

/api/v1/get_users_by_date// / 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 :

Arguement Mandatory Value
FromDate Yes From Date < Date Format yyyy-mm-dd >
toDate Yes To Date < Date Format yyyy-mm-dd >
basedON No String keyword(“created” or “modified”)

Sample Output :

{ "status":"success",
 "errorCode" = 200,
 "data":
[{"id":"533","username":"sekark","groupId":"49","status":"suspended","name":"S
EKAR","phone":"9745741812","email":"[email protected]","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":[]}

E5 - Get all group details

GET Method :

/api/v1/get_group_details/< groupId >

Input :

Arguement Mandatory Value
groupId No Numeric

Sample Output :

{"status":"success","errorCode" = 200,"data":
[{"Group_id":"3","Group_name":"Guest","Profile_id":"3","Profile_Name":"Guest 
profile","Active_Users":0,"Total_Users":0,"Online_Users":0},
{"Group_id":"5","Group_name":"General 1Mbps 
Group","Profile_id":"5","Profile_Name":"General 1Mbps 
Profile","Active_Users":7,"Total_Users":7,"Online_Users":5},
{"Group_id":"6","Group_name":"General 2Mbps 
Group","Profile_id":"6","Profile_Name":"General 2Mbps 
Profile","Active_Users":4,"Total_Users":4,"Online_Users":1},
{"Group_id":"7","Group_name":"General 3Mbps 
Group","Profile_id":"7","Profile_Name":"General 3Mbps 
Profile","Active_Users":4,"Total_Users":4,"Online_Users":0},
{"Group_id":"15","Group_name":"Carried Invoice 
Group","Profile_id":"15","Profile_Name":"Carried Invoice 
Profile","Active_Users":10,"Total_Users":10,"Online_Users":0}]}

E6 - Get all user IDs

GET Method :

/api/v1/get_all_user_ids

[
"5",
"6",
"8",
"9",
"10",
"11"
]

E7 - Get all user Ids by phone

POST Method :

/api/v1/get_users_by_phone with the following POST data:

Input :

Argument Value Is Required
phone < numeric value of the phone number > Mandatory
status < string with a keyword'active', 'pending', 'rejected','expired', 'pending-approval',deleted', 'blocked','blacklisted', 'terminated','suspended'> Optional

Sample Output :

[
   "success":"2,3",
   "errorCode" = 200
]

E8 - Get all user details by phone

GET Method :

/api/v1/get_user_by_phone/< phone >/ < status > with the following data:

Input :

Argument Value Is Required
phone < numeric value of the phone number > Mandatory
status < string with a keyword'active', 'pending', 'rejected','expired', 'pending-approval','deleted', 'blocked','blacklisted', 'terminated','suspended'> Optional

Sample Output :

{ 
    "status":"success",
    "errorCode" = 200,
    "data":
[{"id":"533","username":"sekark","groupId":"49","status":"suspended","name":"S
EKAR","phone":"9745741812","email":"[email protected]","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":[]
}

E9 - Get user details by username

GET Method :

/api/v1/get_user_by_username/< username > with the following data:

Input :

Argument Value Is Required
Username < string value of the user name > Mandatory

Sample output :

{ 
[{"id":"533","username":"sekark","groupId":"49","status":"suspended","name":"S
EKAR","phone":"9745741812","email":"[email protected]","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":[]
}

E10 - Move group

To make payment for an user send a post request to

/api/v1/move_group with the following data:

Key Mandatory Value
userId Yes Numeric < Id of the user to make payment>
groupId Yes Numeric < group Id of the user group to move>
type Yes String value with keyword < moveImmediately, previousBillingCycle, nextbillingCycle, customDate>
customDateTo No yyyy-mm-dd
clearUserDataUsage Yes String value with keyword < yes or no >
clearUserPolicies Yes String value with keyword < yes or no >
moveBilling Yes String value with keyword < yes or no >

Sample Output :

{
 "status": “success”,
 "errorCode" = 200,
 “message”:”The User 62148684 Moved”
}

E11 - Get user password

GET Method :

/api/v1/get_user_password/< user _id > with the following data:

Input :

Argument Mandatory Value
UserID Yes Numeric < Id of the user >

Sample output :

{
"status":"success",
"errorCode" = 200,
"message":
 {
 "password":"test2"
 } 
}

E12 - Delete user

GET Method :

/api/v1/delete_user/< user_id>/< clear_u nfinished_billing> with the following data:

Input :

Argument Value Is Mandatory
User_ID Integer value of the user ID yes
clear_unfinished_billing String keyword (“yes” or “no”) No

Sample output :

{
"status":"success",
"errorCode" = 200,
"message":"User deleted successfully"
}

E13 - Get user details from all accounts

GET Method :

/api/v1/get_user_from_all_accounts/< type>/< value > with the following data:

Input :

Argument Value Is Mandatory
type String keyword(“phone” or “username”) yes
value String value of User's phone number or username yes

Sample Output :

{
"status":"success",
"errorCode" = 200,
"data":[{
"User":
{"id":"5456","username":"john135","last_name":"","groupId":"184","status":"expi
red","name":"Ajay 
Ajay","phone":"8019399972","email":"[email protected]","address_line1":”
Tcr towers 
flot","address_line2":"","address_city":"","address_pin":"","address_state":"","co
mments":"","activationTime":"2016-01-01 00:00:00","createdTime":"2018-01-05 
12:24:34","expirationTime":"2017-08-20 
12:00:00","billing_id":null,"type":"","modified":"2018-01-05 
12:24:35","company_name":"Solutions","api_token":"tokenname","api_key":"083
37bksldjflaafdasslkdfjlskfjls69384"}},{"currentBillingCycleUsage":
{"bandwidthTemplateId":"100","bandwidthTemplateName":"25 
Mbps","bandwidthTemplateMikrotik":"25600000\/25600000 0 0 0 0 
25600000\/25600000","billingResetType":"payAsYouGo","billingStartDate":"201
8-01-05 12:24:34","billingEndDate":"2018-02-04 
12:24:34","uploadDataUsage":"0","downloadDataUsage":"0","totalDataUsage":0,"
usedBandwidthQuota":0,"totalBandwidthQuota":0}},{"staticIpMac":
[{"staticIpAddress":"91.91.91.135","staticIpBoundMac":null} ]}]}

E14 - Add grace period to user

POST Method :

/api/v1/add_grace_period with the following POST data:

Input :

Argument Mandatory Value
userId Yes Numeric < Id of the user >
days Yes Numeric
expiryDate No Expiry Date < Date Format dd-mm-yyyy >

Sample Output :

{
"status": "success",
"errorCode": 200,
"message": "Additional 1 days has been extended for this user199"
}

E15 - Add and edit area

To add an area send a post request to /api/v1/add_area with the following data :

Key Mandatory Value
areaName Yes String

Sample Output :

{
 "status" : “success”,
 "errorCode" = 200
}

To edit an area send a post request to /api/v1/add_area with the following data :

Key Mandatory Value
areaName Yes String
inputAreaId Yes Numeric < Id of the area >

Sample Output :

{
 "status" : “success”,
 "errorCode" = 200
}

E16 - Add and edit street

To add an street send a post request to /api/v1/add_street with the following data :

Key Mandatory Value
StreetName Yes String
inputAreaId Yes Numeric < Id of the area >

Sample Output :

{
 "status" : “success”,
 "errorCode" = 200
}

To edit an street send a post request to /api/v1/add_street with the following data :

Key Mandatory Value
StreetName Yes String
inputAreaId Yes Numeric < Id of the area >
inputStreetId Yes Numeric < Id of the street >

Sample Output :

{
 "status" : “success”,
 "errorCode" = 200
}

E17 - Add and edit building

To add an building send a post request to /api/v1/add_block with the following data :

Key Mandatory Value
BlockName Yes String
inputStreetId Yes Numeric < Id of the street >

Sample Output :

{
 "status" : “success”,
 "errorCode" = 200
}

To edit an building send a post request to /api/v1/add_block with the following data :

Key Mandatory Value
BlockName Yes String
inputStreetId Yes Numeric < Id of the street >
inputBlockId Yes Numeric < Id of the block >

Sample Output :

{
 "status" : “success”,
 "errorCode" = 200
}

E18 - Get all areas

GET Method :

/api/v1/get_all_areas

Sample Output :

{ 

 "status": "success",
 "errorCode": 200,
 "data": [
 {
 "CollectionArea": {
 "id": "2",
 "account_id": "test",
 "area": "PTC",
 "internal": null
 }
 },
 {
 "CollectionArea": {
 "id": "4",
 "account_id": "test",
 "area": "Jain Clg",
 "internal": null
 }
 }
]
}

E19 - Get all streets

To get all streets send a post request to /api/v1/ get_all_streets with the following data :

Key Mandatory Value
inputAreaId No Numeric < Id of the area >

Sample output :

{ 
"status": "success",
 "errorCode": 200,
 "data": [
 {
 "CollectionStreet": {
 "id": "2",
 "account_id": "test",
 "area_id": "2",
 "street": "4th Street",
 "internal": null
 }
 } 
 ]
}

E20 - Get all buildings

To get all buildings send a post request to /api/v1/ get_all_buildings with the following data :

Key Mandatory Value
streetId No Numeric < Id of the street >

Sample output :

{
"status": "success",
 "errorCode": 200,
 "data": [
 {
 "CollectionBlock": {
 "id": "2",
 "account_id": "test",
 "street_id": "2",
 "block": "ALKASHA",
 "internal": null
 }
 } 
 ]
}

E21 - Get collection users area wise

To get all collection users area wise send a post request to /api/v1/ get_collection_users_areawise with the following data :

Key Mandatory Value
adminId Yes Numeric < Id of the admin >
areaId No Numeric < Id of the area >
Userwith balance No 1

Sample Output :

{
"status": "success",
 "errorCode": 200,
 "data": [
 [
 {
 "0": {
 "balance": "3789.004"
 },
 "UserLocation": {
 "user_id": "133",
 "latitude": "89",
 "longitude": "12",
 "account_id": "test"
 },
 "Contact": {
    "person_title": "test",
 "first_name": "test",
 "last_name": "Customer",
 "phone_phone_number": "9999999999",
 "email": "[email protected]",
 "street_addres1": "123 Anywhere St",
 "street_addres2": ""
 },
 "CollectionArea": {
 "area": "PTC"
 },
 "CollectionStreet": {
 "street": "4th Street"
 },
 "CollectionBlock": {
 "block": "ALKASHA"
 }
 },
 {
 "0": {
 "balance": null
 },
 "UserLocation": {

    user_id": "361",
 "latitude": "12.947026",
 "longitude": "80.242145",
 "account_id": "niroop"
 },
 "Contact": {
 "person_title": "abc",
 "first_name": "",
 "last_name": "Customer",
 "phone_phone_number": "9999999999",
 "email": "[email protected]",
 "street_addres1": "No.2 Ganapathy Nagar, North Ragunathapuram,Mangadu",
 "street_addres2": ""
 },
 "CollectionArea": {
 "area": "PTC"
 },
 "CollectionStreet": {
 "street": "4th Street"
 },
 "CollectionBlock": {
 "block": "ALKASHA"
 }
 }]}

E22 - Get collection approval users area wise

To get all collection approval users area wise send a POST request to /api/v1/ get_collection_approval_users with the following data :

Key Mandatory Value
fromDate No Date
toDate No Date
adminId No Numeric

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "data": [
 [
 {
 "UserLocation": {
 "user_id": "133",
 "latitude": "89",
 "longitude": "12",
 "account_id": "test"
 },
 "Contact": {
 "person_title": "test",
 "first_name": "test",
 "last_name": "Customer",
 "phone_phone_number": "9999999999",
 "email": "[email protected]",
 "street_addres1": "123 Anywhere St",
 "street_addres2": ""
 },
 "CollectionArea": {
 "area": "PTC"
 },
 "CollectionStreet": {
 "street": "4th Street"
 },
 "CollectionBlock": {
 "block": "ALKASHA"
 },
 "PaymentCollectionMode": {
 "amount": "10",
 "create_datetime": "2018-10-26 14:00:50",
 "paymentcollectionId": "88"
 }
 },
 {
 "UserLocation": {
    "user_id": "344",
 "latitude": null,
 "longitude": null,
 "account_id": "test"
 },
 "Contact": {
 "person_title": "81775862",
 "first_name": "",
 "last_name": "Customer",
 "phone_phone_number": "9999999999",
 "email": "[email protected]",
 "street_addres1": "No.2 Ganapathy Nagar, North Ragunathapuram,Mangadu",
 "street_addres2": ""
 },
 "CollectionArea": {
 "area": "PTC"
 },
 "CollectionStreet": {
 "street": "4th Street"
 },
 "CollectionBlock": {
 "block": "ALKASHA"
 },
"PaymentCollectionMode": {
 "amount": "10",
 "create_datetime": "2018-10-26 14:01:48",
 "paymentcollectionId": "89"
 }
 }
 ]
 ]
}

E23 - Collection approval

To do collection approval send a POST request to /api/v1/ collection_approval with the following data :

Key Mandatory Value
userId yes Numeric < Id of the user >
amount yes Numeric < amount to be paid >
modelId yes Numeric < Id of the collection approval >

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": "Payment Approved"
}

E24 - Collection disapproval

To do collection approval send a POST request to /api/v1/ collection_disapproval with the following data :

Key Mandatory Value
userId yes Numeric < Id of the user >
modelId yes Numeric < Id of the collection approval >
{
 "status": "success",
 "errorCode": 200,
 "message": "Payment Disapproved"
}

E25 - Collection payment

To do collection approval send a POST request to /api/v1/ collect_user_payment with the following data :

Key Mandatory Value
userId yes Numeric < Id of the user >
amount yes Numeric < amount to be paid >
statusOfCollection yes String < with a keyword (cashCollected, notAvailable, alreadyPaid) >
method yes String < with a keyword (cash, cheque, creditCard, debitCard) >
bank yes String < If “method” is Cheque >
chequeNumber yes Numeric < If “method” is Cheque >
chequeDate yes String < If “method” is Cheque >
cardNumber yes Numeric < If “method” is creditCard or debitCard >
cardExpiration yes String < If “method” is creditCard or debitCard >
notes yes Sring < Additional Payment Notes >

Sample Output :

{
 "status": "success",
 "message": "Payment Collected Successfully"
}

E26 - Get user last log off time and online status

To get last log off time and online status of the user send a GET request to

/api/v1/ get_logofftime_onlinestatus/< userId >

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "data": {
 "lastLogOffTime": "12-09-2018 15:21:20",
 "online": "no"
 } 
}

E27 - Assign user to admin for collection

To do collection approval send a POST request to /api/v1/ assign_users_to_admin with the following data :

Key Mandatory Value
userId yes Numeric < Id of the user >
accountId yes String < Id of the account >
adminId yes Numeric < Id of the admin >

Sample Output :

{
 "status": "success",
 "message": "User assigned to admin successfully"
}

E28 - Override user bandwidth

POST Method :

To override users bandwidth, send a post request to /api/v1/override_user_bandwidth with the following data:

Argument Mandatory Value
userId yes Numeric < Id of the user > Pass only userId to remove the bandwidth override for user.
bandwidthRestriction No String < with a keyword “on”> Only if this is “on” all the below arguments will take effect
bandwidthReset No String < with a keyword (“always”,“data”,“uploadDownload”)>“data” means FUP limit doesn't exceed “uploadDownload” means Either Upload or Download data doesn't exceed
bandwidthResetLimit No Numeric If bandwidthReset is “always” then this is not mandatory else mandatory.
bandwidthResetUnitData No String < “mb” or “gb” > If bandwidthReset is “always” then this is not mandatory else mandatory.
bandwidthResetEvery No String < with a keyword (“daily”,“weekly”,“monthly”,“never”,“billing”)>If bandwidthReset is “always” then this is not mandatory else mandatory.
bandwidthResetEveryValue No Numeric <1 to 31> If bandwidthResetEvery is “monthly” then give starting date. If bandwidthReset is “always” then this is not mandatory else mandatory.
bandwidthResetEveryValueDay yes Numeric <0,1,2,3,4,5,6> 0 means Sunday,1 means Monday and like wise.If bandwidthReset is “always” then this is not mandatory else mandatory.
bandwidthTemplate yes Numeric < bandwidth Id >
bandwidthReset2 No String < with a keyword “always”> If bandwidthReset is “always” then this is not mandatory else mandatory.
bandwidthTemplate2 No Numeric < bandwidth Id > If bandwidthReset is “always” then this is not mandatory else mandatory
excludeUpload No String < “yes” or “no” > Exclude Upload data from FUP means “yes”
carryForwardPreviousData No String < “yes” or “no” > Carry Forward Previous Data means “yes”

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": "Profile values overriden for user"
}

E29 - Get allowed groups

GET Method :

/api/v1/get_allowed_groups/< userId >

Input :

Key Mandatory Value
userId yes Numeric < Id of the user >

Sample output:

{"status":"success","errorCode":200,"data":[{"Group_id":"5","Group_name":"4 
Mbps","Profile_id":"4","Profile_Name":"4 Mbps 
Profile","Active_Users":22,"Total_Users":32},
{"Group_id":"6","Group_name":"PayAsYouGo","Profile_id":"6","Profile_Name":
"PayAsYouGo Profile","Active_Users":6,"Total_Users":37},
{"Group_id":"9","Group_name":"8 Mbps1","Profile_id":"9","Profile_Name":"8 
Mbps Profile","Active_Users":13,"Total_Users":18},
{"Group_id":"16","Group_name":"demo","Profile_id":"6","Profile_Name":"PayA
sYouGo Profile","Active_Users":5,"Total_Users":22},
{"Group_id":"26","Group_name":"payasyougo1","Profile_id":"48","Profile_Name
":"payasyougo1 Profile","Active_Users":3,"Total_Users":14},
{"Group_id":"31","Group_name":"testpayment","Profile_id":"55","Profile_Name"
:"testpayment Profile","Active_Users":8,"Total_Users":9},
{"Group_id":"42","Group_name":"demo 
Profile","Profile_id":"18","Profile_Name":"demo 
Profile","Active_Users":1,"Total_Users":1},
{"Group_id":"45","Group_name":"testpay 
Profile","Profile_id":"58","Profile_Name":"testpay 
Profile","Active_Users":1,"Total_Users":1}]}

E30 - Override user vendor attributes

POST Method :

To override users vendor attributes, send a post request to /api/v1/override_user_vendor_attributes with the following data:

Argument Mandatory Value
userId yes Numeric < Id of the user > Pass only userId to remove the bandwidth override for user.
vendorRestriction No String < with a keyword “on”> Only if this is “on” all the below arguments will take effect
vendorReset No String < with a keyword (“always”,“data”,“uploadDownload”)>“data” means FUP limit doesn't exceed “uploadDownload” means Either Upload or Download data doesn't exceed
vendorResetLimit No Numeric < Data > If vendorReset is “always” then this is not mandatory else mandatory.
vendorResetUnitData No String < “mb” or “gb” > If vendorReset is “always” then this is not mandatory else mandatory.
vendorResetEvery No String < with a keyword (“daily”,“weekly”,“monthly”,“never”,“billing”)>If vendorReset is “always” then this is not mandatory else mandatory
vendorResetEveryValue No Numeric <1 to 31> If vendorResetEvery is “monthly” then give starting date.If vendorResetEvery is “always” then this is not mandatory else mandatory.
vendorResetEveryValueDay No Numeric <0,1,2,3,4,5,6> 0 means Sunday,1 means Monday and like wise.If vendorResetEvery is “always” then this is not mandatory else mandatory.
vendorData yes [vendorData] => Array([0] => Array([type] => reply or check[vendor] => vendor name [attribute] => vendor attribute[equals] => can be value in ("=",":=", "==", "+=", "!=", ">", ">=", "<", "<=", "=~", "!~", "=", "!")[value] =>some value))
vendorReset2 No String < with a keyword “always”> If vendorReset is “always” then this is not mandatory else mandatory.
vendorData1 No [vendorData1] => Array([0] => Array([type] => reply or check[vendor] => vendor name[attribute] => vendor attribute[equals] => can be value in ("=",":=", "==", "+=", "!=", ">", ">=", "<", "<=", "=~", "!~", "=", "!")[value] =>some value) )If vendorReset is “always” then this is not mandatory else mandatory.

Sample output :

{
 "status": "success",
 "errorCode": 200,
 "message": "Profile vendor attributes values overriden for user"
}

E31 - CoA request

POST Method :

Send a post request to /api/v1/coa_request with the following data:

Input :

Argument Mandatory Value
userId Yes Numeric Pass only userId to remove the bandwidth override for user.
vendorData Yes [vendorData] => Array ([0] => Array([attribute] => vendor attribute[value] => vendor value))

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": [
 "TRUE"
 ]
}

E32 - Send SMS to user

POST Request :

To Send SMS to the user a post request to /api/v1/send_sms_to_user with the following data:

Input :

Key Mandatory Value
userId Yes Numeric
templateName Yes String {'grantAccess', 'verificationCode', 'rejectUser', 'usageAlert', 'accountSuspension', 'validityExpire', 'userBalance','closeTicketOtp','closeTicketNotification'}
sendSmsTo No “true” or “false” (By default false) used to send sms to User Alternative Mobile Number
grantAccessType No < string > Mandatory if templateName is ' grantAccess' {PPPoE/Hotspot, customerPortal}
usageAlertType No < string > Mandatory if templateName is ' usageAlert' {bandwidth, duration, vendor }
sendMultipleSms No “yes” or “no” Used to send message to multiple users
userIds[] No Numeric Array Format< Ids of the users >
ticketId No Mandatory if templateName is 'closeTicketOtp' or 'closeTicketNotification'
otp No < string > Mandatory if templateName is ' closeTicketOtp'

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": "< templateName > SMS has been dispatched to <Mobile Number> ."
}

E33 - Send email to user

POST Request :

To Send EMAIL to the user a post request to /api/v1/send_email_to_user with the following data:

Input :

Key Mandatory Value
userId Yes Numeric
templateName Yes String {'userRecipt', 'suspend', 'rejectedUserRecipt', 'billReminder', 'billWarning', 'prepaid', 'notifyUser','closeTicketOtp','closedTicketNotificationClient'}
userReciptType No < string> Mandatory if templateName is ' userRecipt' {PPPoE/Hotspot, customerPortal}
usageAlertType No < string > Mandatory if templateName is ' notifyUser' {bandwidth, duration, vendor }
ticketId No Mandatory if templateName is 'closeTicketOtp' or 'closedTicketNotificationClient'
otp No < string > Mandatory if templateName is 'closeTicketOtp'

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": "Email is sent successfully ."
}

E34 - Release user IP-MAC

POST Method :

To release user IP/MAC , send a post request to /api/v1/release_ip_mac with the following data:

Input :

Argument Mandatory Value
userId Yes Numeric
whichIpMacRow Yes Numeric Get the row number which has to be removed from the user details api.You will be getting in staticIpMac array.
toRemove No String < with a keyword (“ip”,“mac”,“both”)> Default value is both.

Sample output :

{
 "status": "success",
 "errorCode": 200,
 "message": "The Static IP/MAC have been released"
}

E35 - Get renewal details

POST Method :

/api/v1/get_renewal_details with the following POST data:

Input :

Argument Mandatory Value
userId No Numeric
fromDate No fromDate
toDate No toDate

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": [
 {
 "RenewalDetails": {
 "id": "239",
 "user_id": "471",
 "account_id": "niroop",
 "admin_username": "User Addition",
 "renewal_days": "1 months",
 "renewal_amount": "160",
 "plan_rate": null,
 "tax_amount": null,
 "type": "1",
 "previous_group_id": "6",
 "present_group_id": "6",
 "previous_plan_id": null,
 "present_plan_id": null,
 "order_id": "760",
 "order_active_until": "2019-01-25 03:37:44",
 "date_created": "2019-01-25 03:37:44",
 "deleted": "0",
 "active_since": "2019-01-25",
 "active_until": "2019-02-01",
 "notes": "add user"
 }
 }
 ]

E36 - Get radius statistics

GET Method :

/api/v1/get_radius_statistics/< type > with the following data:

Input :

Argument Mandatory Value
type Yes Numeric <'1' or '2'> 1 - Authentication 2 - Accounting

Sample output :

[
 "Sent Status-Server Id 121 from 0.0.0.0:33995 to 127.0.0.1:18121 length 50",
 "Message-Authenticator = 0x00",
 "Statistics-Type = Authentication",
 "Response-Packet-Type = Access-Accept",
 "Received Access-Accept Id 121 from 127.0.0.1:18121 to 127.0.0.1:33995 
length 140",
 "Total-Access-Requests = 4",
 "Total-Access-Accepts = 0",
 "Total-Access-Rejects = 0",
 "Total-Access-Challenges = 0",
 "Total-Auth-Responses = 0",
 "Total-Auth-Duplicate-Requests = 0",
 "Total-Auth-Malformed-Requests = 0",
 "Total-Auth-Invalid-Requests = 0",
 "Total-Auth-Dropped-Requests = 0",
 "Total-Auth-Unknown-Types = 0"
]

E37 - Get users count

GET Method :

/api/v1/get_users_count/< accountId > with the following data:

Input :

Argument Mandatory Value
Account No AccountId of account

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": {
 "total": 522,
 "active": 207,
 "online": 0,
 "expired": 281,
 "expiringNextWeek": 20,
 "newUsersLastWeek": 0,
 "blacklisted": 2,
 "suspended": 28,
 "blocked": 0,
 "pending": 0,
 "churned": 4,
 "others": 4
 }}

E38 - Recover password

POST Method :

/api/v1/recover_password with the following POST data: You can either pass phone or email to recover password but not both.

Input :

Argument Mandatory Value
Phone No Numeric < phone number of user>
email No String < email id of the user >

Sample output :

{
 "status": "success",
 "message": "Your credentials have been sent to 
<strong>[email protected]</strong>. Please check your Email.",
 "errorCode": 200
}

E39 - Payment collection request

GET Method :

/api/v1/payment_collection_request/< userId>/< bringChangeFor> with the following data:

Input :

Argument Mandatory Value
userId yes Numeric < Id of the user >
bringChangefor yes String < with a keyword (“none”,“500”,“2000”)> Default value is none.

Sample output:

{
 "status": "success",
 "errorCode": 200,
 "message": "We will collect your payment"
}

E40 - Get user SMS or Email logs

GET Method :

/api/v1/get_user_logs/< userId >/< type> with the following data:

Input :

Argument Mandatory Value
userId yes Numeric < Id of the user >
type No String < with a keyword (“email”,“sms”)> Default value is sms.

NOTE – In output if status_code is 202 - Success , 201 - Pending , 502 - Waiting , 505 - Aborted other than these codes Failure.

Sample Output :

{
 "status": "success",
 "errorCode": 200,
 "message": [
 {
 "date_created": "2017-09-06 17:03:02",
 "number": "919999999999",
 "content": "You have been granted access to the internet at Test -\nUsername: testpay\
nPassword: testpay",
 "status_code": "202",
 "error_message": "Sms is dispatched successfully"
 },
 {
 "date_created": "2017-09-06 17:13:10",
 "number": "919999999999",
 "content": "Your validity expires in 27 days. Please recharge to enjoy uninterrupted 
service.",
 "status_code": "202",
 "error_message": "Sms is dispatched successfully"
 }
 ]
}

E41 - Get all basic user details

GET Method :

/api/v1/get_basic_user_details

Sample Output :

{"status":"success","errorCode":200,"data"[{"id":"1","username":"90404953","acc
ount_id":"test","last_name":"ram","groupId":"1","status":"active","name":"Abhi","
phone":"999999999","email":"[email protected]","address":"NO.2/383,4TH 
STREETALKASH, FIRST FLOOR, SUBBARAYAN 
NAGAR","address_line1":"NO.2/383,4TH STREET","address_line2":"ALKASH, 
FIRST FLOOR, SUBBARAYAN 
NAGAR","address_city":"THORAIPAKKAM","address_pin":"600097","address_
state":"TN","comments":"","activationTime":"2018-02-19 
00:00:00","createdTime":"2017-05-29 11:45:28","expirationTime":"2019-07-02 
00:00:00","installationTime":"1970-01 
01","billing_id":null,"type":"home","modified":"2020-07-08 
16:10:19","country_code":"IN","alt_phone":"","alt_email":""}]}