API : Customer

Customer Management API


Get Customer list

POST /api/customer/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
customerid N Customer ID
username N PPPoE Username
name N Customer Name. Accepted Partial text
mobile N Mobile Number
email N Customer Email
zipcode N Zipcode or Postal code
state N State
city N City. Accepted Partial text
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: 100. Max value: 100
rows_offset N Fetches 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

Typical API Call

curl -X POST $BASE_URL/api/customer/list -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4"


Create Customer

POST /api/customer/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
resellerid N Reseller ID. Optional, If above Login userid belongs to an Reseller
name Y Customer name
surname N Surname
mobile Y Mobile number
email Y Email
uniqueid N Customer's UniqueID
zipcode Y Zipcode or Postal code
state Y State
city Y City
street Y Street Address

Typical API Call

curl -X POST $BASE_URL/api/customer/create -d userid=5 -d api_key="0f9895fb407c83e5ea128082098b47681aa75d6944576423c4" -d resellerid=1 -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.


Update Customer

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 to update
name N Customer Name
surname N Surname
mobile N Customer Mobile Number
email 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

Typical API Call

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
}

Delete Customer

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

Typical API Call

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
}

© 2020 neuCRM. All rights reserved.