POST /api/customer/list
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 |
resellerid | N | Reseller ID |
customerid | N | Customer ID |
serviceid | N | Service ID |
username | N | PPPoE Username. Wildcard search is available. You can use % in search query. For example you can pass values as xyz_% to search in username begins with xyz_ |
type | N | Customer Type. Allowed values are: Individual, Organisation |
name | N | Customer Name. Wildcard search is available. You can use % in search query. |
mobile | N | Mobile Number |
N | Customer Email | |
zipcode | N | Zipcode or Postal code |
state | N | State |
city | N | City |
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, mobile, email. 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 |
curl -X POST $BASE_URL/api/customer/list -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4"
POST /api/customer/create
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, only If above Login userid belongs to an ISP, otherwise Required. |
resellerid | N | Reseller ID. Optional, only If above Login userid belongs to a Reseller, otherwise Required. |
type | Y | Customer Type. Allowed values are: Individual, Organisation |
name | Y | Customer name |
surname | N | Surname |
dob | N | Date of Birth/Date of Reg. yyyy-mm-dd format |
mobile | Y | Mobile number |
Y | ||
uniqueid | N | Customer's UniqueID |
zipcode | Y | Zipcode or Postal code |
state | Y | State |
city | Y | City |
street | Y | Street Address |
notes | N | Notes |
curl -X POST $BASE_URL/api/customer/create -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d resellerid=1 -d type="Individual" -d name="Some Name" -d mobile="12344444" -d email="abc@email.com" -d zipcode="12345" -d state="Goa" -d city="Panaji" -d street="3rd street"
The expected API Response will be
{ "result": 1243, "error": null }
Returns newly created Customer id
value, upon success. Upon failure result contains null value, and error contains error description.
POST /api/customer/update
Input Parameters | Required ? | Description |
---|---|---|
userid | Y | CRM Login User's numerical ID value |
api_key | Y | api_key for the above Userid |
customerid | Y | Customer ID of the Customer Record to update |
type | N | Customer Type. Allowed values are: Individual, Organisation |
name | N | Customer Name |
surname | N | Surname |
dob | N | Date of Birth/Date of Reg. yyyy-mm-dd format |
mobile | N | Customer Mobile Number |
N | Customer Email ID | |
uniqueid | N | Customer's Unique ID |
reset_password | N | Reset Customer Portal Login Password. Allowed values: Y, N |
zipcode | N | Zipcode or Postal code |
state | N | State |
city | N | City |
street | N | Street Address |
notes | N | Notes |
To update the street field of the customer record having customerid=1235
curl -X POST $BASE_URL/api/customer/update -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d customerid=1243 -d street="2nd street"
The expected API Response will be
{ "result": "done", "error": null }
POST /api/customer/delete
Input Parameters | Required ? | Description |
---|---|---|
userid | Y | CRM Login User's numerical ID value |
api_key | Y | api_key for the above Userid |
customerid | Y | Customer ID to delete |
curl -X POST $BASE_URL/api/customer/delete -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d customerid=1423
The expected API Response will be
{ "result": "done", "error": null }