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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be new-quote-no |
Required |
objectdata |
Empty Object. | Required |
Sample Request Body
{
domain: "quote",
action: "new-quote-no",
"data": {}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
stringdata |
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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be create |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The user ID. | Required |
intcustomer_id |
The customer ID. | Required |
intcustomer_no |
The customer number. | Required |
stringq_name_1 |
The first name or business name of the customer. | Required |
stringq_name_2 |
The second name or department of the customer. | Required |
stringq_address_1 |
The primary address line of the customer. | Required |
stringq_address_2 |
The secondary address line of the customer. | Required |
stringq_suburb |
The suburb of the customer. | Required |
stringq_postcode |
The postcode of the customer. | Required |
stringq_email |
The email address of the customer. | Required |
stringq_phone |
The phone number of the customer. | Required |
stringq_mobile |
The mobile number of the customer. | Required |
stringc_hdfu |
The priority level of the customer. | Required |
stringq_lat |
The latitude of the customer's location. | Required |
stringq_lng |
The longitude of the customer's location. | Required |
stringc_ref |
The customer reference, in the format "number|code". | Required |
stringorder_number |
The order number associated with the quote. | Required |
stringsidemark |
The sidemark associated with the quote. | Required |
stringq_notes |
Additional notes about the quote. | Required |
stringquote_subject |
The subject of the quote. | Required |
stringstaff_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
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
objectdata |
Object containing results. |
intid |
The ID of the item. |
stringno |
The unique number associated with the item. |
stringq_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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be update |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user performing the update. | Required |
intid |
The ID of the quote to be updated. | Required |
stringq_name_1 |
The first name associated with the quote. | Required |
stringq_name_2 |
The second name associated with the quote. | Required |
stringq_address_1 |
The first line of the address associated with the quote. | Required |
stringq_address_2 |
The second line of the address associated with the quote. | Required |
stringq_suburb |
The suburb associated with the quote. | Required |
stringq_postcode |
The postcode associated with the quote. | Required |
stringq_email |
The email address associated with the quote. | Required |
stringq_phone |
The phone number associated with the quote. | Required |
stringq_mobile |
The mobile number associated with the quote. | Required |
stringc_hdfu |
The HDFU (House, Duplex, Flat, Unit) associated with the quote. | Required |
string|nullq_lat |
The latitude associated with the quote. | Optional |
string|nullq_lng |
The longitude associated with the quote. | Optional |
stringorder_number |
The order number associated with the quote. | Required |
stringsidemark |
The sidemark associated with the quote. | Required |
stringq_notes |
The notes associated with the quote. | Required |
stringquote_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
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
stringdata |
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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be copy |
Required |
objectdata |
Contains input parameters. | Required |
stringcustomer_id |
The ID of the customer for whom the quote is being copied. | Required |
stringcustomer_no |
The customer number associated with the customer. | Required |
intquote_id |
The ID of the quote being copied. | Required |
stringold_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
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
intdata |
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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be add-quote-story |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user performing the action. | Required |
stringquote_no |
The quote number to which the story is added. | Required |
stringstory_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
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
objectdata |
Object containing result data. |
intid |
The ID of the record. |
arraystaff |
Information about the staff associated with the record. |
stringfirst_name |
The first name of the staff member. |
stringlast_name |
The last name of the staff member. |
stringaccount_type |
The type of the staff member's account. |
stringaccount |
The account name of the staff member. |
stringphone |
The phone number of the staff member. |
stringemail |
The email address of the staff member. |
string|nullgoogle_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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be assign |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user performing the assignment. | Required |
intcustomer_id |
The ID of the customer associated with the quote. | Required |
intcustomer_no |
The customer number associated with the customer. | Required |
intquote_id |
The ID of the quote being assigned. | Required |
stringquote_no |
The quote number associated with the quote. | Required |
stringstaff_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
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
stringdata |
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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be get |
Required |
objectdata |
Contains input parameters. | Required |
stringquote_no |
The quote number for which information should be retrieved. | Required |
Sample Request Body
{
domain: "quote",
action: "get",
data: {
quote_no: "Q05240064"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
objectdata |
Result data Object |
stringid |
The ID of the quote. |
stringquote_no |
The quote number. |
stringquote_subject |
The subject of the quote. |
stringq_name_1 |
The first name associated with the quote. |
stringq_name_2 |
The last name associated with the quote. |
stringq_address_1 |
The first line of the address associated with the quote. |
stringq_address_2 |
The second line of the address associated with the quote. |
stringq_suburb |
The suburb associated with the quote. |
stringq_postcode |
The postcode associated with the quote. |
stringq_email |
The email associated with the quote. |
stringq_phone |
The phone number associated with the quote. |
stringq_mobile |
The mobile number associated with the quote. |
stringq_fax |
The fax number associated with the quote. |
stringc_ref |
The reference associated with the quote. |
stringc_hdfu |
The HDFU associated with the quote. |
stringq_notes |
Any notes associated with the quote. |
stringcreated_date |
The date when the quote was created. |
stringemail_status |
The status of email associated with the quote. |
stringquote_status |
The status of the quote. |
stringlast_updated_by |
The name of the user who last updated the quote. |
stringlast_updated_date |
The date when the quote was last updated. |
stringsubmitted_by |
The name of the user who submitted the quote. |
stringuser_id |
The ID of the user associated with the quote. |
stringcustomer_id |
The ID of the customer associated with the quote. |
stringassigned_staff_id |
The ID of the staff assigned to the quote. |
stringlat |
The latitude associated with the quote. |
stringlng |
The longitude associated with the quote. |
stringq_name_2_x1 |
The first part of the last name associated with the quote. |
stringq_name_2_x2 |
The second part of the last name associated with the quote. |
stringorder_number |
The order number associated with the quote. |
stringsidemark |
The sidemark associated with the quote. |
stringinstruction |
The instruction associated with the quote. |
stringevent_id |
The ID of the event associated with the quote. |
stringcalendar_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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be update_quote_details |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user performing the update. | Required |
stringcid |
The unique identifier of the quote. | Required |
stringqdate |
The updated date of the quote. | Required |
stringqtime |
The updated time of the quote. | Required |
stringquote_no |
The quote number to be updated. | Required |
stringcolumn |
The column name to be updated. | Required |
stringvalue |
The new value to be set in the specified column. | Required |
stringuser_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
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
objectdata |
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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be unassign_staff |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user. | Required |
intstatus_id |
The status ID. | Required |
Sample Request Body
{
domain: "quote",
action: "unassign_staff",
data: {
user_id: 69,
status_id: 0
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
objectdata |
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
stringdomain |
Value should be quote |
Required |
stringaction |
Value should be quick_reference |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user creating the quick reference. | Required |
stringuser_first_name |
The first name of the user initiating the quick reference. | Required |
stringq_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
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
objectdata |
Object containing result data. |
intuser_id |
The ID of the user performing the update, in this case, 69. |
stringcid |
The unique identifier of the quote, represented by "Q06240088". |
intcustomer_id |
The ID of the customer associated with the quote, here 94. |
stringcustomer_no |
The customer number associated with the quote, shown as "C240064". |
intquote_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
}
}
}