Quotes
This domain serves for Quote requests.
Generate New Quote Number
POSTThis API callgenerates a new quote number based on the existing quotes stored in the database.The quote number is a unique identifier assigned to each quotation issued by the system.It follows a specific format consisting of the letter "Q" followed by the current year and a sequentially increasing numeric portion.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be new-quote-no |
Required |
object data |
Empty Object. | Required |
Sample Request Body
{
domain: "quote",
action: "new-quote-no",
"data": {}
}
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
string data |
Generated Quote Number. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "New Quote Number Successfully Generated",
data: "Q05240074"
}
}
Create Quote
POSTThis API call create new quote with provided data.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be create |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The user ID. | Required |
int customer_id |
The customer ID. | Required |
int customer_no |
The customer number. | Required |
string q_name_1 |
The first name or business name of the customer. | Required |
string q_name_2 |
The second name or department of the customer. | Required |
string q_address_1 |
The primary address line of the customer. | Required |
string q_address_2 |
The secondary address line of the customer. | Required |
string q_suburb |
The suburb of the customer. | Required |
string q_postcode |
The postcode of the customer. | Required |
string q_email |
The email address of the customer. | Required |
string q_phone |
The phone number of the customer. | Required |
string q_mobile |
The mobile number of the customer. | Required |
string c_hdfu |
The priority level of the customer. | Required |
string q_lat |
The latitude of the customer's location. | Required |
string q_lng |
The longitude of the customer's location. | Required |
string c_ref |
The customer reference, in the format "number|code". | Required |
string order_number |
The order number associated with the quote. | Required |
string sidemark |
The sidemark associated with the quote. | Required |
string q_notes |
Additional notes about the quote. | Required |
string quote_subject |
The subject of the quote. | Required |
string staff_id |
The ID of the staff member associated with the quote. | Required |
Sample Request Body
{
domain: "quote",
action: "create",
data: {
user_id: 69,
customer_id: 23325,
customer_no: 3563,
q_name_1: "John Doe",
q_name_2: "Acme Corporation",
q_address_1: "123 Main Street",
q_address_2: "Suite 100",
q_suburb: "Anytown",
q_postcode: "12345",
q_email: "john.doe@example.com",
q_phone: "123-456-7890",
q_mobile: "987-654-3210",
c_hdfu: "High Priority",
q_lat: "40.7128",
q_lng: "-74.0060",
c_ref: "12345|ABC",
order_number: "12345",
sidemark: "ABC",
q_notes: "Additional notes about the quote.",
quote_subject: "New Project",
staff_id: "staff_id test"
}
}
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 |
Object containing results. |
int id |
The ID of the item. |
string no |
The unique number associated with the item. |
string q_name_2 |
The secondary name associated with the item, such as the company or organization name. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Quotes Created",
data: {
id: 93,
no: "Q05240074",
q_name_2: "Acme Corporation"
}
}
}
Update Quote
POSTThis API call updates a quote in the database.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be update |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user performing the update. | Required |
int id |
The ID of the quote to be updated. | Required |
string q_name_1 |
The first name associated with the quote. | Required |
string q_name_2 |
The second name associated with the quote. | Required |
string q_address_1 |
The first line of the address associated with the quote. | Required |
string q_address_2 |
The second line of the address associated with the quote. | Required |
string q_suburb |
The suburb associated with the quote. | Required |
string q_postcode |
The postcode associated with the quote. | Required |
string q_email |
The email address associated with the quote. | Required |
string q_phone |
The phone number associated with the quote. | Required |
string q_mobile |
The mobile number associated with the quote. | Required |
string c_hdfu |
The HDFU (House, Duplex, Flat, Unit) associated with the quote. | Required |
string|null q_lat |
The latitude associated with the quote. | Optional |
string|null q_lng |
The longitude associated with the quote. | Optional |
string order_number |
The order number associated with the quote. | Required |
string sidemark |
The sidemark associated with the quote. | Required |
string q_notes |
The notes associated with the quote. | Required |
string quote_subject |
The subject of the quote. | Required |
Sample Request Body
{
domain: "quote",
action: "update",
data: {
user_id: 69,
id: "83",
q_name_1: "q_name_1 test",
q_name_2: "q_name_2 test",
q_address_1: "q_address_1 test",
q_address_2: "q_address_2 test",
q_suburb: "q_suburb test",
q_postcode: "q_postcode test",
q_email: "q_email test",
q_phone: "q_phone test",
q_mobile: "q_mobile test",
c_hdfu: "c_hdfu test",
q_lat: "q_lat test",
q_lng: "q_lng test",
order_number: "order_number test",
sidemark: "sidemark test",
q_notes: "q_notes test",
quote_subject: "quote_subject test"
}
}
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
string data |
Updated quote number. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Quote Updated",
data: "Q05240075"
}
}
Copy Quote
POSTThis API call copies a quote and its details to create a new quote.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be copy |
Required |
object data |
Contains input parameters. | Required |
string customer_id |
The ID of the customer for whom the quote is being copied. | Required |
string customer_no |
The customer number associated with the customer. | Required |
int quote_id |
The ID of the quote being copied. | Required |
string old_quote_no |
The old quote number associated with the quote being copied. | Required |
Sample Request Body
{
domain: "quote",
action: "copy",
data: {
user_id: 69,
customer_id: "23325",
customer_no: "3563",
quote_id: "DUMMYID",
old_quote_no: "Q05240065"
}
}
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
int data |
Returns 1 upon successful copying of the quote. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Quote Copied",
data: 1
}
}
Add Quote Story
POSTThis API call adds a new story to a quote.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be add-quote-story |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user performing the action. | Required |
string quote_no |
The quote number to which the story is added. | Required |
string story_text |
The text of the story to be added. | Required |
Sample Request Body
{
"domain":"quote",
"action": "add-quote-story",
"data":{
"user_id":69,
"quote_no":"Q05240065",
"story_text":"Test Story"
}
}
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 |
Object containing result data. |
int id |
The ID of the record. |
array staff |
Information about the staff associated with the record. |
string first_name |
The first name of the staff member. |
string last_name |
The last name of the staff member. |
string account_type |
The type of the staff member's account. |
string account |
The account name of the staff member. |
string phone |
The phone number of the staff member. |
string email |
The email address of the staff member. |
string|null google_calendar_id |
The Google Calendar ID of the staff member, if available. |
Sample Response
{
"status": "success",
"data": {
"status": "success",
"message": "Quote Story Added",
"data": {
"id": 633,
"staff": {
"first_name": "Tom",
"last_name": "O'loughlin",
"account_type": "0",
"account": "demo",
"phone": "01217725370",
"email": "tom@capricornblinds.com",
"google_calendar_id": null
}
}
}
}
Quote Assign
POSTAssigns a staff member to a quote.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be assign |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user performing the assignment. | Required |
int customer_id |
The ID of the customer associated with the quote. | Required |
int customer_no |
The customer number associated with the customer. | Required |
int quote_id |
The ID of the quote being assigned. | Required |
string quote_no |
The quote number associated with the quote. | Required |
string staff_id |
The ID of the staff member being assigned to the quote. | Required |
Sample Request Body
{
domain: "quote",
action: "assign",
data: {
user_id: 69,
customer_id: 23325,
customer_no: 3563,
quote_id: 84,
quote_no: "Q05240065",
staff_id: "staff_id test"
}
}
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
string data |
No specific data is returned upon successful assignment. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Quote Assigned",
data: null
}
}
Get Quote
POSTThis API call retrieves information about a quote.The `get_quote` function retrieves details related to a specific quote based on the provided quote number.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be get |
Required |
object data |
Contains input parameters. | Required |
string quote_no |
The quote number for which information should be retrieved. | Required |
Sample Request Body
{
domain: "quote",
action: "get",
data: {
quote_no: "Q05240064"
}
}
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 |
Result data Object |
string id |
The ID of the quote. |
string quote_no |
The quote number. |
string quote_subject |
The subject of the quote. |
string q_name_1 |
The first name associated with the quote. |
string q_name_2 |
The last name associated with the quote. |
string q_address_1 |
The first line of the address associated with the quote. |
string q_address_2 |
The second line of the address associated with the quote. |
string q_suburb |
The suburb associated with the quote. |
string q_postcode |
The postcode associated with the quote. |
string q_email |
The email associated with the quote. |
string q_phone |
The phone number associated with the quote. |
string q_mobile |
The mobile number associated with the quote. |
string q_fax |
The fax number associated with the quote. |
string c_ref |
The reference associated with the quote. |
string c_hdfu |
The HDFU associated with the quote. |
string q_notes |
Any notes associated with the quote. |
string created_date |
The date when the quote was created. |
string email_status |
The status of email associated with the quote. |
string quote_status |
The status of the quote. |
string last_updated_by |
The name of the user who last updated the quote. |
string last_updated_date |
The date when the quote was last updated. |
string submitted_by |
The name of the user who submitted the quote. |
string user_id |
The ID of the user associated with the quote. |
string customer_id |
The ID of the customer associated with the quote. |
string assigned_staff_id |
The ID of the staff assigned to the quote. |
string lat |
The latitude associated with the quote. |
string lng |
The longitude associated with the quote. |
string q_name_2_x1 |
The first part of the last name associated with the quote. |
string q_name_2_x2 |
The second part of the last name associated with the quote. |
string order_number |
The order number associated with the quote. |
string sidemark |
The sidemark associated with the quote. |
string instruction |
The instruction associated with the quote. |
string event_id |
The ID of the event associated with the quote. |
string calendar_id |
The ID of the calendar associated with the quote. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Quotes Get Success",
data: {
id: "83",
quote_no: "Q05240064",
quote_subject: "quote_subject test",
q_name_1: "q_name_1 test",
q_name_2: "q_name_2 test",
q_address_1: "q_address_1 test",
q_address_2: "q_address_2 test",
q_suburb: "q_suburb test",
q_postcode: "q_postcode test",
q_email: "q_email test",
q_phone: "q_phone test",
q_mobile: "q_mobile test",
q_fax: null,
c_ref: "c_ref test",
c_hdfu: "c_hdfu test",
q_notes: "q_notes test",
created_date: "2024-05-22",
email_status: "0",
quote_status: "0",
last_updated_by: "Tom",
last_updated_date: "2024-05-23 22:41:30",
submitted_by: "Thasneem",
user_id: "1",
customer_id: "23325",
assigned_staff_id: "0",
lat: "0.000000",
lng: "0.000000",
q_name_2_x1: "q_name_2",
q_name_2_x2: "test",
order_number: "c_ref test",
sidemark: "c_ref test",
instruction: null,
event_id: null,
calendar_id: null
}
}
}
Update Quote Details
POSTThis API call updates various details related to a quote in the database.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be update_quote_details |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user performing the update. | Required |
string cid |
The unique identifier of the quote. | Required |
string qdate |
The updated date of the quote. | Required |
string qtime |
The updated time of the quote. | Required |
string quote_no |
The quote number to be updated. | Required |
string column |
The column name to be updated. | Required |
string value |
The new value to be set in the specified column. | Required |
string user_first_name |
The first name of the user performing the update. | Required |
Sample Request Body
{
domain: "quote",
action: "update_quote_details",
data: {
user_id: 69,
user_first_name: "Test FName",
cid: "",
qdate: "test qdate",
qtime: "Test qtime",
quote_no: "Q03240044",
column: "quote_status",
value: "1"
}
}
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 |
Object containing result data. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Quotes Details Updated",
data: null
}
}
Unassign Staff
POSTThis API call unassigns the staff assigned to a quote.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be unassign_staff |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user. | Required |
int status_id |
The status ID. | Required |
Sample Request Body
{
domain: "quote",
action: "unassign_staff",
data: {
user_id: 69,
status_id: 0
}
}
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 |
Object containing result data. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Unassign Staff",
data: null
}
}
Quick Reference
POSTThis API call allows users to swiftly create a quote record linked to a specific customer. It retrieves user details, customer information, and generates unique identifiers for the customer and quote.
Request Paramters
string domain |
Value should be quote |
Required |
string action |
Value should be quick_reference |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user creating the quick reference. | Required |
string user_first_name |
The first name of the user initiating the quick reference. | Required |
string q_notes |
Additional notes or comments related to the quick reference. | Required |
Sample Request Body
{
domain: "quote",
action: "quick_reference",
data: {
user_id: 69,
user_first_name: "Test",
q_notes: "Test notes for quick reference."
}
}
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 |
Object containing result data. |
int user_id |
The ID of the user performing the update, in this case, 69 . |
string cid |
The unique identifier of the quote, represented by "Q06240088" . |
int customer_id |
The ID of the customer associated with the quote, here 94 . |
string customer_no |
The customer number associated with the quote, shown as "C240064" . |
int quote_id |
The ID of the quote, specified as 107 . |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Quick Reference",
data: {
user_id: 69,
cid: "Q06240088",
customer_id: 94,
customer_no: "C240064",
quote_id: 107
}
}
}