Section K - Add FUP quota to user API

K1 - General Information

POST Method :

To add FUP quota to user send a post request to /api/v1/add_fup_quota with the following data:

Argument Mandatory Value
userId yes Numeric < Id of the user >
quota Yes if useTemplate value No Numeric < value in bytes >
type Yes if you want to reduce Fup String Keyword < “reduce”>
useTemplate Yes String Keyword < “yes”, “no” >
templateId Yes if useTemplate value Yes Id of the Fup template
templateName Yes if useTemplate value Yes Name of the Fup template

K2 - Sample Output

{
 "status" : “success”,
 "errorCode" = 200,
 “message” : ”FUP quota added successfullly”
}

K3 Get FUP details

GET Method :

/api/v1/get_fup_details/< userId >// with the following data:

Input :

Argument Mandatory Value
userId yes Numeric < Id of the user >
fromDate Yes From Date
toDate Yes To Date

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"}

K4 - Get FUP templates

GET Method :

/api/v1/get_fup_templates

Sample Output :

[
 {
 "id": "2",
 "templateName": "5mbps",
 "dataUsage": "5 GB",
 "price": 847.46,
 "groupName": "1mbps",
 "bandwidthName": "1 Mbps"
 } ]