Empoweing blinds industry

Did You Know?

Purchase Orders

This domain serves for Purchase Order requests

New PO Number

POSTThis API call generates a new purchase order number based on the existing maximum purchase order number in the database.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be newponum Required
objectdata Empty object. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "newponum",
                "data": {}
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
stringdata New generated PO number.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "New Po no created",
                    data: "PO05240015"
                }
            }
            
        

Add Purchase Order

POSTThis API call adds a new purchase order to the database.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be addpo Required
objectdata Contains input parameters. Required
stringquote_no The quote number associated with the purchase order. Required
stringpo_subject The subject of the purchase order. Required
stringsupplier_no The supplier number associated with the purchase order. Required
stringpo_eta_date The estimated time of arrival for the purchase order. Required
stringpo_note The note associated with the purchase order. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "addpo",
                data: {
                    quote_no: "Q05240073",
                    po_subject: "TEST Purchase Order for Window Components",
                    supplier_no: "S03240002",
                    po_eta_date: "2024-06-15",
                    po_note: "test PO note"
                }
            }
            
        
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 newly added purchase order.
stringpo_no The generated purchase order number.
stringsupplier_no The supplier number associated with the purchase order.
stringpo_subject The subject of the purchase order.
stringpo_comment The comment associated with the purchase order.
stringpo_eta_date The estimated time of arrival for the purchase order.
stringpo_arrived_date The date when the purchase order arrived.
stringpo_note The note associated with the purchase order.
stringquote_no The quote number associated with the purchase order.
stringadded_date The date when the purchase order was added.
intpo_status The status of the purchase order.
intuser_id The ID of the user who added the purchase order.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Po added",
                    data: {
                        id: 17,
                        po_no: "PO05240016",
                        supplier_no: "S03240002",
                        po_subject: "TEST Purchase Order for Window Components",
                        po_comment: null,
                        po_eta_date: "2024-06-15",
                        po_arrived_date: null,
                        po_note: null,
                        quote_no: "Q05240073",
                        added_date: "2024-05-24",
                        po_status: 0,
                        user_id: 69
                    }
                }
            }
            
        

Delete Purchase Order

POSTThis API call deletes a purchase order from the database.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be deletepo Required
objectdata Contains input parameters. Required
stringpo_no The purchase order number to be deleted. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "deletepo",
                data: {
                    po_no: "PO05240016"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata Additional data related to the deletion operation. 1 for success.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "PO Deleted",
                    data: 1
                }
            }
            
        

Update Purchase Order Date

POSTThis API call updates the added date of a purchase order in the database.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be update_po_date Required
objectdata Contains input parameters. Required
intid The ID of the purchase order to be updated. Required
stringadded_date The new added date to be set for the purchase order. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "update_po_date",
                data: {
                    id: "18",
                    added_date: "2024-08-15"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata Additional data related to the update operation. 1 for success.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Po Updated",
                    data: 1
                }
            }
            
        

Update Purchase Order Arrival Date

POSTThis API call updates the arrival date of a purchase order in the database and adds a story to the associated quote.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be update_po_arrive_date Required
objectdata Contains input parameters. Required
intid The ID of the purchase order to be updated. Required
stringpo_no The purchase order number to be updated. Required
stringarrive_date The new arrival date to be set for the purchase order. Required
stringquote_no The quote number associated with the purchase order. Required
stringjob_no The job number associated with the purchase order. Required
stringsupplier_no The supplier number associated with the purchase order. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "update_po_arrive_date",
                data: {
                    id: "18",
                    po_no: "PO05240016",
                    arrive_date: "2024-09-15",
                    quote_no: "Q05240073",
                    job_no: "Q05240073",
                    supplier_no: "S03240002"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata Additional data related to the update operation.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Po arrive date Updated",
                    data: 0
                }
            }
            
        

Update Purchase Order Comment

