Empoweing blinds industry

Did You Know?

Jobs

This domain serves for Jobs related requests.

New Job No

POSTThis api call generates a new job number based on the latest job number in the database.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be newjob Required
objectdata Empty object Optional
Sample Request Body
            
            {
                domain: "job",
                action: "newjob"
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
stringdata Generated Job Number
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "new Job Created",
                    data: "J240013"
                }
            }
            
        

Get Job

POSTThis api call retrieves a job from the database based on the provided quote number.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be get Required
objectdata Contains input parameters. Required
stringquote_no The quote number associated with the job. Required
Sample Request Body
            
            {
                domain: "job",
                action: "get",
                data: {
                    quote_no: "Q05240053"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
objectdata This contain result data object of the API call.
intid The ID of the job.
stringquote_no The quote number associated with the job.
stringjob_no The job number.
stringsubmitted_date The date the job was submitted.
stringsubmitted_by The ID of the user who submitted the job.
stringjob_status The status of the job.
stringdate_x A date field associated with the job.
intstatus The status code of the job.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Job Read",
                    data: {
                        id: "11",
                        quote_no: "Q05240053",
                        job_no: "J0011",
                        submitted_date: "2024-05-27",
                        submitted_by: "8705",
                        job_status: "Approved",
                        date_x: "0000-00-00",
                        status: "1"
                    }
                }
            }
            
        

Update Job Product

POSTThis api call updates the status of a job product.It either inserts or updates the status of a product based on the job number and quote number.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be update_job_product Required
objectdata Contains input parameters. Required
stringjob_no The job number. Required
stringquote_no The quote number. Required
stringcalc_code The calculation code of the product. Required
stringid The ID of the attachment. Required
stringtype The type of item to update (either 'product' or 'attachment'). Required
stringstatus The new status of the item. Required
stringstatus_text The textual representation of the status. Required
stringproduct The name of the product being updated. Required
Sample Request Body
            
            {
                domain: "job",
                action: "update_job_product",
                data: {
                    job_no: "J0011",
                    quote_no: "Q05240053",
                    calc_code: "584f4f914be7e",
                    id: "37",
                    type: "product",
                    status: "8",
                    status_text: "Ordered",
                    product: "Rollers (2)"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata The number of rows affected by the update.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Job Product Updated",
                    data: 2
                }
            }
            
        

Update Job Product ETA Date

POSTThis api call updates the estimated time of completion (ETA) date for a job. It inserts or updates the ETA date based on the job number, quote number, and item type.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be update_job_product_eta_date Required
objectdata Contains input parameters. Required
stringjob_no The job number. Required
stringquote_no The quote number. Required
stringcalc_code The calculation code of the product. Required
stringid The ID of the attachment (if applicable)/td> Optional
stringtype The type of item to update (either product or attachment). Required
stringdate The new ETA date in YYYY-MM-DD format. Required
stringproduct The name of the product being updated. Required
Sample Request Body
            
            {
                domain: "job",
                action: "update_job_product",
                data: {
                    job_no: "J0011",
                    quote_no: "Q05240053",
                    calc_code: "584f4f914be7e",
                    id: "37",
                    type: "product",
                    status: "8",
                    status_text: "Ordered",
                    product: "Rollers (2)"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
objectdata This contain result data object of the API call.
intupdated_row The number of rows affected by the update.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Job Product Updated",
                    data: {
                        updated_row: 2
                    }
                }
            }
            
        

Update Job Status

POSTThis api call updates the status of a job in the database.It updates the status of a job based on the job ID provided.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be update_job_status Required
objectdata Contains input parameters. Required
stringid The ID of the job to update. Required
stringjob_status The new status of the job. Required
Sample Request Body
            
            {
                domain: "job",
                action: "update_job_status",
                data: {
                    id: "37",
                    job_status: "8"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
objectdata This contain result data object of the API call.
intupdated_row The number of rows affected by the update.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Job Product Updated",
                    data: {
                        updated_row: 1
                    }
                }
            }
            
        

Update ECD

