API : ISP

API for ISP data


Get ISP list

Authentication is Required to call this API.

POST /api/isp/list

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value. Not username
api_key Y api_key for the above Userid
ispid N ISP ID
name N ISP Name. Accepted Partial names
code N ISP Code. Accepted Partial text
country N ISP Country
state N ISP State
usage_limit N Filter ISP by usage_limit is set or not. Allowed values are: 0 or 1
created_from N Created from date in yyyy-mm-dd format
created_upto N Created upto date in yyyy-mm-dd format
rows_limit N Limit the number of records in result set. Default: 10. Max value: 100
rows_offset N Fetch records from this offset position. Default: 0
sort_field N Sorts the result. Allowed values are: id, name, code, state, usage_credits. Default: id
sort_order N Sort order. Allowed values are: asc, desc. Default: asc
show_count N Shows Records Count only, instead of detailed results. This will ignore rows_limit, rows_offset. Allowed values are: 0, 1. Default: 0

Typical API Call

curl -X POST $BASE_URL/api/isp/list -d userid=3 -d api_key="09fddd465034ddbba9dc0e3fd29d29ec199de8c769a96fefdc" -d created_from="2019-01-01"


Create ISP

POST /api/isp/create

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value. Not username
api_key Y api_key for the above Userid
name Y ISP Name
code Y ISP Code
address N ISP Address
mobile Y ISP Mobile Number
email Y ISP Email ID
country Y ISP Country
state N ISP State
enable_usage_limit N Impose usage limit. Allowed values are: 0 or 1. Default: 0

Typical API Call

curl -X POST $BASE_URL/api/isp/create -d userid=3 -d api_key="09fddd465034ddbba9dc0e3fd29d29ec199de8c769a96fefdc" -d name="Isp4" -d code="ISP2" -d mobile="12344444" -d email="contact@isp2.com" -d country="India"

The expected API Response will be

{
    "result": 4,
    "error": null
}

Returns newly created ISP id value, upon success. Upon failure result contains null value, and error contains error description.


Update ISP

POST /api/isp/update

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value
api_key Y api_key for the above Userid
ispid Y ISP ID of the ISP record to update
name N ISP Name
code N ISP Code
address N ISP Address
mobile N ISP Mobile Number
email N ISP Email ID
country N ISP Country
state N ISP State
enable_usage_limit N Impose usage limit. Allowed values are: 0 or 1. Default: 0

Typical API Call

curl -X POST $BASE_URL/api/isp/update -d userid=3 -d api_key="09fddd465034ddbba9dc0e3fd29d29ec199de8c769a96fefdc" -d ispid=4 -d name="I Net"

The expected API Response will be

{
    "result": "done",
    "error": null
}

ISP Credits Usage Report

API End point is

POST /api/isp/credits_usage

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value. Not username
api_key Y api_key for the above Userid
id N Record ID
ispid N Filter records by ISP Id
resellerid N Filter records by Reseller Id
created_from N Created from date in yyyy-mm-dd format
created_upto N Created upto date in yyyy-mm-dd format
rows_limit N Limit the number of records in result set. Default: 10

Typical API Call

curl -X POST $BASE_URL/api/isp/credits_usage -d userid=3 -d api_key="09fddd465034ddbba9dc0e3fd29d29ec199de8c769a96fefdc" -d created_from="2020-03-01"


Update ISP Usage Credits

POST /api/isp/credits_update

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value
api_key Y api_key for the above Userid
ispid Y ISP ID of the ISP record to update
action Y Allowed values: Add,Less,Set
credits Y Credits to Set/Add/Less. Numerical value.

Typical API Call

curl -X POST $BASE_URL/api/isp/credits_update -d userid=3 -d api_key="09fddd465034ddbba9dc0e3fd29d29ec199de8c769a96fefdc" -d ispid=4 -d action="Add" -d credits="10"

The expected API Response will be

{
    "result": "done",
    "error": null
}

Delete ISP

POST /api/isp/delete

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value
api_key Y api_key for the above Userid
ispid Y ISP ID of the ISP record to delete

Typical API Call

curl -X POST $BASE_URL/api/isp/delete -d userid=3 -d api_key="09fddd465034ddbba9dc0e3fd29d29ec199de8c769a96fefdc" -d ispid=4

The expected API Response will be

{
    "result": "done",
    "error": null
}