API
Revision 5.423.0 (September 26, 2025)
Introduction to NewWaySERVICE API
Section titled “Introduction to NewWaySERVICE API”The NewWaySERVICE API (Application Programming Interface) is an interface that allow you to exchange data between NewWaySERVICE and other software. This API allows you to read and write data in most of options of NewWaySERVICE such as Customers, Equipment, Work orders, etc. This API is based on industry standard components HTTPS (Secure Hypertext Transfer Protocol) and XML (Extensible Markup Language).
OpenAPI Specifications
Section titled “OpenAPI Specifications”Machine-readable specification files for automated code generation, API testing, and AI assistant integration:
Target Audience
Section titled “Target Audience”This document is intended for developers of applications that will connect to the NewWaySERVICE.com web site.
Internationalization and Character Sets
Section titled “Internationalization and Character Sets”NewWaySERVICE uses UTF-8 encoding to store and display characters in the application.
Prerequisites
Section titled “Prerequisites”To activate the API, from your NewWaySERVICE account, select the tab More then select menu Configuration | Application configuration. Check the box Allow access to data via API from the section named API (Application Programming Interface). Note that the API can be fully used even if you are in trial mode.
API password
Section titled “API password”Each NewWaySERVICE account has a unique API password which can be found in the menu Configuration | Application configuration (section API (Application Programming Interface)). A new API password can be generated by clicking the button Change API password. Note that if you generate a new API password for your account, the previous password will not work anymore to perform API requests.
This API password is used for two things:
- To prevent unauthorized access to your NewWaySERVICE data.
- To know which NewWaySERVICE account data you want to access. Indeed, each NewWaySERVICE password is unique. Two different accounts will never have the same password.
API requests
Section titled “API requests”All API requests must be made via SSL over HTTPS. Requests must be submitted via HTTPS POST in the following format:
<request app="newwayservice" version="5" password="abcdef-123456">Request_details</request>Replace abcdef-123456 by your API password then replace Request_details by valid request instructions. See section API request types below for more information about valid requests instructions.
Here is an example API request that will add a new contact in a customer record:
<request app="newwayservice" version="5" password="abcdef-123456"> <contact_add> <customer_id>5271</customer_id> <name>John Doe</name> <position>President</position> <notification>yes</notification> <phone>418-524-5066</phone> <mobile>418-524-0000</mobile> <fax>418-524-1063</fax> <email>john.doe@NewWaySERVICE.com</email> </contact_add></request>If the example API request above is successful, the API will return an XML as the following:
<response app="newwayservice" version="5" status="1"> <contact_id>3834</contact_id></response>On the other side, if the example API request above fails, the API will return an XML as the following:
<response app="newwayservice" version="5" status="0"> <error code="1102"> <![CDATA[Record duplicate error. A record with the supplied value already exists. There is already a contact with this name for this customer.]]> </error></response>In short, you have to verify the status attribute of the response tag to know if the API request was successful or not. A value of 1 means successful while a value of 0 means that an error occurred. Additional information will be also included in the XML result according to the kind of result and/or the kind of request you made. Refer to the section API request types below for more information about results each request type can produce.
Note about strings
Section titled “Note about strings”Note that all strings contained in responses are enclosed in a CDATA section. When you send a request, you can as well enclose strings in CDATA sections for example when these strings contain special characters. However, if your strings does not include special characters, it is not mandatory to use CDATA section in your XML requests.
Note about date formats
Section titled “Note about date formats”Date are always returned in the following format: YYYY-MM-DD
Ex.: 2013-04-25
DateTime are always returned in the following format YYYY-MM-DD HH:MM:SS
Ex.: 2013-04-25 23:15:00
When you have to pass Date or DateTime to an API request, you must also respect these formats as well else your request could be rejected or return an error message.
Note about number format
Section titled “Note about number format”Decimal numbers are always returned with a dot as the decimal separator and nothing as the thousands separator. Ex.: 23941.60
When you have to pass decimal numbers to an API request, numbers must be passed in this format as well else your request could be rejected or return an error message.
Note about user defined fields
Section titled “Note about user defined fields”If you defined user defined fields, when applicable, these fields will be returned in the response as well. In such case, the tag for these fields will be named udfXXXX where XXXX is the user defined field number generated by the system at user defined field creation time. An attribute named description will be added to the tag as well to let you know the description of the user defined field.
You can insert and update data in user defined fields as well. In such case, just use the tag name that correspond to the user defined field to update. You do not have to specify the description attribute when adding or updating data in user defined fields. See examples in sections customer_get and customer_add below for more information about user defined fields.
Note about indexing data for search purpose
Section titled “Note about indexing data for search purpose”When you manually enter data into the software, data are automatically indexed into the database so that this information can be retrieved quickly when you search for it.
However, when you are inserting, updating or deleting data using the API, to speed up the process, this data is not indexed immediately. Data is indexed later in background. So, some seconds may be required before data inserted via the API is indexed. So, do not worry if you search for something immediately after inserting it and the search returns nothing. Just wait some seconds then perform your search again and the search should return something that time.
API URL (End point)
Section titled “API URL (End point)”Always use the following URL to send your XML requests: https://app.newwayservice.com/api.php
This url requires only one parameter (POST only) named xml_request.
How to send a request and get the response
Section titled “How to send a request and get the response”You can use any programming language you want to send the request to the API.
PHP example
Section titled “PHP example”Here is a PHP example that is using CURL to send a request and retrieve the response. This example generates an HTML page and prints the result in a textarea object:
<?php
$xml = '<request app="newwayservice" version="5" password="abcdef-123456"> <contact_add> <customer_id>5271</customer_id> <name>John Doe</name> <position>President</position> <notification>yes</notification> <phone>418-524-5066</phone> <mobile>418-524-0000</mobile> <fax>418-524-1063</fax> <email>john.doe@NewWaySERVICE.com</email> </contact_add> </request>';
$postfields = array('xml_request'=>$xml); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://app.newwayservice.com/api.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = curl_exec($ch);
?>
<!DOCTYPE html><html> <head> <title>test</title> </head> <body> <textarea rows="200" cols="200"><?php echo $result; ?></textarea> </body></html>Visual Basic example
Section titled “Visual Basic example”Here is a Visual Basic example that retrieves the customer list. The variable API_PW should be set to your API password. This example prints the result in the debugger window:
Sub TestHTTPPost() Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP") URL = "https://app.newwayservice.com/api.php" objHTTP.Open "POST", URL, False objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" objHTTP.send ("xml_request=<request app=""newwayservice"" version=""5"" password=""" & API_PW & """><customer_list></customer_list></request>") Debug.Print objHTTP.responseTextEnd SubList of API request types
Section titled “List of API request types”customer_list
Section titled “customer_list”Get entire list of customers and their contacts in a summary format.
Once the list of customers retrieved, you can use the customer_get request type to retrieve the complete record of a specific customer using the customer_id retrieved.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <customer_list> </customer_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <customer> <customer_id>5271</customer_id> <code><![CDATA[XYZ-001]]></code> <name><![CDATA[XYZ Industries Inc.]]></name> <status>active</status> <contact> <contact_id>6317</contact_id> <name><![CDATA[Mary Poppins]]></name> <main_contact>yes</main_contact> </contact> <contact> <contact_id>6592</contact_id> <name><![CDATA[John Doe]]></name> <main_contact>no</main_contact> </contact> </customer> <customer> <customer_id>5272</customer_id> <code><![CDATA[ABC-999]]></code> <name><![CDATA[ABC Inc.]]></name> <status>inactive</status> <contact> <contact_id>5543</contact_id> <name><![CDATA[Andy White]]></name> <main_contact>yes</main_contact> </contact> </customer></response>customer_get
Section titled “customer_get”Get a customer record.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <customer_get> <customer_id>5271</customer_id> </customer_get></request>customer_id: integer - Required - Id of the customer to retrieve. If the customer id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <customer> <customer_id>5271</customer_id> <code><![CDATA[XYZ-001]]></code> <name><![CDATA[XYZ Industries Inc.]]></name> <address><![CDATA[330 Fortune StreetQuebec QC G1K 9C5]]></address> <special_instructions><![CDATA[Gas before]]></special_instructions> <internal_notes><![CDATA[Bla bla bla]]></internal_notes> <status>active</status> <category_id>0</category_id> <category_description><![CDATA[Default category]]></category_description> <zone_id>104</zone_id> <zone_description><![CDATA[Quebec East]]></zone_description> <if_is_a_branch_parent_customer_id></if_is_a_branch_parent_customer_id> <if_is_a_branch_bill_parent_customer>no</if_is_a_branch_bill_parent_customer> <preferred_technician_id></preferred_technician_id> <preferred_technician_name><![CDATA[]]></preferred_technician_name> <portal_password><![CDATA[123456]]></portal_password> <term_of_payment><![CDATA[NET 30 DAYS]]></term_of_payment> <tax_rate_id_parts>1</tax_rate_id_parts> <tax_rate_description_parts><![CDATA[Default tax rate Parts]]></tax_rate_description_parts> <tax_rate_id_labor>2</tax_rate_id_labor> <tax_rate_description_labor><![CDATA[Default tax rate Labor]]></tax_rate_description_labor> <distance>35</distance> <udf204 description="Salesman"><![CDATA[Bob White]]></udf204> <contact> <contact_id>6317</contact_id> <customer_id>5271</customer_id> <name><![CDATA[Mary Poppins]]></name> <phone><![CDATA[418-524-5066]]></phone> <mobile><![CDATA[418-524-0000]]></mobile> <fax><![CDATA[418-524-1063]]></fax> <email><![CDATA[mary.poppins@NewWaySERVICE.com]]></email> <position><![CDATA[Nanny]]></position> <notification>yes</notification> <main_contact>yes</main_contact> </contact> <contact> <contact_id>6592</contact_id> <customer_id>5271</customer_id> <name><![CDATA[John Doe]]></name> <phone><![CDATA[418-524-5066]]></phone> <mobile><![CDATA[418-524-0000]]></mobile> <fax><![CDATA[418-524-1063]]></fax> <email><![CDATA[john.doe@NewWaySERVICE.com]]></email> <position><![CDATA[Technician]]></position> <notification>no</notification> <main_contact>no</main_contact> </contact> <bank_of_hour> <bank_of_hour_id>85</bank_of_hour_id> <description><![CDATA[Bank ABC]]></description> <status>active</status> <end_date></end_date> <minutes>600</minutes> <minutes_used>120</minutes_used> </bank_of_hour> <labor_rate> <labor_rate_id>0</labor_rate_id> <description><![CDATA[Default rate]]></description> <rate>59.9900</rate> </labor_rate> <document> <document_id>438</document_id> <filename><![CDATA[plan-1.pdf]]></filename> <description><![CDATA[This is the first plan]]></description> <mime_type>application/pdf</mime_type> <size>291921</size> </document> <document> <document_id>7020</document_id> <filename><![CDATA[test.png]]></filename> <description><![CDATA[test.png]]></description> <mime_type>image/jpeg</mime_type> <size>838</size> </document> </customer></response>customer_add
Section titled “customer_add”Add a new customer.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <customer_add> <code>XYZ-001</code> <name>XYZ Industries Inc.</name> <address><![CDATA[330 St-Vallier EastSuite 110Quebec QC G1K 9C5]]></address> <special_instructions><![CDATA[Call before going there.]]></special_instructions> <internal_notes><![CDATA[Bla bla bla]]></internal_notes> <status>active</status> <category_description>Privileged customers</category_description> <zone_id>0</zone_id> <if_is_a_branch_parent_customer_id></if_is_a_branch_parent_customer_id> <if_is_a_branch_bill_parent_customer>no</if_is_a_branch_bill_parent_customer> <preferred_technician_id></preferred_technician_id> <portal_password>123456</portal_password> <term_of_payment><![CDATA[NET 30 DAYS]]></term_of_payment> <udf204>Janet Wilson</udf204> <contact> <name>Alex Martin</name> <phone>418-524-5066</phone> <mobile>418-524-0000</mobile> <fax>418-524-1063</fax> <email>alex.martin@NewWaySERVICE.com</email> <position>Supervison</position> </contact> </customer_add></request>customer section
Section titled “customer section”code: string(30) - If specified, must be unique else the request will fail.
name: string(50) - Required - Customer name. If the customer name already exists, the request will fail.
address: text
special_instructions: text
internal_notes: text
status: If specified, you must specify active or inactive`. Default is active.
category_id: integer - If not specified, the default category will be used.
category_description: string (35) - It allows you to specify the category using the category description instead of its id. The API will retrieve the category_id for you. If category_id is specified this field will be ignored.
zone_id: integer - If not specified, the default zone will be used.
zone_description: string (35) - It allows you to specify the zone using the zone description instead of its id. The API will retrieve the zone_id for you. If zone_id is specified this field will be ignored.
if_is_a_branch_parent_customer_id: integer - If specified, the customer id specified here must exists.
if_is_a_branch_bill_parent_customer: If specified, you must specify yes or no. Default is no. This field is taken into consideration only when the field if_is_a_branch_parent_customer_id is specified as well.
preferred_technician_id: integer - If specified, the technician id must exists and its role must be technician.
portal_password: string (30) - Customer portal password.
term_of_payment: string (30) - Term of payment.
Tax_rate_id_parts: integer - If not specified, the default tax rate (parts) will be used.
Tax_rate_description_parts: string (35) - It allows you to specify the tax rate (parts) using the tax rate description instead of its id. The API will retrieve the tax_rate_id for you. If tax_rate_id is specified this field will be ignored.
Tax_rate_id_labor: integer - If not specified, the default tax rate (labor) will be used.
Tax_rate_description_labor: string (35) - It allows you to specify the tax rate (labor) using the tax rate description instead of its id. The API will retrieve the tax_rate_id for you. If tax_rate_id is specified this field will be ignored.
contact section
Section titled “contact section”You can optionally add the main contact of the customer at the same time. If you do not include any contact information, a main contact will be automatically created using the customer name.
name: string (50) - Required - Name of the contact to add.
position: string (50)
notification: If specified, you must specify yes or no. Default is no.
phone: string (25)
mobile: string (25)
fax: string (25)
email: string (60) - If you provide an e-mail address, the e-mail address must be in a valid e-mail format.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <customer_id>5271</customer_id> <contact_id>3834</contact_id></response>customer_id: Id of the new created customer.
contact_id: Id of the new created contact.
customer_edit
Section titled “customer_edit”Edit an existing customer.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <customer_edit> <customer_id>5271</customer_id> <address><![CDATA[330 St-Vallier EastSuite 110-BQuebec QC G1K 9C5]]></address> </customer_edit></request>customer_id: integer - Required - Id of the customer to edit. If the customer id specified does not exist, the request will fail.
See request type customer_add for information about other fields. Of course, fields not specified in your XML request will not be updated and will not be erased either.
You must use the request type contact_edit to edit a customer contact even when you want to edit the main contact of the customer.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <customer_id>5271</customer_id></response>customer_id: Id of the updated customer.
contact_get
Section titled “contact_get”Get a customer contact record.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <contact_get> <contact_id>6317</contact_id> </contact_get></request>contact_id: integer - Required - Id of the customer contact to retrieve. If the customer contact id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <contact> <contact_id>6317</contact_id> <customer_id>5271</customer_id> <name><![CDATA[Mary Poppins]]></name> <phone><![CDATA[418-524-5066]]></phone> <mobile><![CDATA[418-524-0000]]></mobile> <fax><![CDATA[418-524-1063]]></fax> <email><![CDATA[mary.poppins@NewWaySERVICE.com]]></email> <position><![CDATA[Nanny]]></position> <notification>yes</notification> <main_contact>yes</main_contact> </contact></response>contact_add
Section titled “contact_add”Add a new contact to an existing customer.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <contact_add> <customer_id>5271</customer_id> <name>John Doe</name> <position>President</position> <notification>yes</notification> <phone>418-524-5066</phone> <mobile>418-524-0000</mobile> <fax>418-524-1063</fax> <email>john.doe@NewWaySERVICE.com</email> </contact_add></request>customer_id: integer - Required - Id of an existing customer. Refer to request types customer_add and customer_list for more information.
name: string (50) - required - Name of the contact to add. If the customer already has a contact of the same name, the request will fail.
position: string (50)
notification: If specified, you must specify yes or no. Default is no.
phone: string (25)
mobile: string (25)
fax: string (25)
email: string (60) - If you provide an e-mail address, the e-mail address must be in a valid e-mail format.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <contact_id>3834</contact_id></response>contact_id: Id of the new created contact.
contact_edit
Section titled “contact_edit”Edit an existing customer contact.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <contact_edit> <contact_id>3834</contact_id> <mobile>418-524-0000</mobile> <email>john.doe@NewWaySERVICE.com</email> </contact_edit></request>contact_id: integer - Id of the contact to edit. If the contact id specified does not exist, the request will fail.
See request type customer_add or contact_add for information about other fields.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <contact_id>3834</contact_id></response>contact_id: Id of the updated contact.
document_get
Section titled “document_get”Get a document.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <document_get> <document_id>179</document_id> </document_get></request>document_id: integer - Required - Id of the document to retrieve. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <document> <document_id>917</document_id> <parent_type>customer_id</parent_type> <parent_id>140</parent_id> <filename><![CDATA[small-red-x.jpg]]></filename> <description><![CDATA[My red X icon]]></description> <mime_type>image/jpeg</mime_type> <size>5720</size> <added_via>0</added_via> <added_by>4</added_by> <data file_processing_status="success"><![CDATA[/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wAARCAAUABQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwCb/TfDWpf3o2/BZV/of5e4PN/WPEyy2yxaeWVpFy7kYKew9/f8vY8VatDKhsYlWRgwLuf4COw9/X8vpj2bNpOpQyXtqTgBtjDkA9CPf/PB6c7fK+VPQ9yEFWiqtSPvdu5oWXhWe4tllnm8hm5CFMkD35GD7UV1tvcQ3MKTQuHjcZBFFX7OJwyx2IvvY5LwlZw3F1LNKu5odpQHoCc8/pW94gs4brTJnlX54ULow6ggfy4ooogvcNMVJrFrXscRDc3EKlYbiWNc5wjkDNFFFct2e3yRfQ//2Q==]]></data> </document></response>Note that the file content is returned in base64 format into the data tag. You have to decode this content from base64 format to get the original file content. Look also at the attribute file_processing_status of the tag data to be sure that the file was correctly encoded in base64 format. If for an unknown reason, the file cannot be returned, the error reason will be indicated into this attribute.
document_add
Section titled “document_add”Add a new document.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <document_add> <customer_id>140</customer_id> <filename>small-red-x.jpg</filename> <description>My red X icon</description> <data><![CDATA[/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wAARCAAUABQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwCb/TfDWpf3o2/BZV/of5e4PN/WPEyy2yxaeWVpFy7kYKew9/f8vY8VatDKhsYlWRgwLuf4COw9/X8vpj2bNpOpQyXtqTgBtjDkA9CPf/PB6c7fK+VPQ9yEFWiqtSPvdu5oWXhWe4tllnm8hm5CFMkD35GD7UV1tvcQ3MKTQuHjcZBFFX7OJwyx2IvvY5LwlZw3F1LNKu5odpQHoCc8/pW94gs4brTJnlX54ULow6ggfy4ooogvcNMVJrFrXscRDc3EKlYbiWNc5wjkDNFFFct2e3yRfQ//2Q==]]></data> </document_add></request>filename: string (254) - Required - Original name of the file. From the application, when the user click on the file to open or download it, this is this file name that used and sent to your web browser.
description: string (65) - Required - Short description of the file. Can be the same as filename.
data: file content encoded in base64 format. Retrieve the content of the file to upload, encode it in base 64 format then put the result into this tag. A maximum file size of about 10Mb is allowed.
One of the following tag (and only one) is required to indicate to which item to attach the file. For example, if you want to attach the file to a customer, put the customer id into the customer_id tag. if you want to attach the file to a work order, put the work order id into the workorder_id tag, and so on.
customer_id: integer - if a valid customer_id is not provided, the request will fail.
equipment_type_id: integer - If no valid equipment_type_id is provided, the request will fail.
equipment_id: integer - if a valid equipment_id is not provided, the request will fail.
part_id: integer - If no valid part_id is provided, the request will fail.
purchase_order_id: integer - if a valid purchase_id is not provided, the request will fail.
supplier_id: integer - If no valid supplier_id is provided, the request will fail.
technician_id: integer - if a valid technician_id is not provided, the request will fail.
workorder_id: integer - If no valid workorder_id is provided, the request will fail.
article_id: integer - If no valid article id is provided (article in knowledge base), the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <document_id>1969</document_id></response>document_id: Id of the newly created document.
document_delete
Section titled “document_delete”Delete a document.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <document_delete> <document_id>1933</document_id> </document_delete></request>document_id: integer - Required - Id of the document to delete. If the document id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <document_id>1933</document_id></response>document_id: Id of the deleted document.
equipment_type_list
Section titled “equipment_type_list”Get list of all equipment types.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_type_list> </equipment_type_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment_type> <equipment_type_id>2</equipment_type_id> <code><![CDATA[AC-A]]></code> <description><![CDATA[Air Conditioner Model A]]></description> <status>active</status> </equipment_type> <equipment_type> <equipment_type_id>3</equipment_type_id> <code><![CDATA[AC-B]]></code> <description><![CDATA[Air Conditioner Model B]]></description> <status>active</status> </equipment_type> <equipment_type> <equipment_type_id>4</equipment_type_id> <code><![CDATA[AC-C]]></code> <description><![CDATA[Air Conditioner Model C]]></description> <status>active</status> </equipment_type></response>equipment_type_get
Section titled “equipment_type_get”Get an equipment type.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_type_get> <equipment_type_id>14</equipment_type_id> </equipment_type_get></request>equipment_type_id: integer - Required - Id of the equipment type to retrieve. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment_type> <equipment_type_id>14</equipment_type_id> <code><![CDATA[BAT-001]]></code> <description><![CDATA[Battery Model 001]]></description> <special_instructions><![CDATA[Be careful]]></special_instructions> <internal_notes><![CDATA[AAA 1.5V]]></internal_notes> <status>active</status> <category_id>0</category_id> <category_description><![CDATA[Calculators]]></category_description> <udf218 description="weight"><![CDATA[1 pound]]></udf218> <udf226 description="height"><![CDATA[10 cm]]></udf226> <udf228 description="width"><![CDATA[12 cm]]></udf228> <udf229 description="reseller_name"><![CDATA[123 Ltd.]]></udf229> <udf230 description="battery_life"><![CDATA[250 hours]]></udf230> <udf286 description="manufacturer_link"><![CDATA[http://www.wikipedia.org]]></udf286> </equipment_type></response>equipment_type_add
Section titled “equipment_type_add”Add a new equipment type.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_type_add> <code>DRILL-001</code> <description>Diamond tipped rock drill</description> <special_instructions><![CDATA[Always call before going on site.]]></special_instructions> <internal_notes><![CDATA[Bla bla bla]]></internal_notes> <status>active</status> <category_id>0</category_id> </equipment_type_add></request>code: string (30) - If specified, must be unique else the request will fail.
description: string (65) - Required - Description of the equipment type to add. If the equipment type description already exists, the request will fail.
special_instructions: text
internal_notes: text
status: If specified, you must specify active or inactive. Default is active.
category_id: integer - If not specified, the default category will be used.
category_description: string (35) - It allows you to specify the category using the category description instead of its id. The API will retrieve the category_id for you. If category_id is specified this field will be ignored.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment_type_id>787</equipment_type_id></response>equipment_type_id: Id of the newly created equipment type.
equipment_type_edit
Section titled “equipment_type_edit”Edit an existing equipment type.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_type_edit> <equipment_type_id>4321</equipment_type_id> <status>inactive</status> </equipment_type_edit></request>equipment_type_id: integer - Required - Id of the equipment type to edit. If the equipment type id specified does not exist, the request will fail.
See request type equipment_type_add for information about other fields.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment_type_id>4321</equipment_type_id></response>equipment_type_id: Id of the updated equipment type.
equipment_list
Section titled “equipment_list”Get summary list of equipments
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_list> </equipment_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment> <equipment_id>51</equipment_id> <serial_number><![CDATA[5tgb-6yhn]]></serial_number> <customer_id>103</customer_id> <equipment_type_id>9</equipment_type_id> <parent_equipment_id>0</parent_equipment_id> <status>active</status> </equipment> <equipment> <equipment_id>60</equipment_id> <serial_number><![CDATA[xax-8272]]></serial_number> <customer_id>124</customer_id> <equipment_type_id>14</equipment_type_id> <parent_equipment_id>0</parent_equipment_id> <status>active</status> </equipment></response>equipment_get
Section titled “equipment_get”Get a single equipment.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_get> <equipment_id>144</equipment_id> </equipment_get></request>equipment_id: integer - Required - Id of the equipment to edit. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment> <equipment_id>144</equipment_id> <serial_number><![CDATA[ABC-123-XYZ33-RT99]]></serial_number> <notes_special><![CDATA[]]></notes_special> <notes_internal><![CDATA[]]></notes_internal> <customer_id>138</customer_id> <equipment_type_id>58</equipment_type_id> <has_warranty>no</has_warranty> <warranty_duration>12</warranty_duration> <sale_date></sale_date> <has_service_contract>no</has_service_contract> <service_contract_date></service_contract_date> <service_contract_duration>0</service_contract_duration> <service_contract_reference><![CDATA[]]></service_contract_reference> <status>active</status> <has_counter>no</has_counter> <counter_value></counter_value> <parent_equipment_id>0</parent_equipment_id> <udf233 description="location"><![CDATA[Main site]]></udf233> </equipment></response>equipment_add
Section titled “equipment_add”Add a new equipment.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_add> <serial_number>DR-02345-XSZ-45678-4TE55</serial_number> <customer_id>1234</customer_id> <equipment_type_id>25523</equipment_type_id> <special_instructions><![CDATA[On site warranty]]></special_instructions> <internal_notes><![CDATA[Bla bla bla]]></internal_notes> <has_warranty>yes</has_warranty> <warranty_duration>12</warranty_duration> <sale_date>2013-12-01</sale_date> <has_service_contract>yes</has_service_contract> <service_contract_date>2012-11-20</service_contract_date> <service_contract_duration>36</service_contract_duration> <service_contract_reference>MS-2344</service_contract_reference> <status>active</status> <has_counter>yes</has_counter> <counter_value>12000</counter_value> <parent_equipment_id>0</parent_equipment_id> <udf233>Site B</udf233> </equipment_add></request>code: string (30) - If specified, must be unique else the request will fail.
customer_id: integer - Required, if a valid customer_id is not provided, the request will fail.
equipment_type_id: integer - Required - If no valid equipment_type_id is provided, the request will fail.
special_instructions: text
internal_notes: text
status: You must specify active or inactive. If not specified, the equipment will be active by default.
has_warranty: yes or no
warranty_duration: integer - Number of months
sale_date: date in Date format (see notes about formats at the beginning of this document)
has_service_contract: yes or no, default is no.
service_contract_date: date in Date format (see notes about formats at the beginning of this document)
service_contract_duration: integer - Number of months
service_contract_reference: string(25)
has_counter: yes/no - default is no.
counter_value: integer - Default is 0.
parent_equipment_id integer - If specified, must be a valid existing equipment id.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment_id>3456</equipment_id></response>equipment_id: Id of the newly created equipment.
equipment_edit
Section titled “equipment_edit”Edit an existing equipment.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <equipment_edit> <equipment_id>3456</equipment_id> <counter_value>51482</counter_value> </equipment_edit></request>equipment_id: integer - Required, if a valid equipment_id is not provided, the request will fail.
See request type equipment_add for information about other fields.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <equipment_id>3456</equipment_id></response>equipment_id : Id of the updated equipment
labor_rate_list
Section titled “labor_rate_list”List all labor rates.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <labor_rate_list> </labor_rate_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <labor_rate> <labor_rate_id>0</labor_rate_id> <description><![CDATA[Default rate]]></description> <rate>29.9900</rate> <status>active</status> <group>labor</group> </labor_rate> <labor_rate> <labor_rate_id>104</labor_rate_id> <description><![CDATA[Rate and a half]]></description> <rate>44.9900</rate> <status>inactive</status> <group>labor</group> </labor_rate> <labor_rate> <labor_rate_id>106</labor_rate_id> <description><![CDATA[Rate travel]]></description> <rate>40.0000</rate> <status>active</status> <group>travel</group> </labor_rate></response>part_list
Section titled “part_list”List all parts.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <part_list> </part_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <part> <part_id>114</part_id> <code><![CDATA[BOLT-12]]></code> <description><![CDATA[Bolt 1/2"]]></description> <status>active</status> </part> <part> <part_id>115</part_id> <code><![CDATA[BOLT-14]]></code> <description><![CDATA[Bolt 1/4"]]></description> <status>active</status> </part> <part> <part_id>116</part_id> <code><![CDATA[BOLT-34]]></code> <description><![CDATA[Bolt 3/4""]]></description> <status>active</status> </part></response>part_get
Section titled “part_get”Get a single part.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <part_get> <part_id>2004</part_id> </part_get></request>part_id: integer - Required - Id of the part to retrieve. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <part> <part_id>2004</part_id> <code><![CDATA[POTATO-123-V2]]></code> <description><![CDATA[Willy Waller 2006 Deluxe V2]]></description> <price>300.0000</price> <quantity>32.0000</quantity> <quantity_to_receive>0.0000</quantity_to_receive> <quantity_to_be_planned>10.0000</quantity_to_be_planned> <quantity_to_order>3.0000</quantity_to_order> <minimum_stock_quantity>25.0000</minimum_stock_quantity> <status>active</status> <internal_notes><![CDATA[New and Improved!!]]></internal_notes> <category_id>0</category_id> <part_category_description><![CDATA[Default]]></part_category_description> <supplier_id>0</supplier_id> <supplier_name><![CDATA[Supplier 2000 Inc.]]></supplier_name> <udf215 description="length"><![CDATA[5 1/2 cm]]></udf215> <udf216 description="weight"><![CDATA[200 grams]]></udf216> <part_quantity> <warehouse_id>0</warehouse_id> <quantity>14.0000</quantity> </part_quantity> <part_quantity> <warehouse_id>1</warehouse_id> <quantity>18.0000</quantity> </part_quantity> </part></response>part_add
Section titled “part_add”Add a new part.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <part_add> <code><![CDATA[THETHING-MOTOR-002]]></code> <description><![CDATA[Motor for the thing]]></description> <price>400.0000</price> <minimum_stock_quantity>25</minimum_stock_quantity> <status>active</status> <internal_notes><![CDATA[Model 001 is obsolete]]></internal_notes> <part_category_id>0</part_category_id> <supplier_id>0</supplier_id> </part_add></request>code: string(30) - Not required, but if provided must be unique or the request will fail.
description: string(65) - Required, must be unique or request will fail.
price: decimal - Default 0
minimum_stock_quantity: decimal - Default 0
status: You must specify active or inactive. If not specified, the part will be active by default.
internal_notes: text
part_category_id : integer - Required, but if not specified, the default category will be used
supplier_id: integer - Required, but if not specified, the default supplier will be used
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <part_id>2834</part_id></response>part_edit
Section titled “part_edit”Edit an existing part.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <part_edit> <part_id>2004</part_id> <price>245.34</price> </part_edit></request>part_id: integer - Required - Id of the part to edit. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <part_id>2004</part_id></response>part_id : Id of the successfully updated part.
part_inventory_tx_list
Section titled “part_inventory_tx_list”List inventory part transactions.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <part_inventory_tx_list> <date_from>2012-06-17</date_from> <date_to>2012-06-24</date_to> </part_inventory_tx_list></request>Possible filters (all of them are optional, useful if you want precise results)
date_from: If used, must be a valid Date format and date_to must be specified as well. (see notes about formats at the beginning of this document)
date_to: If used, must be a valid Date format and date_from must be specified as well. (see notes about formats at the beginning of this document)
part_id: If part_id does not exist, request will return nothing
supplier_id: If supplier_id does not exist, request will return nothing
workorder_id: If workorder_id does not exist, request will return nothing
technician_id: If technician_id does not exist, request will return nothing
warehouse_id: If warehouse_id does not exist, request will return nothing
purchase_order_id: If purchase_order_id does not exist, request will return nothing
purchase_order_line_id: If purchase_order_line_id does not exist, request will return nothing
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <part_inventory_tx> <part_inventory_tx_id>1</part_inventory_tx_id> <part_id>101</part_id> <transaction_type>1</transaction_type> <supplier_id>1</supplier_id> <quantity_in>100.0000</quantity_in> <quantity_out>0.0000</quantity_out> <reference><![CDATA[abc-123]]></reference> <workorder_id></workorder_id> <datetime>2012-06-05 11:01:44</datetime> <balance_warehouse>344.0000</balance_warehouse> <technician_id>11</technician_id> <warehouse_id>1</warehouse_id> <global_balance>517.0000</global_balance> <purchase_order_id></purchase_order_id> <purchase_order_line_id></purchase_order_line_id> </part_inventory_tx> <part_inventory_tx> <part_inventory_tx_id>13</part_inventory_tx_id> <part_id>102</part_id> <transaction_type>1</transaction_type> <supplier_id></supplier_id> <quantity_in>56.0000</quantity_in> <quantity_out>0.0000</quantity_out> <reference><![CDATA[]]></reference> <workorder_id>121</workorder_id> <datetime>2012-06-05 11:01:44</datetime> <balance_warehouse>996.0000</balance_warehouse> <technician_id>11</technician_id> <warehouse_id>1</warehouse_id> <global_balance>1496.0000</global_balance> <purchase_order_id></purchase_order_id> <purchase_order_line_id></purchase_order_line_id> </part_inventory_tx></response>part_inventory_tx_add
Section titled “part_inventory_tx_add”Add a part inventory transaction
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <part_inventory_tx_add> <part_id>9890</part_id> <type>0</type> <supplier_id></supplier_id> <quantity>5000</quantity> <reference>REF-123</reference> <technician_id>436</technician_id> <warehouse_id>34</warehouse_id> </part_inventory_tx_add></request>part_id: integer - Required, if no valid part_id is provided the request will fail
type: integer - Required, one of (0=Manual adjustment Other, 2=Manual adjustment Purchase/Receiving/RMA)
supplier_id: integer - Optional, but if provided must be a valid supplier_id
quantity: decimal - Required, if positive will add to inventory, if negative, will remove from inventory
reference: string(50) - Optional
technician_id: integer - Required, but if not set, default technician will be used.
warehouse_id:integer - Required, but if not set, default warehouse will be used.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <part_inventory_tx_id>2008</part_inventory_tx_id></response>purchase_order_list
Section titled “purchase_order_list”List purchase orders in summary format.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_list> <date_from>2013-05-01</date_from> <date_to>2013-05-30</date_to> </purchase_order_list></request>Optional filters:
date_from: If specified, must be a valid Date format and date_to must be specified as well (see notes about formats at the beginning of this document).
date_to: If specified, must be a valid Date format and date_from must be specified as well (see notes about formats at the beginning of this document).
supplier_id: integer - If supplier id provided doesn’t exist, request will return nothing
warehouse_id: integer - If warehouse id provided doesn’t exist, request will return nothing
technician_id: integer - (This is the user that created the purchase order) If technician id provided doesn’t exist, request will return nothing
status: 0 to 3 - If status value provided is not a valid value, request will return nothing. 0=Pending, 1=In propress, 2=Closed, 3=Canceled.
Status_receiving: 0 to 2 - If status receiving value provided is not a valid value, request will return nothing. 0= Not received, 1= Received partially, 2= Received entirely.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order> <purchase_order_id>102</purchase_order_id> <numero>1001</numero> <date>2017-08-11 00:00:00</date> <status>2</status> <status_receiving>2</status_receiving> <supplier_id>13</supplier_id> <supplier_name>Les industries du coin Inc.</supplier_name> <customer_id></customer_id> <ship_to_name>My Company Inc.</ship_to_name> <warehouse_id>12</warehouse_id> <technician_id>3</technician_id> <subtotal>576.50</subtotal> <number_of_lines>5</number_of_lines> </purchase_order> <purchase_order> <purchase_order_id>103</purchase_order_id> <numero>1002</numero> <date>2017-08-12 00:00:00</date> <status>1</status> <status_receiving>2</status_receiving> <supplier_id>1</supplier_id> <supplier_name>ABC Ltd</supplier_name> <customer_id>21</customer_id> <ship_to_name>John Doe</ship_to_name> <warehouse_id>0</warehouse_id> <technician_id>4</technician_id> <subtotal>7.99</subtotal> <number_of_lines>1</number_of_lines> </purchase_order></response>purchase_order_get
Section titled “purchase_order_get”Get a purchase order including all lines.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_get> <purchase_order_id>115</purchase_order_id> </purchase_order_get></request>purchase_order_id: integer - Required - Id of the purchase order to retrieve. If the purchase order id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order> <purchase_order_id>115</purchase_order_id> <numero>4447</numero> <supplier_id>31</supplier_id> <supplier_code><![CDATA[SUP-001]]></supplier_code> <name><![CDATA[All Supplies Inc.]]></name> <contact><![CDATA[John Doe]]></contact> <address><![CDATA[123 Green RoadSuite 400Montreal QC G1W 2L4]]></address> <phone><![CDATA[418-524-5066]]></phone> <mobile><![CDATA[]]></mobile> <fax><![CDATA[418-524-1063]]></fax> <email><![CDATA[bobe@all-supplies-inc-demo.com]]></email> <ship_to_name><![CDATA[My Company Inc.]]></ship_to_name> <ship_to_contact><![CDATA[Jane White]]></ship_to_contact> <ship_to_address><![CDATA[6287 Stewartunit 500Maple Ridge MA V2Z 8G7USA]]></ship_to_address> <ship_to_phone><![CDATA[418-524-5066 Ext.: 202]]></ship_to_phone> <ship_to_mobile><![CDATA[418-524-1063]]></ship_to_mobile> <ship_to_fax><![CDATA[418-524-1063]]></ship_to_fax> <ship_to_email><![CDATA[janet@this-is-fake-domain.com]]></ship_to_email> <customer_id></customer_id> <our_customer_number><![CDATA[54265]]></our_customer_number> <term_of_payment><![CDATA[NET 30 DAYS]]></term_of_payment> <supplier_reference><![CDATA[65383]]></supplier_reference> <our_reference><![CDATA[]]></our_reference> <date>2017-08-30 00:00:00</date> <status>1</status> <receiving_state>1</receiving_state> <entered_by><![CDATA[Bob Smith]]></entered_by> <technician_id>3</technician_id> <special_instructions><![CDATA[]]></special_instructions> <internal_notes><![CDATA[]]></internal_notes> <subtotal>314.45</subtotal> <number_of_lines>2</number_of_lines> <udf345 description="buyer"><![CDATA[Kate Simms]]></udf345> <purchase_order_line> <purchase_order_line_id>1284</purchase_order_line_id> <sequence>1</sequence> <code><![CDATA[SCREW-479652]]></code> <description><![CDATA[#6 x 1-1/4 in. Philips Bugle-Head Coarse Thread Sharp Point Drywall Screws (1 lb.-Pack)]]></description> <quantity>10.0000</quantity> <cost>6.4700</cost> <amount>64.70</amount> <quantity_received>0.0000</quantity_received> <quantity_to_receive>0.0000</quantity_to_receive> <part_id>765</part_id> <part_description><![CDATA[Screws #6 1 1/4 phillips]]></part_description> <number_of_receiving>0</number_of_receiving> </purchase_order_line> <purchase_order_line> <purchase_order_line_id>1285</purchase_order_line_id> <sequence>1</sequence> <code><![CDATA[SCREW-479777]]></code> <description><![CDATA[#8 x 1-1/4 in. Philips Bugle-Head Coarse Thread Sharp Point Drywall Screws (1 lb.-Pack)]]></description> <quantity>25.0000</quantity> <cost>9.9900</cost> <amount>249.75</amount> <quantity_received>0.0000</quantity_received> <quantity_to_receive>0.0000</quantity_to_receive> <part_id>720</part_id> <part_description><![CDATA[Screws #8 1 1/4 phillips]]></part_description> <number_of_receiving>0</number_of_receiving> </purchase_order_line> </purchase_order></response>purchase_order_add
Section titled “purchase_order_add”Add a new purchase order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_add> <supplier_id>31</supplier_id> <name><![CDATA[All Supplies Inc.]]></name> <contact><![CDATA[John Doe]]></contact> <address><![CDATA[123 Green RoadSuite 400Montreal QC G1W 2L4]]></address> <phone><![CDATA[418-524-5066]]></phone> <fax><![CDATA[418-524-1063]]></fax> <email><![CDATA[bobe@all-supplies-inc-demo.com]]></email> <ship_to_name><![CDATA[My Company Inc.]]></ship_to_name> <ship_to_contact><![CDATA[Jane White]]></ship_to_contact> <ship_to_address><![CDATA[6287 Stewartunit 500Maple Ridge MA V2Z 8G7USA]]></ship_to_address> <ship_to_phone><![CDATA[418-524-5066 Ext.: 202]]></ship_to_phone> <ship_to_mobile><![CDATA[418-524-1063]]></ship_to_mobile> <ship_to_fax><![CDATA[418-524-1063]]></ship_to_fax> <ship_to_email><![CDATA[janet@this-is-fake-domain.com]]></ship_to_email> <our_customer_number><![CDATA[54265]]></our_customer_number> <term_of_payment><![CDATA[NET 30 DAYS]]></term_of_payment> <date>2017-08-30</date> <udf345><![CDATA[Kate Simms]]></udf345> </purchase_order_add></request>supplier_id: integer - Required - Id of the supplier. If the supplier id specified does not exist, the request will fail.
name: string(50) - Required - Supplier name.
contact: string (50) - Name of the contact.
address: text
phone: string (25)
mobile: string (25)
fax: string (25)
email: string (60) - If you provide an e-mail address, the e-mail address must be in a valid e-mail format.
ship_to_name: string(50) - Ship to name.
ship_to_contact: string (50)
ship_to_address: text
ship_to_phone: string (25)
ship_to_mobile: string (25)
ship_to_fax: string (25)
ship_to_email: string (60) - If you provide an e-mail address, the e-mail address must be in a valid e-mail format.
customer_id: integer -Id of the customer. You can ship a purchase order to a customer. So, you can indicate it here. If specified, the id must be an existing customer id.
warehouse_id: integer - Required - Id of the ship to warehouse. If the warehouse id specified does not exist, the request will fail.
date: Required in Date format (see notes about formats at the beginning of this document)
term_of_payment: string (30) - Term of payment.
our_customer_number: string (30) - Our customer number.
our_reference: string (30) - Our purchase order reference.
Supplier_reference: string (30) - Supplier purchase order reference.
special_instructions: text
internal_notes: text
status: integer - Required - Must be a value between 0 and 3. 0=Pending, 1=In propress, 2=Closed, 3=Canceled.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order_id>539</purchase_order_id> <numero>1028</numero></response>purchase_order_id: Id of the new created purchase order.
numero: Purchase order number of the new created purchase order.
purchase_order_edit
Section titled “purchase_order_edit”Edit an existing purchase order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_edit> <purchase_order_id>539</purchase_order_id> <term_of_payment><![CDATA[NET 30 DAYS]]></term_of_payment> </purchase_order_edit></request>purchase_order_id**:nteger - Required - Id of the purchase order to edit. If the purchase order id specified does not exist, the request will fail.
See request type purchase_order_add for information about other fields. Of course, fields not specified in your XML request will not be updated and will not be erased either.
Note that if you want to set the customer_id field to no value, pass the value -1 to the customer id like this: <customer_id>-1</customer_id>
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order_id>539</purchase_order_id></response>purchase_order_id: Id of the updated purchase order.
purchase_order_delete
Section titled “purchase_order_delete”Delete a purchase order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_delete> <purchase_order_id>552</purchase_order_id> </purchase_order_delete></request>purchase_order_id: integer - Required - Id of the purchase order to delete. If the purchase order id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order_id>552</purchase_order_id></response>purchase_order_id: Id of the deleted purchase order.
purchase_order_line_add
Section titled “purchase_order_line_add”Add a purchase order line.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_line_add> <purchase_order_id>631</purchase_order_id> <part_id>149</part_id> <code><![CDATA[SCREW-479777]]></code> <description><![CDATA[#8 x 1-1/4 in. Philips Bugle-Head Coarse Thread Sharp Point Drywall Screws (1 lb.-Pack)]]></description> <quantity>25.0</quantity> <cost>9.99</cost> </purchase_order_line_add></request>purchase_order_id: integer - Required - Id of the purchase order to edit. If the purchase order id specified does not exist, the request will fail.
part_id: integer - Id of the part. If specified, the id must be an existing part id. If not specified, the purchase order line cannot be received into inventory. Useful for entering comments on a purchase order.
code: string(30) - Supplier part code
description: text - Supplier part description
quantity: decimal - Default 0 if not specified
cost: decimal - Default 0 if not specified
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order_id>631</purchase_order_id> <purchase_order_line_id>2478</purchase_order_line_id></response>purchase_order_id: Id of the purchase order edited.
purchase_order_line_id: Id of the new added purchase order line.
purchase_order_line_edit
Section titled “purchase_order_line_edit”Edit an existing purchase order line.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_line_edit> <purchase_order_line_id>2478</purchase_order_line_id> <quantity>45</quantity> </purchase_order_line_edit></request>purchase_order_line_id: integer - Required - Id of the purchase order line to edit. If the purchase order line id specified does not exist, the request will fail.
See request type purchase_order_line_add for information about other fields. Of course, fields not specified in your XML request will not be updated and will not be erased either.
Note that if you want to set the part_id field to no value, pass the value -1 to the part id like this: <part_id>-1</part_id>
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order_line_id>2478</purchase_order_line_id></response>purchase_order_line_id: Id of the updated purchase order line.
purchase_order_line_delete
Section titled “purchase_order_line_delete”Delete a purchase order line.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_line_delete> <purchase_order_line_id>2478</purchase_order_line_id> </purchase_order_line_delete></request>purchase_order_line_id: integer - Required - Id of the purchase order line to delete. If the purchase order line id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order_line_id>2478</purchase_order_line_id></response>purchase_order_line_id: Id of the deleted purchase order line.
purchase_order_line_receiving
Section titled “purchase_order_line_receiving”Purchase order line receiving.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <purchase_order_line_receiving> <purchase_order_line_id>2478</purchase_order_line_id> <quantity>5.25</quantity> <warehouse_id>12</warehouse_id> <reference>bla bla bla</reference> </purchase_order_line_receiving></request>purchase_order_line_id: integer - Required - Id of the purchase order line to receive stock. If the purchase order line id specified does not exist, the request will fail.
quantity: decimal - Required. Must me different than 0
warehouse_id: integer -Id of the warehouse where stock is received. If the warehouse id is not specified, stock will be received into the warehouse specified in the purchase order.
reference: string(50) - Transaction reference (ex. : Receiving number)
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <purchase_order_line_id>2478</purchase_order_line_id> <part_inventory_tx_id>23833</part_inventory_tx_id></response>purchase_order_line_id: Id of the updated purchase order line.
part_inventory_tx_id: Id of the inventory transaction.
supplier_list
Section titled “supplier_list”Get entire list of suppliers in a summary format.
Once the list of suppliers retrieved, you can use the supplier_get request type to retrieve the complete record for a specific supplier using the supplier_id retrieved.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <supplier_list> </supplier_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <supplier> <supplier_id>439</supplier_id> <code><![CDATA[RD-001]]></code> <name><![CDATA[RD Supplies Inc.]]></name> <status>active</status> <nbr_purchase_orders>3</nbr_purchase_orders> </supplier> <supplier> <supplier_id>440</supplier_id> <code><![CDATA[TODO-001]]></code> <name><![CDATA[Todo Ltd]]></name> <status>active</status> <nbr_purchase_orders>0</nbr_purchase_orders> </supplier></response>supplier_get
Section titled “supplier_get”Get a supplier record.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <supplier_get> <supplier_id>439</supplier_id> </supplier_get></request>customer_id: integer - Required - Id of the customer to retrieve. If the customer id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <supplier> <supplier_id>439</supplier_id> <code><![CDATA[RD-001]]></code> <name><![CDATA[RD Supplies Inc.]]></name> <address><![CDATA[176 Unknown StreetMontreal QC H1V 1B3Canada]]></address> <contact><![CDATA[John Doe]]></contact> <phone><![CDATA[514-868-3000]]></phone> <mobile><![CDATA[514-868-0000]]></mobile> <fax><![CDATA[514-000-3000]]></fax> <email><![CDATA[john.doe@rd-supplies-inc.ca]]></email> <status>active</status> <category_id>103</category_id> <category_description><![CDATA[Tools and other]]></category_description> <term_of_payment><![CDATA[NET 30 DAYS]]></term_of_payment> <our_customer_number><![CDATA[23457]]></our_customer_number> <internal_notes><![CDATA[Good supplier]]></internal_notes> <special_instructions><![CDATA[Call beforestop by their warehousesince there is a part-time employee]]></special_instructions> <nbr_purchase_orders>3</nbr_purchase_orders> <udf822 description="Website"><![CDATA[www.rd-supplies-inc.ca]]></udf822> </supplier></response>supplier_add
Section titled “supplier_add”Add a new supplier.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <supplier_add> <code>XYZ-001</code> <name>XYZ Industries Inc.</name> <address><![CDATA[330 St-Vallier EastSuite 110Quebec QC G1K 9C5]]></address> <special_instructions><![CDATA[Call before going there.]]></special_instructions> <internal_notes><![CDATA[Bla bla bla]]></internal_notes> <status>active</status> <category_description>Tools and other</category_description> <udf822><![CDATA[www.xyz-industries-global.com]]></udf822> <contact>Alex Martin</contact> <phone>418-524-5066</phone> <mobile>418-524-0000</mobile> <fax>418-524-1063</fax> <email>alex.martin@xyz-industries-global.com</email> <term_of_payment>NET 30 DAYS</term_of_payment> <our_customer_number>BA-4523</our_customer_number> </supplier_add></request>code: string(30) - If specified, must be unique else the request will fail.
name: string(50) - Required - Supplier name. If the supplier name already exists, the request will fail.
contact: string (50) - Required - Name of the contact.
address: text
phone: string (25)
mobile: string (25)
fax: string (25)
email: string (60) - If you provide an e-mail address, the e-mail address must be in a valid e-mail format.
special_instructions: text
internal_notes: text
status: If specified, you must specify active or inactive. Default is active.
category_id: integer - If not specified, the default category will be used.
category_description: string (35) - It allows you to specify the category using the category description instead of its id. The API will retrieve the category_id for you. If category_id is specified this field will be ignored.
term_of_payment: string (30) - Term of payment.
our_customer_number: string (30) - Our customer number.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <supplier_id>441</supplier_id></response>supplier_id: Id of the new created supplier.
supplier_edit
Section titled “supplier_edit”Edit an existing supplier.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <supplier_edit> <supplier_id>441</supplier_id> <address><![CDATA[330 St-Vallier EastSuite 110-BQuebec QC G1K 9C5]]></address> <udf822><![CDATA[www.xyz-industries-global.net]]></udf822> <phone>418-524-5066 Ext: 444</phone> </supplier_edit></request>supplier_id: integer - Required - Id of the supplier to edit. If the supplier id specified does not exist, the request will fail.
See request type supplier_add for information about other fields. Of course, fields not specified in your XML request will not be updated and will not be erased either.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <supplier_id>441</supplier_id></response>supplier_id: Id of the updated supplier.
supplier_delete
Section titled “supplier_delete”Delete a supplier.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <supplier_delete> <supplier_id>441</supplier_id> </supplier_delete></request>supplier_id: integer - Required - Id of the supplier to delete. If the supplier id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <supplier_id>441</supplier_id></response>supplier_id: Id of the deleted supplier.
tax_rate_list
Section titled “tax_rate_list”Get entire list of tax rates.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <tax_rate_list> </tax_rate_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <tax_rate> <tax_rate_id>0</tax_rate_id> <description><![CDATA[No tax]]></description> <tax1_percent>0.0000</tax1_percent> <tax2_percent>0.0000</tax2_percent> </tax_rate> <tax_rate> <tax_rate_id>1</tax_rate_id> <description><![CDATA[Default tax rate Parts]]></description> <tax1_percent>5.0000</tax1_percent> <tax2_percent>0.0000</tax2_percent> </tax_rate> <tax_rate> <tax_rate_id>2</tax_rate_id> <description><![CDATA[Default tax rate Labor]]></description> <tax1_percent>5.0000</tax1_percent> <tax2_percent>0.0000</tax2_percent> </tax_rate></response>technician_list
Section titled “technician_list”List all technicians in a summary format.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <technician_list> </technician_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <technician> <technician_id>1</technician_id> <name><![CDATA[John Doe Sr.]]></name> <email><![CDATA[jdsr@orologic.com]]></email> <status>active</status> <is_dispatcher>yes</is_dispatcher> <is_administrative_staff>no</is_administrative_staff> <is_technician>no</is_technician> </technician> <technician> <technician_id>11</technician_id> <name><![CDATA[John Doe Jr]]></name> <email><![CDATA[jdjr@orologic.com]]></email> <status>active</status> <is_dispatcher>no</is_dispatcher> <is_administrative_staff>no</is_administrative_staff> <is_technician>yes</is_technician> </technician> <technician> <technician_id>131</technician_id> <name><![CDATA[Alfred Wilson]]></name> <email><![CDATA[alfred@orologic.com]]></email> <status>inactive</status> <is_dispatcher>no</is_dispatcher> <is_administrative_staff>yes</is_administrative_staff> <is_technician>no</is_technician> </technician></response>technician_get
Section titled “technician_get”Get a technician record.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <technician_get> <technician_id>79</technician_id> </technician_get></request>technician_id: integer - Required - Id of the technician to retrieve. If the technician id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <technician> <technician_id>79</technician_id> <name><![CDATA[Albert Plante]]></name> <email><![CDATA[albert.plante.79@orologic.com]]></email> <status>active</status> <is_dispatcher>no</is_dispatcher> <is_administrative_staff>yes</is_administrative_staff> <is_technician>yes</is_technician> <email_sms><![CDATA[albert.plante.79.sms@orologic.com]]></email_sms> <address><![CDATA[330 Fortune StreetQuebec QC G1K 9C5]]></address> <phone><![CDATA[418-524-5066]]></phone> <mobile><![CDATA[418-524-0000]]></mobile> <fax><![CDATA[418-524-1063]]></fax> <seniority>201</seniority> <internal_notes><![CDATA[bla bla bla]]></internal_notes> <category_id>114</category_id> <category_description><![CDATA[Super Tech]]></category_description> <warehouse_id>26</warehouse_id> <warehouse_description><![CDATA[Albert's truck]]></warehouse_description> <udf372 description="Nickname"><![CDATA[Ti-Bert]]></udf372> <zone> <zone_id>107</zone_id> <description><![CDATA[East zone]]></description> </zone> <zone> <zone_id>108</zone_id> <description><![CDATA[West zone]]></description> </zone> <document> <document_id>456</document_id> <filename><![CDATA[contract.xls]]></filename> <description><![CDATA[Albert's contract]]></description> <mime_type>application/vnd.ms-office</mime_type> <size>221184</size> </document> </technician></response>warehouse_list
Section titled “warehouse_list”List all warehouses.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <warehouse_list> </warehouse_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <warehouse> <warehouse_id>0</warehouse_id> <description><![CDATA[Montreal warehouse]]></description> </warehouse> <warehouse> <warehouse_id>1</warehouse_id> <description><![CDATA[Vancouver warehouse]]></description> </warehouse></response>workorder_label_list
Section titled “workorder_label_list”List all work order labels.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_label_list> </workorder_label_list></request>Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_label> <workorder_label_id>101</workorder_label_id> <description><![CDATA[To do ASAP]]></description> </workorder_label> <workorder_label> <workorder_label_id>107</workorder_label_id> <description><![CDATA[Wait authorization]]></description> </workorder_label></response>workorder_list
Section titled “workorder_list”List all work orders in summary format.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_list> <date_from>2013-05-01</date_from> <date_to>2013-05-30</date_to> </workorder_list></request>Optional filters:
date_from: If specified, must be a valid Date format and date_to must be specified as well (see notes about formats at the beginning of this document).
date_to: If specified, must be a valid Date format and date_from must be specified as well (see notes about formats at the beginning of this document).
customer_id: integer - If customer id provided doesn’t exist, request will return nothing
status: 1 to 10 - If status value provided doesn’t exist, request will return nothing
last_updated_on_from: date - If specified, only work orders that were created or updated between last_updated_on_from and last_updated_on_to will be returned. last_updated_on_to must be obligatory specified as well.
last_updated_on_to: date - If specified, only work orders that were created or updated between last_updated_on_from and last_updated_on_to will be returned. last_updated_on_from must be obligatory specified as well.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder> <workorder_id>121</workorder_id> <number>118</number> <date>2012-02-22 14:29:04</date> <status>1</status> <priority>3</priority> <customer_name><![CDATA[ABC Inc.]]></customer_name> </workorder> <workorder> <workorder_id>129</workorder_id> <number>126</number> <date>2012-02-27 15:12:15</date> <status>7</status> <priority>1</priority> <customer_name><![CDATA[OroLogic Inc.]]></customer_name> </workorder> <workorder> <workorder_id>130</workorder_id> <number>127</number> <date>2012-02-27 15:37:35</date> <status>4</status> <priority>4</priority> <customer_bill><![CDATA[OroLogic Inc.]]></customer_bill> </workorder></response>workorder_get
Section titled “workorder_get”Get an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_get> <workorder_id>121</workorder_id> </workorder_get></request>workorder_id: integer - Required - Id of the work order to retrieve. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder> <workorder_id>121</workorder_id> <number>118</number> <customer_id>124</customer_id> <customer_name><![CDATA[OroLogic Inc.]]></customer_name> <contact_name><![CDATA[John Doe]]></contact_name> <customer_address><![CDATA[330 St-Vallier EstSuite 110-BQuébec QC G1K 9C5Canada]]></customer_address> <customer_phone><![CDATA[(418)524-5066]]></customer_phone> <customer_mobile><![CDATA[]]></customer_mobile> <customer_fax><![CDATA[(418)524-1063]]></customer_fax> <customer_email><![CDATA[info@orologic.com]]></customer_email> <customer_bill_id>103</customer_bill_id> <customer_bill_name><![CDATA[OroLogic Inc.]]></customer_bill_name> <contact_bill_name><![CDATA[John Doe]]></contact_bill_name> <customer_bill_address><![CDATA[330 St-Vallier EstSuite 110-BQuébec QC G1K 9C5Canada]]></customer_bill_address> <customer_bill_phone><![CDATA[(418)524-5066]]></customer_bill_phone> <customer_bill_mobile><![CDATA[]]></customer_bill_mobile> <customer_bill_fax><![CDATA[(418)524-1063]]></customer_bill_fax> <customer_bill_email><![CDATA[info@orologic.com]]></customer_bill_email> <bill_to_different_customer>no</bill_to_different_customer> <status>3</status> ... </workorder></response>The full output wasn’t included, but you wil get all data related to this work order, such as: equipments, appointments, performed work, etc.
workorder_add
Section titled “workorder_add”Add a new work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_add> <customer_id>2323</customer_id> <customer_name>John Doe Excavations</customer_name> <contact_name>John Doe Jr.</contact_name> <customer_address><![CDATA[123, main streetDetroit MI 48243]]></customer_address> <customer_phone>(555)555-5555</customer_phone> <customer_mobile>(555)555-6666</customer_mobile> <customer_fax>(555)555-7777</customer_fax> <customer_email>jdoe@jdoexcavations.com</customer_email> <customer_id_bill>1233</customer_id_bill> <customer_name_bill>John Doe Corporation</customer_name_bill> <contact_name_bill>John Doe Sr.</contact_name_bill> <customer_address_bill>45673 Fifth AvenueNew York NY 10118</customer_address_bill> <customer_phone_bill>(555)555-5454</customer_phone_bill> <customer_mobile_bill>(555)555-5252</customer_mobile_bill> <customer_fax_bill>(555)555-5343</customer_fax_bill> <customer_email_bill>jdoe@jdoecorp.com</customer_email_bill> <bill_to_different_customer>1</bill_to_different_customer> <status>1</status> <description>Polish the molds for the excavating tools.</description> <priority>4</priority> <date_firstapp>2013-08-28 13:30:00</date_firstapp> <technician_id_firstapp>12</technician_id_firstapp> <expected_duration_firstapp>180</expected_duration_firstapp> <equipment_type_id>17</equipment_type_id> <technician_id>18</technician_id> <internal_reference>SPECIAL-ON-MOLD-POLISH</internal_reference> <customer_reference></customer_reference> <entered_by>Mr. Jamieson</entered_by> <special_instructions></special_instructions> <internal_notes></internal_notes> <tax1_percent_parts>5.25</tax1_percent_parts> <tax2_percent_parts>0.00</tax2_percent_parts> <tax2_calc_type_parts>1</tax2_calc_type_parts> <tax1_percent_labor></tax1_percent_labor> <tax2_percent_labor></tax2_percent_labor> <tax2_calc_type_labor></tax2_calc_type_labor> <fees_parts></fees_parts> <fees_labor></fees_labor> <customer_term_of_payment><![CDATA[NET 30 DAYS]]></customer_term_of_payment> <customer_term_of_payment_bill><![CDATA[NET 30 DAYS]]></customer_term_of_payment_bill> </workorder_add></request>customer_id: integer - Required, if no valid customer id is specified the request will fail.
customer_id_bill: integer - Optional. Must be valid or request will fail
customer_name: string(50) - Required
customer_name_bill: string(50) - Required if customer_id_bill is specified.
technician_id: integer - Required, must be a valid technician_id.
technician_id_firstapp : integer - Optional. Must be a valid technician_id. If specified, you must specify date_firstapp as well. If not specified, no appointment will be created.
date_firstapp: datetime - Optional, DateTime format. (see notes about formats at the beginning of this document). If specified, you must specify technician_id_firstapp as well. If not specified, no appointment will be created.
expected_duration_firstapp: integer - Number of minutes of the first appointment. If not specified, will be set to 60 minutes (works conjointly with technician_id_firstapp and date_firstapp).
equipment_type_id: integer - Optional. If specified, must be a valid equipment_type_id. If equipment_id is specified, equipment_type_id will be ignored since the equipment_type_id will be retrieved from the equipment_id file.
equipment_id: integer - Optional. If specified, must be a valid equipment_id.
Other field below are optional.
contact_name, contact_name_bill: string(50)
customer_address, customer_address_bill: text
customer_phone, customer_phone_bill: string(25)
customer_mobile, customer_mobile_bill: string(25)
customer_fax, customer_fax_bill: string(25)
customer_email, customer_email_bill: string(60)
status: integer (1 to 20) - See Appendix.
priority: integer (1 to 10) - See Appendix.
internal_reference, customer_reference: string(30)
entered_by: string(35)
special_instructions: text
internal_notes: text
tax1_percent_parts, tax2_percent_parts: decimal
tax1_percent_labor, tax2_percent_labor: decimal
tax2_calc_type_parts, tax2_calc_type_labor: integer 0 or 1 (1=include tax1 amount in tax2 calculation. 0=do not include tax1 amount in tax2 calculation)
fees_parts, fees_labor: decimal
customer_term_of_payment: string (30) - Term of payment.
customer_term_of_payment_bill: string (30) - Term of payment.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"><workorder_id>20943</workorder_id><number>24035</number><workorder_appointment_id>2237</workorder_appointment_id><workorder_equipment_id>3461</workorder_equipment_id></response>workorder_id: Id of the newly created work order.
number: Number of the newly created work order.
workorder_appointment_id: Optional. Id of the first appointment for this newly created work order.
workorder_equipment_id: Id of the master equipment for this newly created workder
workorder_edit
Section titled “workorder_edit”Edit an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_edit> <workorder_id>20943</workorder_id> <special_instructions>Wear non-inflammable clothing when working on this equipment.</special_instructions> <internal_notes>Also make sure to be near a hospital.</internal_notes> </workorder_edit></request>workorder_id: integer - Required, must be a valid work order id or the request will fail.
See workorder_add for details on all the fields you can use. Note that unlike workorder_add, you cannot update the first appointment nor the master equipment using workorder_edit. Use other request types instead.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_id>20943</workorder_id></response>workorder_id : Id of the successfully edited workorder.
workorder_get_next_number
Section titled “workorder_get_next_number”Get the number for the next added work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_get_next_number></workorder_get_next_number></request>This request type does not require any parameter.
It gets the number that will be assigned to the next work order that will be added, no matter if the next work order is added from the API or directly from the application.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <number>12752</number></response>number : Number of the next work order if request successful. It should be the same number that you passed to the request.
workorder_set_next_number
Section titled “workorder_set_next_number”Set the number for the next added work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_set_next_number> <number>12752</number> </workorder_set_next_number></request>number: integer - Required, must be a valid integer number (Maximum 999999999) or the request will fail.
It sets the number that will be assigned to the next work order that will be added, no matter if the next work order is added from the API or directly from the application.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <number>12752</number></response>number : Number of the next work order if request successful. It should be the same number that you passed to the request.
workorder_equipment_add
Section titled “workorder_equipment_add”Add an equipment on an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_equipment_add> <workorder_id>6585</workorder_id> <equipment_type_id>345</equipment_type_id> <under_warranty>yes</under_warranty> <under_service_contract>no</under_service_contract> <contract_reference></contract_reference> <equipment_id>456</equipment_id> </workorder_equipment_add></request>workorder_id: integer - Required, if no valid workorder_id is specified the request will fail.
equipment_type_id: integer - Required but if equipment_id is specified, it will be ignored.
equipment_id: integer - If specified, must be valid
under_warranty: yes or no - Default is no.
under_service_contract: yes or no - Default is no
contract_reference: string(25)
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_equipment_id>45345</workorder_equipment_id></response>workorder_equipment_id: Id of the newly created work order equipment.
workorder_equipment_edit
Section titled “workorder_equipment_edit”Edit an equipment on an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_equipment_edit> <workorder_equipment_id>8637</workorder_equipment_id> <under_service_contract>yes</under_service_contract> <contract_reference>GDFSS23234</contract_reference> </workorder_equipment_edit></request>workorder_equipment_id: integer - Required - Id of the work order equipment to edit. If the id specified does not exist, the request will fail.
See request type workorder_equipment_add for information about other fields.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_equipment_id>8637</workorder_equipment_id></response>workorder_equipment_id: Id of the successfully updated work order equipment.
workorder_equipment_delete
Section titled “workorder_equipment_delete”Delete an equipment on an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_equipment_delete> <workorder_equipment_id>2923</workorder_equipment_id> </workorder_equipment_delete></request>workorder_equipment_id: integer - Required - Id of the work order equipment to delete. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_equipment_id>2223</workorder_equipment_id></response>workorder_appointment_add
Section titled “workorder_appointment_add”Add an appointment on an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_appointment_add> <workorder_id>234</workorder_id> <technician_id>6</technician_id> <datetime>2013-12-12 16:30:00</datetime> <expected_duration>240</expected_duration> </workorder_appointment_add></request>workorder_id: integer - Required - Id of the work order to edit. If the id specified does not exist, the request will fail.
technician_id: integer - Required - Technician id
datetime: Required in DateTime format (see notes about formats at the beginning of this document)
expected_duration: integer - Number of minutes. If not specified will default to 60 (1 hour)
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_appointment_id>12093</workorder_appointment_id></response>workorder_appointment_edit
Section titled “workorder_appointment_edit”Edit an appointment on an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_appointment_edit> <workorder_appointment_id>243526</workorder_appointment_id> <expected_duration>60</expected_duration> </workorder_appointment_edit></request>workorder_appointment_id: integer - Required - Id of the work order appointment to edit. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_appointment_id>243526</workorder_appointment_id></response>workorder_appointment_delete
Section titled “workorder_appointment_delete”Delete an appointment on an existing work order.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_appointment_delete> <workorder_appointment_id>223244</workorder_appointment_id> </workorder_appointment_delete></request>workorder_appointment_id: integer - Required - Id of the work order appointment to delete. If the id specified does not exist, the request will fail.
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_appointment_id>223244</workorder_appointment_id></response>workorder_performed_work_add
Section titled “workorder_performed_work_add”Add work performed, including parts and labor.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_performed_work_add> <workorder_equipment_id>1234</workorder_equipment_id> <technician_id>5</technician_id> <datetime>2013-05-22 10:00:00</datetime> <duration>120</duration> <description>Replace engine.</description> <part> <part_id>3565</part_id> <price>2000.00</price> <quantity>1</quantity> </part> <labor> <rate_id>5656</rate_id> <rate>68.00</rate> <duration>120</duration> </labor> <labor> <rate_id>5656</rate_id> <rate>68.00</rate> <duration>120</duration> <bank_of_hour_id>67</bank_of_hour_id> </labor> </workorder_performed_work_add></request>workorder_equipment_id: integer - Required - Id of the work order equipment you want to add work performed to. If the id specified does not exist, the request will fail.
technician_id: integer - required - Technician id
datetime: Required in DateTime format (see notes about formats at the beginning of this document)
duration: integer - Number of minutes
description: text
Parts section
Section titled “Parts section”Part sections are optional. You can add as much part section as needed
part_id : integer - Required - Valid part Id.
Price: Decimal - Default 0.
quantity: Decimal - Required - Must be different from 0.
Labor section
Section titled “Labor section”Labor sections are optional. You can add as much labor section as needed
rate_id : integer - Required, must be a valid rate_id
rate: Decimal - Default 0.
duration: Integer - Number of minutes. Default 0.
bank_of_hour_id: integer - If specified, must be valid and must belong to the work order’s customer
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_performed_work_id>2386</work_order_performed_work_id> <workorder_performed_work_part_id>8768</workorder_performed_work_part_id> <workorder_performed_work_labor_id>9065</workorder_performed_work_labor_id> <workorder_performed_work_labor_id>9066</workorder_performed_work_labor_id></response>workorder_performed_work_delete
Section titled “workorder_performed_work_delete”Delete a work performed.
XML request example:
Section titled “XML request example:”<request app="newwayservice" version="5" password="abcdef-123456"> <workorder_performed_work_delete> <workorder_performed_work_id>22442</workorder_performed_work_id> </workorder_performed_work_delete></request>workorder_performed_work_id: integer - required - Id of the workorder performed work to delete
Response successful example:
Section titled “Response successful example:”<response app="newwayservice" version="5" status="1"> <workorder_performed_work_id>22442</workorder_performed_work_id></response>Appendix A. List of error codes
Section titled “Appendix A. List of error codes”1001 Unable to connect to database.
1002 Error retrieving data from database.
1003 Error saving data to database.
1005 API not available at this time. Please, try again later.
1101 Record does not exists.
1102 Record duplicate error. A record with the supplied value already exists.
1103 The API request you made returned too many results. Please use filters to narrow it down.
1104 You cannot delete this item.
1105 This operation is not allowed.
1201 Field cannot be empty. Field value required.
1202 No field to edit specified.
1203 Invalid e-mail. If you provide an e-mail address, the e-mail address must be in a valid format.
1204 Quantity cannot be 0.
1205 Duration cannot be 0.
1301 The customer cannot become a branch because there is other customers that are already a branch of this customer.
1302 You cannot add a branch under a customer that is already a branch of another customer.
1401 This part inventory transaction is not valid.
1402 This part inventory transaction is not allowed.
1501 The master equipment cannot be deleted.
1502 A master equipment already exists for this work order.
1503 You cannot remove this equipment since it has performed work attached. Delete performed work first.
1601 This is the last appointment for this work order, so you cannot delete it.
1701 The workorder status you provided is invalid. Accepted values are 1 to 10.
1702 The workorder priority you provided is invalid. Accept values are 1 to 4.
1703 This bank of hours doest not belong to the workorder’s customer.
1801 The technician id specified must have the role of technician.
2001 Invalid XML document received.
2002 Invalid attribute value in element.
2101 Maximum one request is allowed in the XML document.
2102 No request was found in the XML document.
2104 Invalid request type found in the XML document.
3001 Invalid API password.
3002 Either your account is disabled or the API option is disabled into your account.
3003 The application is currently in maintenance mode. Please try again later.
3004 Too many concurrent api requests detected for your account. Try again later.
4001 This date or datetime is not in a valid format.
4002 A numeric value was expected but another format was given.
4003 Invalid value provided or value out of bounds.
Appendix B. Description of Ids
Section titled “Appendix B. Description of Ids”Work order statuses
Section titled “Work order statuses”These status descriptions are defined by yourself in the Application configuration option of NewWaySERVICE. Here is a sample setup for these labels.
| Description | Example | Id |
|---|---|---|
| Status #1 | Opened | 1 |
| Status #2 | Completed | 2 |
| Status #3 | Suspended | 3 |
| Status #4 | Ready for Invoicing | 4 |
| Status #5 | Invoiced | 5 |
| Status #6 | Cancelled | 6 |
| Status #7 | Status 7 | 7 |
| Status #8 | Status 8 | 8 |
| Status #9 | Status 9 | 9 |
| Status #10 | Status 10 | 10 |
| Status #11 | Status 11 | 11 |
| Status #12 | Status 12 | 12 |
| Status #13 | Status 13 | 13 |
| Status #14 | Status 14 | 14 |
| Status #15 | Status 15 | 15 |
| Status #16 | Status 16 | 16 |
| Status #17 | Status 17 | 17 |
| Status #18 | Status 18 | 18 |
| Status #19 | Status 19 | 19 |
| Status #20 | Status 20 | 20 |
Work order priorities
Section titled “Work order priorities”These priority descriptions are also defined in the Application configuration option of NewWaySERVICE. Here is a sample setup for these labels.
| Description | Example | Id |
|---|---|---|
| Priority #1 | Normal | 1 |
| Priority #2 | Low | 2 |
| Priority #3 | High | 3 |
| Priority #4 | Urgent | 4 |
| Priority #5 | Priority 5 | 5 |
| Priority #6 | Priority 6 | 6 |
| Priority #7 | Priority 7 | 7 |
| Priority #8 | Priority 8 | 8 |
| Priority #9 | Priority 9 | 9 |
| Priority #10 | Priority 10 | 10 |
Inventory part transaction types
Section titled “Inventory part transaction types”| Description | Id |
|---|---|
| Manual/Other | 0 |
| Work order | 1 |
| Manual Purchase/Receiving/RMA | 2 |
| Warehouse transfer | 3 |
| Purchase order receiving | 4 |
Labor rate groups
Section titled “Labor rate groups”| Description | Id |
|---|---|
| Labor | 0 |
| Travel | 1 |
Copyright
Section titled “Copyright”Copyright© 1996-2025 OroLogic Inc., All rights reserved.
Warning: This software and its documentation are protected by copyright law and international treaties. Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law.
NewWaySERVICE and OROLOGIC are trademarks of OroLogic Inc., 979 Avenue de Bourgogne, Suite 210, Quebec QC G1W 2L4, Canada. The names of other products, services and societies mentioned are trademarks of their respective owners. The societies, names used in the examples are fictive. Association with any society, name, product or events existing is not desired and is not an insinuation.