POSTThis api call updates the estimated completion date (ECD) of a job in the database.It updates the ECD of a job based on the job ID provided.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be update_ecd Required
objectdata Contains input parameters. Required
stringid The ID of the job to update. Required
stringecd The new estimated completion date (ECD) in any valid date format (YYYY-MM-DD). Required
Sample Request Body
            
            {
                domain: "job",
                action: "update_job_status",
                data: {
                    id: "37",
                    ecd: "2024-05-30"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata The number of rows affected by the update.
Sample Response
            
            {
                "status": "success",
                "data": {
                    "status": "success",
                    "message": "Job Status Updated",
                    "data": 1
                }
            }
            
        

Approve Job

POSTThis api call approves a job in the database.If the job associated with the provided quote number doesn't exist, a new job is created and approved.If the job is already approved, it will be unapproved.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be approve_job Required
objectdata Contains input parameters. Required
stringuser_id The ID of the user approving the job. Required
stringquote_no The quote number associated with the job. Required
Sample Request Body
            
            {
                domain: "job",
                action: "approve_job",
                data: {
                    user_id: "69",
                    quote_no: "Q05240053"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
objectdata This contain result data object of the API call.
intjob_id The ID of the approved job.
stringjob_no The job number of the approved job.
intstatus The status of the approved job (1 for approved, 0 for unapproved).
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Job Status Updated",
                    data: {
                        job_id: 11,
                        job_no: "J0011",
                        status: 1
                    }
                }
            }
            
        

Read All Jobs

POSTThis api call retrieves all jobs based on the specified filters.It supports filtering by date range, customer ID, and job status. The call also include a query type parameter to fetch all jobs or specific jobs for a trader.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be read_all Required
objectdata Contains input parameters. Required
stringdate_from The start date for filtering jobs in format of YYYY-MM-DD. Optional
string|nulldate_to The end date for filtering jobs in format of YYYY-MM-DD. Optional
intcustomer_id The ID of the customer to filter jobs. Required
stringstatus The status of the jobs to filter. Optional
stringquery The query type, which can be all, trader, or any other specific query. Required
Sample Request Body
            
            {
                domain: "job",
                action: "read_all",
                data: {
                    date_from: "2024-03-01",
                    date_to: "2024-03-31",
                    customer_id: 75,
                    status: null,
                    query: "all"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
objectdata This contain result data object of the API call.
stringDT_RowId The unique identifier for the row in the data table, formatted as "row_{id}".
stringid The ID of the job.
stringsubmitted_date The date the job was submitted.
stringjob_no The job number.
stringquote_id The ID of the associated quote (if available).
stringquote_no The quote number associated with the job.
stringcustomer_id The ID of the customer associated with the job (if available).
stringcustomer_no The customer number associated with the job.
stringq_name The full name of the customer associated with the quote.
stringq_name_1 The first name of the customer associated with the quote.
stringq_name_2 The last name of the customer associated with the quote.
stringq_address The full address of the customer associated with the quote.
stringq_address_1 The first line of the customer's address associated with the quote.
stringq_address_2 The second line of the customer's address associated with the quote.
stringq_suburb The suburb of the customer's address associated with the quote.
stringq_postcode The postcode of the customer's address associated with the quote.
stringq_email The email address of the customer associated with the quote.
stringq_phone The phone number of the customer associated with the quote.
stringq_mobile The mobile number of the customer associated with the quote.
stringc_ref The customer reference number (if available).
stringorder_number The order number associated with the job.
stringsidemark A sidemark associated with the job for internal reference.
stringjob_status The current status of the job (e.g., Approved).
stringj_status The status code of the job (1 for approved).
stringecd The estimated completion date of the job.
objectcalculation Calculations of the job.
floatgrand_total The grand total amount associated with the job.
floatbalance The remaining balance amount, which may be negative if overpaid.
listproducts Lsit of product realted to the job calculation. Contains Product objects as list elements
stringid The unique identifier for the product.
stringname The name of the product, e.g., "Retrofit Double Glazing".
stringpro_count The count of product units available.
stringeta_date The estimated arrival date of the product.
stringstatus The status code representing the product's current status.
stringcalc_code A unique calculation code associated with the product.
stringtype The type of item, in this case, "product".
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Job Read",
                    data: 
                    [
                        {
                            DT_RowId: "row_4",
                            id: "4",
                            submitted_date: "14 Mar 2024",
                            job_no: "J0004",
                            quote_id: null,
                            quote_no: "Q02240005",
                            customer_id: null,
                            customer_no: null,
                            q_name: "",
                            q_name_1: null,
                            q_name_2: null,
                            q_address: "",
                            q_address_1: null,
                            q_address_2: null,
                            q_suburb: null,
                            q_postcode: null,
                            q_email: null,
                            q_phone: null,
                            q_mobile: null,
                            c_ref: null,
                            order_number: null,
                            sidemark: "",
                            job_status: "Approved",
                            j_status: "1",
                            ecd: "0000-00-00",
                            calculation: {
                                grand_total: 1900.8,
                                balance: -99.20000000000005,
                                products: [
                                    {
                                    id: "36",
                                    name: "Retrofit Double Glazing",
                                    pro_count: "2",
                                    eta_date: "2024-03-20",
                                    status: "8",
                                    calc_code: "6509024c16bef",
                                    type: "product"
                                    }
                                ]
                            }
                        },
                    ]
                }
            }
            
        

Update Job Status

POSTThis api call updates the status of a job in the database.It updates the status of a job based on the job ID provided.

Request Paramters
stringdomain Value should be job Required
stringaction Value should be update_job_status Required
objectdata Contains input parameters. Required
intuser_id The ID of the user updating the job date. Required
intcustomer_id The ID of the customer. Required
stringcustomer_no The customer number. Required
intquote_id The ID of the quote. Required
stringquote_no The quote number. Required
stringcustomer_name The name of the customer. Required
stringjob_no The job number. Required
stringjob_date_x The new date for the job in 'd/m/Y' format. Required
Sample Request Body
            
            {
                domain: "job",
                action: "update_job_date_x",
                data: {
                    user_id: 69,
                    customer_id: 1,
                    customer_no: "C240001",
                    quote_id: 31,
                    quote_no: "Q03240017",
                    job_no: "J0005",
                    job_date_x: "6/5/2024",
                    customer_name: "Test"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata Always return 1 upon successful execution.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Job Date X Updated",
                    data: 1
                }
            }
            
        
API END POINTS