POSTThis API call updates the added date of a purchase order in the database.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be update_po_comment Required
objectdata Contains input parameters. Required
intid The ID of the purchase order to be updated. Required
stringcomment The new comment to be set for the purchase order. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "update_po_comment",
                data: {
                    id: "18",
                    comment: "TEST comment PO"
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata Additional data related to the update operation. 1 for success.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "Po comment Updated",
                    data: 1
                }
            }
            
        

Get Po Products

POSTThis API call retrieves products associated with a purchase order.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be get_po_products Required
objectdata Contains input parameters. Required
intuser_id The user ID. Required
stringpo_no The purchase order number. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "get_po_products",
                data: {
                    user_id: 69,
                    po_no: "PO03240013"
                }
            }
            
        
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.
intdraw Current draw count for data table processing.
intrecordsTotal Total number of records available.
intrecordsFiltered Total number of records after filtering.
listdata > data This contain list of result objects retrieved for query.
stringDT_RowId The row ID identifier in the data table.
stringid The unique ID of the purchase order.
stringp_id The product ID.
stringp_name The product name.
stringp_desc The product description.
stringp_qty The product quantity.
stringp_unit_type The product unit type.
stringp_unit_price The product unit price.
stringp_note The product note.
stringp_jobs_no The product job number.
stringpo_no The purchase order number.
stringsupplier_no The supplier number.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "PO Products Read",
                    data: {
                        draw: 0,
                        recordsTotal: 7,
                        recordsFiltered: 7,
                        data: [
                            {
                            DT_RowId: "row_7",
                            id: "7",
                            p_id: "1",
                            p_name: "TEST2",
                            p_desc: "TEST2",
                            p_qty: "3",
                            p_unit_type: "set",
                            p_unit_price: "20",
                            p_note: "Test add PRoduct",
                            p_jobs_no: "",
                            po_no: "PO03240013",
                            supplier_no: "S03240001"
                            }
                        ]
                    }
                }
            }
            
        

Add Po Product

POSTThis API call adds a product to a purchase order.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be add_po_product Required
objectdata Contains input parameters. Required
intuser_id The user ID. Required
stringpo_no The purchase order number. Required
stringsupplier_no The supplier number. Required
intp_id The product ID. Required
intp_qty The product quantity. Required
stringp_note The product note. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "add_po_product",
                data: {
                    user_id: 69,
                    po_no: "PO03240013",
                    supplier_no: "S03240001",
                    p_id: 1,
                    p_qty: 3,
                    p_note: "Add Test Product"
                }
            }
            
        
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.
intpo_product_id The ID of the added product in the purchase order.
stringp_name The product name.
stringp_description The product description.
stringp_note The product note.
stringp_unit_price The product unit price.
intp_qty The product quantity.
stringp_unit_type The product unit type.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "PO Products Added",
                    data: {
                        po_product_id: 14,
                        p_name: "TEST2",
                        p_description: "TEST2",
                        p_note: "Add Test Product",
                        p_unit_price: "20",
                        p_qty: 3,
                        p_unit_type: "set"
                    }
                }
            }
            
        

Delete Po Product

POSTThis API call deletes a product from a purchase order.

Request Paramters
stringpos Value should be customer Required
stringaction Value should be delete_po_product Required
objectdata Contains input parameters. Required
intuser_id The user ID. Required
intpo_product_id The ID of the product in the purchase order to be deleted. Required
Sample Request Body
            
            {
                domain: "pos",
                action: "delete_po_product",
                data: {
                    user_id: 69,
                    po_product_id: 14
                }
            }
            
        
Response Paramters
stringstatus This indicate the status of the response. success is the expected value.
stringmessage This explains the reson for status.
intdata Additional data related to the delete operation. 1 for success.
Sample Response
            
            {
                status: "success",
                data: {
                    status: "success",
                    message: "PO Poduct Deleted",
                    data: 1
                }
            }
            
        
API END POINTS