Customer API
The Customer API allows you to create and fetch customer data.
Create Customer
This functionality allows you to create a new customer.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/customer/create
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
username | Varchar | Required | customer’s username | james22 |
firstname | Char | Required | customer’s first name | james |
Varchar | Required | customer’s email address | ||
lastname | Char | Optional | customer’s last name | smith |
password | Varchar | Required | customer’s password | Password@1234 |
con_password | Varchar | Required | confirm customer’s password | Password@1234 |
venture_id | Integer | Optional | venture id | 1 |
companyname | Varchar | Required | customer’s company name | James Technology |
website | Varchar | Optional | customer’s website detail | https://jamestech.com |
address1 | Varchar | Required | customer’s address | D-25, royal road |
address2 | Varchar | Optional | customer’s address | F-410, central road |
country | Char | Required | customer’s country name | India |
state | Char | Required | customer’s state name | Rajasthan |
city | Char | Required | customer’s city name | Jaipur |
zipcode | Varchar | Required | customer’s zipcode | 302030 |
madd1 | Varchar | Optional | customer’s mailing address | D-25, royal road |
madd2 | Varchar | Optional | customer’s mailing address | F-410, central road |
mcountry | Char | Required | customer’s mailing country name | India |
mstate | Char | Required | customer’s mailing state name | Rajasthan |
mcity | Char | Optional | customer’s mailing city name | Jaipur |
mpcode | Varchar | Optional | customer’s mailing zipcode | 302030 |
contact_no | Integer | Required | customer’s mobile number | 9887699098 |
phonenumber | Integer | Required | customer’s landline number | 8669588909 |
currency | Char | Required | customer’s base currency | INR |
status | Char | Required | customer’s status in automation platform | Active |
smsnoti | Char | Optional | enable to receive Announcements & Notifications By SMS | enable |
adminnote | Varchar | Optional | admin note | Registering customer as per request. |
pid | Integer | Optional | partner id | 0 |
NOTE: For main venture, “partner id“ will be 0.
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[status] => Success
[message] => Customer: 679-james smith has been added successfully
) |
In case of any error, an error code key with value along with an error message will be returned.
Get Customer Detail
Get Customer Detail >> Get Customer List
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/customer/list
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
limit | Integer | Optional | if not mentioned, then 100 records will be fetched at once. | 100 |
page | Integer | Optional | page number | 1 |
customer_id | Integer | Optional | customer id | 104177 |
username | Varchar | Optional | customer’s username | james22 |
Varchar | Optional | customer’s email address | james@gmail.com | |
firstname | Varchar | Optional | customer’s first name | james |
lastname | Varchar | Optional | customer’s last name | smith |
phonenumber | Integer | Optional | customer’s phone number / landline number | 8669588909 |
mobilenumber | Integer | Optional | customer’s mobile number | 9887699098 |
address | Varchar | Optional | customer’s address | Central Spine |
companyname | Varchar | Optional | customer’s company name | James Technology |
country_code | Integer | Optional | customer’s country code | 99 |
state | Varchar | Optional | customer’s state | Rajasthan |
city | Varchar | Optional | customer’s city | Jaipur |
pincode | Integer | Optional | customer’s pin code | 302030 |
accounttype | Char | Optional | customer’s account type i.e. “test client or not” | yes |
currency_code | Integer | Optional | currency code associated with customer | 1 |
fromdate | Date | Optional | customer’s date of joining from | 13/2/2019 |
todate | Date | Optional | customer’s date of joining to | 15/2/2019 |
accountmanager | Varchar | Optional | name of account manager linked to customer | Punita Saboo |
status | Char | Optional | customer’s status in automation platform | Active |
venture_id | Integer | Optional | venture id | 1 |
partnerid | Integer | Optional | partner id | 103900 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[Customers] => Array
(
[0] => Array
(
[id] => 119
[venture_id] => 1
[firstname] => rj
[lastname] => rj
[companyname] => rj
[username] => way@mail.com
[email] => testracknap@mailinator.com
[datecreated] => 19/06/2018
[customer_status] => Active
[is_subaccount] => 0
[address1] => sfdsgdf
[address2] => dsgdsgds
[state] => Rajasthan
[city] => delhi
[phonenumber] => 123456
[mobilenumber] => 123456
[currency_id] => 1
[onhold_status] => 0
[pid] => 0
[MpnID] =>
[country_name] => India
[currency_prefix] => USD
[account_manager] => Nitesh kumar
[account_manager_id] => 53
[account_manager_email] => testracknap@mailinator.com
[Customer Type] => Premium
[GSTIN ID] => 06AAECK9183B
)
)
[total_records] => 1
) |