API : Reseller

API for Reseller Management


Get Reseller list

Authentication is Required to call this API.

POST /api/reseller/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
resellerid N Reseller ID
invoice_by N Invoice By. Allowed values: ISP, Reseller
payment_by N Payment Collection By. Allowed values: ISP, Reseller, ISP+Reseller
type N Reseller Type. Allowed values: Reseller, Franchisee
name N ISP Name. Accepted Partial names
code N ISP Code. Accepted Partial text
country N ISP Country
state N ISP State
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/reseller/list -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4"


Create Reseller

POST /api/reseller/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
ispid N ISP ID. Optional, If above Login userid belongs to an ISP
invoice_by Y Invoice By. Allowed values: ISP, Reseller
payment_by Y Payment Collection By. Allowed values: ISP, Reseller, ISP+Reseller
type N Reseller Type. Allowed values: Reseller, Franchisee
name Y Reseller Name
code Y Reseller Code
address N Reseller Address
mobile Y Reseller Mobile Number
email Y Reseller Email ID
country Y Reseller Country
state N Reseller State
commission_percent Required, if type=Franchisee Commission Percentage to Franchisee. 0 to 100
credit_limit Required, if type=Franchisee Credit limit to Franchisee

Typical API Call

curl -X POST $BASE_URL/api/reseller/create -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d name="Reseller4" -d code="R2" -d mobile="12344444" -d email="contact@reseller4.com" -d country="India" -d invoice_by="ISP" -d payment_by="ISP" -d type="Franchisee" -d commission_percent=50 -d credit_limit=0

The expected API Response will be

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

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


Update Reseller

POST /api/reseller/update

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value
api_key Y api_key for the above Userid
ispid N ISP ID. Optional, If above Login userid belongs to an ISP
resellerid Y Reseller ID to update
name N Reseller Name
code N Reseller Code
address N Reseller Address
mobile N Reseller Mobile Number
email N Reseller Email ID
country N Reseller Country
state N Reseller State
invoice_by N Invoice By. Allowed values: ISP, Reseller
payment_by N Payment Collection By. Allowed values: ISP, Reseller, ISP+Reseller
type N Reseller Type. Allowed values: Reseller, Franchisee
commission_percent N Commission Percentage to Franchisee. 0 to 100
credit_limit N Credit limit to Franchisee

Typical API Call

curl -X POST $BASE_URL/api/reseller/update -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d resellerid=4 -d payment_by="Reseller"

The expected API Response will be

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

Reseller Wallet Transactions

POST /api/reseller/wallet_txn

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
txn_code N Filter records by Txn code. Allowed values: Invoice,Payment,Topup,Settlement,Adj
serviceid N Filter records by Service 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/reseller/credits_usage -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d resellerid=1


Topup Franchisee Wallet

POST /api/reseller/wallet_update

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value
api_key Y api_key for the above Userid
ispid N ISP ID. Optional, If above Login userid belongs to an ISP
resellerid Y Reseller ID to update
action Y Allowed values: TopUp,Settlement,Adj
amt Y Amt to TopUp/Settlement/Adj. Numerical value.

Typical API Call

curl -X POST $BASE_URL/api/reseller/wallet_update -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d resellerid=3 -d action="TopUp" -d amt=10

The expected API Response will be

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

Delete Reseller

POST /api/reseller/delete

Input Parameters Required ? Description
userid Y CRM Login User's numerical ID value
api_key Y api_key for the above Userid
ispid N ISP ID. Optional, If above Login userid belongs to an ISP
resellerid Y Reseller ID to delete

Typical API Call

curl -X POST $BASE_URL/api/reseller/delete -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d resellerid=3

The expected API Response will be

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

© 2020 neuCRM. All rights reserved.