Customer
This domain serves for requests for customer management.
Create Customer
POSTThis API call creates a new customer entry in the database. Finally returning an array containing the ID and number of the newly created customer.
Request Paramters
string domain |
Value should be customer |
Required |
string action |
Value should be create |
Required |
object data |
Contains input parameters. | Required |
string c_contact_name |
The contact name of the customer. | Required |
string c_name_1 |
The first part of the customer name. | Required |
string c_name_2 |
The second part of the customer name. | Optional |
string c_address_1 |
The first line of the customer's address. | Required |
string c_address_2 |
The second line of the customer's address. | Optional |
string c_suburb |
The suburb of the customer's address. | Required |
string c_postcode |
The postcode of the customer's address. | Required |
string c_email |
The email address of the customer. | Required |
string c_phone |
The phone number of the customer. | Required |
string c_mobile |
The mobile number of the customer. | Required |
int c_discount |
The discount percentage for the customer. | Optional |
string c_method |
The method of interaction with the customer (e.g., online, offline). | Required |
string c_notes |
Any notes related to the customer. | Optional |
Sample Request Body
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
object data |
This contain result data object of the API call. |
string id |
Created customers's ID |
string no |
Created customers's Customer Number |
Sample Response
Update Customer
POSTUpdates the details of an existing customer in the database. This function updates the specified customer's information in the database with the provided details.
Request Paramters
string domain |
Value should be customer |
Required |
string action |
Value should be update |
Required |
object data |
Contains input parameters. | Required |
int customer_id |
ID of the customer to be updated. | Required |
string c_contact_name |
Contact name of the customer. | Required |
string c_name_1 |
First name or business name of the customer. | Required |
string c_name_2 |
Second name or department of the customer. | Optional |
string c_address_1 |
Primary address line of the customer. | Required |
string c_address_2 |
Secondary address line of the customer. | Optional |
string c_suburb |
Suburb of the customer. | Required |
string c_postcode |
Postcode of the customer. | Required |
string c_email |
Email address of the customer. | Required |
string c_phone |
Phone number of the customer. | Required |
string c_mobile |
Mobile number of the customer. | Required |
int c_discount |
Discount value for the customer. | Optional |
string c_method |
Method of customer interaction. | Required |
string c_notes |
Notes regarding the customer. | Optional |
Sample Request Body
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
object data |
This contain result data object of the API call. |
int data |
Number of affected records. expeted: 1 |
Sample Response
Read Customer
POSTRetrieves the details of a specific customer from the database based on the provided customer ID. If the customer is found, it returns the customer's details; otherwise, it returns a message indicating that no data was found.
Request Paramters
string domain |
Value should be customer |
Required |
string action |
Value should be read |
Required |
object data |
Contains input parameters. | Required |
int customer_id |
ID of the customer to be retrieved. | Required |
Sample Request Body
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
object data |
This contain result data object of the API call. |
int id |
The unique identifier for the customer record. |
string customer_no |
The customer number associated with the customer. |
string c_contact_name |
The contact name of the customer. |
string c_name_1 |
The first part of the customer name. |
string c_name_2 |
The second part of the customer name. |
string c_address_1 |
The first line of the customer's address. |
string c_address_2 |
The second line of the customer's address. |
string c_suburb |
The suburb of the customer's address. |
string c_postcode |
The postcode of the customer's address. |
string c_email |
The email address of the customer. |
string c_phone |
The phone number of the customer. |
string c_mobile |
The mobile number of the customer. |
int c_discount |
The discount percentage for the customer. |
string c_method |
The method of interaction with the customer (e.g., online, offline). |
string c_notes |
Any notes related to the customer. |
string created_date |
The date and time when the customer record was created. |
string last_updated_by |
The name of the user who last updated the customer record. |
string last_updated_date |
The date and time when the customer record was last updated. |
string submitted_by |
The name of the user who submitted the customer record. |
int user_id |
The user ID associated with the customer record. |
Sample Response
Delete Customer
POSTThis action deletes customerDeletes a customer and all related data including quotes, quote attachments, and story attachments.
Request Paramters
string domain |
Value should be customer |
Required |
string action |
Value should be delete |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user requesting the deletion. | Required |
int customer_id |
ID of the customer to be retrieved. | Required |
Sample Request Body
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
object data |
This contain result data object of the API call. |
Sample Response
Read All Customers
POSTThis request is to get list of customes that maches to given filtersRetrieves a list of customers based on specified date range, if provided.
Request Paramters
string domain |
Value should be customer |
Required |
string action |
Value should be read_all |
Required |
object data |
Contains input parameters. | Required |
string date_from |
The start date of the date range for filtering customers. | Optional |
string date_to |
The end date of the date range for filtering customers. | Optional |
Sample Request Body
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This contain list of result data objects of the API call. |
string DT_RowId |
The ID of the row. |
string id |
The ID of the customer. |
string created_date |
The date when the customer was created. |
string c_contact_name |
The contact name of the customer. |
string customer_no |
The customer number. |
string c_name |
The concatenated first and last name of the customer. |
string c_name_1 |
The first name of the customer. |
string c_name_2 |
The last name of the customer. |
string c_address |
The concatenated address details of the customer. |
string c_address_1 |
The first line of the address. |
string c_address_2 |
The second line of the address. |
string c_suburb |
The suburb of the customer's address. |
string c_postcode |
The postcode of the customer's address. |
string c_method |
The method of communication with the customer. |
string c_notes |
Any notes associated with the customer. |
string c_email |
The email address of the customer. |
string c_phone |
The phone number of the customer. |
string c_mobile |
The mobile number of the customer. |
string lead_count |
The count of leads associated with the customer. |
string job_count |
The count of jobs associated with the customer. |
string po_count |
The count of purchase orders associated with the customer. |
string submitted_by |
The name of the user who submitted the customer. |
string submitted_user_id |
The ID of the user who submitted the customer. |
string assigned_staff |
The name of the staff assigned to the customer. |
integer delete_perm |
Indicates whether the current user has permission to delete the customer (1 for yes, 0 for no). |
Sample Response
Delete Customer
POSTThis action deletes customerDeletes a customer and all related data including quotes, quote attachments, and story attachments.
Request Paramters
string domain |
Value should be customer |
Required |
string action |
Value should be get_customer_names |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user requesting the data. | Required |
Sample Request Body
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This contain result data list of string customer names. |