Work Orders
This api is used to post one or more workorders to WorkorderApp. A workorder can contain the following data:
WorkorderNo
Unique number from ERP/CRM
Yes
Varchar (255)
ProjectNr
Internal Project number
No
Varchar (255)
ExternProjectNr
External Project number
No
Varchar (255)
CustomerName
Customer name
Yes
Varchar (255)
CustomerDebtorNr
Customer Debtor number
Yes
Varchar (255)
CustomerStreet
Customer street
Yes
Varchar (255)
CustomerStreetNo
Customer street number
No
Varchar (255)
CustomerEmail
Customer Email
No
Varchar (255)
CustomerZIP
Customer zip code
Yes
Varchar (255)
CustomerCity
Customer city
Yes
Varchar (255)
CustomerContactPerson
Customer contact person
Yes
Varchar (255)
CustomerPhone
Customer phone number
No
Varchar (255)
CustomerRemark
Customer remark
No
Text (64kb)
CustomerLatitude
Latitude of work location, used for navigation and to display on maps.
No
Float(10,6)
CustomerLongitude
Longitude of work location, used for navigation and to display on maps.
No
Float(10,6)
CustomerNameInvoice
Invoice customer name
Yes
Varchar (255)
CustomerDebtorNrInvoice
Invoice customer debtor number
Yes
Varchar (255)
CustomerStreetInvoice
Invoice customer street name
Yes
Varchar (255)
CustomerStreetNoInvoice
Invoice customer street number
No
Varchar (255)
CustomerEmailInvoice
Invoice customer email
No
Varchar (255)
CustomerZIPInvoice
Invoice customer zip code
Yes
Varchar (255)
CustomerCityInvoice
Invoice customer city
Yes
Varchar (255)
CustomerContactPersonInvoice
Invoice customer contact person
Yes
Varchar (255)
CustomerPhoneInvoice
Invoice customer phone number
No
Varchar (255)
CustomerRemarkInvoice
Invoice customer remark
No
Text (64kb)
TypeOfWork
Installatie, Garantie, Levering, Onderhoud, Project, Regie, Reparatie, Service, Storing, Verkoop, Verhuur
Yes
Varchar (255)
WorkDescription
Work description of the workorder. Visible for customer when signing and when receiving the PDF.
No
Text (64kb)
InternalWorkDescription
Internal work description of the workorder. Only visible for the employee
No
Text (64kb)
PaymentMethod
niet van toepassing, op rekening, contact voldaan, pin betaling, conform offerte
Yes
Varchar (255)
EmployeeNr
Employee Number
No
Varchar (255)
WorkDate
Scheduled date for work (d-m-Y)
No
Varchar (255)
WorkTime
Scheduled time for work (H:i)
No
Varchar (255)
WorkEndDate
Scheduled end date for work (d-m-Y)
No
Varchar (255)
WorkEndTime
Scheduled end time for work (H:i)
No
Varchar (255)
WorkDeadline
Scheduled deadline for the workorder.
No
Varchar (255)
WorkDuration
Duration of the workorder (in minutes). Used to fill WorkEndDate and WorkEndTime based on WorkDate and WorkTime.
No
Integer
WorkStatus
Internal work status code. Can be added through status API.
No
Varchar (255)
PickupPlanning
Indication if the work order should be added to batch to be picked up. Value should be 0 or 1.
No
Integer
WebPlanning
Indication if webplanning is enabled for this order.
No
Integer
CpnCode
Contact person code
No
Varchar (255)
AdrCode
Address code
No
Varchar (255)
ShortWorkDescription
Short work description. For example 1 line to show in an overview
No
Varchar (255)
Comment
Additional field for the employee to leave their comment
No
Varchar (255)
ErrorCode
Selected code as added in the errors API
No
Varchar (255)
ErrorMessage
Message corresponding to the selected Error, can be changed by the employee
No
Varchar (255)
SolutionCode
Selected code as added in the solutions API
No
Varchar (255)
SolutionMessage
Message corresponding to the selected Solution, can be changed by the employee
No
Varchar (255)
PriorityCode
Selected code as added in the priorities API
No
Varchar (255)
PriorityMessage
Message corresponding to the selected Priority, can be changed by the employee
No
Varchar (255)
MinimumHours
Minimum amount of hours that the customer should sign for. For example: The customer should always sign for 2 hours. If the employee only registers 25 minutes the customer still gets to see 2 hours.
No
Decimal (7,2)
RoundingAmount
Amount of minutes that the total time should be rounded to. For exammple: Your company only works with amounts of 30 minutes. If the user only registers 40 minutes the customer will have to sign for 60 minutes.
No
Varchar (255)
Attachments
An array containing multiple files. See specification below.
No
Array
Materials
An array containing material rows. See specification below.
No
Array
Workperiods
An array containing workperiod rows. See specification below.
No
Array
Forms
Array of forms. Each row contains Name, Data and ObjectCode
No
Array
Employees
Array of employee numbers.
No
Array
WorkObjects
Array of objects codes.
No
Array
AddDefaultDocuments
When set to true, automatically adds default documents linked to the relation (customer), project, address, or type of work to the work order.
No
Boolean
Attachments specification
File
URL of the attachment file. This has to be an existing file. The file is saved on our server.
No
Varchar (255)
Data
Base64 encoded file data.
No
Base64
FileName
Filename of the Base64 encoded data.
No
Varchar (255)
An attachment can be added by providing a valid URL or by providing Base64 encoded data and filename. Material specification
MaterialCode
Article number, code or barcode of this material. Example: A786878
Yes
Varchar (255)
MaterialNr
Amount of this material used. Example: 1
Yes
Decimal
MaterialPrice
Price of this material. Example: 0,00
Yes
Decimal
MaterialName
Material name and/or description. Example: Kleinmateriaal
Yes
Varchar (255)
MaterialUnit
Unit of this material. Example: M2
No
Varchar (255)
MaterialType
User defined material type
No
Varchar (255)
MaterialFreeField1
User defined field 1
No
Varchar (255)
MaterialFreeField2
User defined field 2
No
Varchar (255)
MaterialFreeField3
User defined field 3
No
Varchar (255)
MaterialFreeField4
User defined field 4
No
Varchar (255)
MaterialFreeField5
User defined field 5
No
Varchar (255)
Workperiod specification
WorkDate
Date specified in d-m-Y
Yes
Varchar (255)
BeginTime
Time specified in H:i
Yes
Varchar (255)
EndTime
Time specified in H:i
Yes
Varchar (255)
Break
Break time in minutes
No
Int (11)
TotalTime
Sum of EndTime - BeginTime - Break formatted in H:i
Yes
Varchar (255)
Travel
Travel distance
No
Int (11)
WorkRemark
Work remark
No
Text
HourType
Hour type code
No
Varchar (55)
EmployeeNr
Employee nunber
No
Varchar (55)
Example array:
Forms specification
Name
Name of the form. Will be visible to employee and used to search for data.
Yes
Varchar (255)
Data
JSON data of the Form elements. See forms API for description. When this is empty we will use the name to lookup a predefined form.
No
Text (64kb)
ObjectCode
Object connected to the form. We will search our list of object for the corresponding object.
No
Varchar (255)
Freefields
Additional freefields can be added to the workorder data. Freefield data can be supplied bij adding a FreeFields JSON object with the workorder json data. Freefields will only be added to the results when declared, use the Freefields endpoint to see which fields have been set. Freefields are numbered 1-50.
{{client_token}}{{software_token}}Response_200
No content
POST /PostWorkorders/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Response_200
No content
This API is used to update an existing workorder. The row_id of workorder_no can be used to identify the specific workorder.
{{client_token}}{{software_token}}2084647truetrueResponse_200
No content
GET /UpdateWorkorder/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Response_200
No content
This API is used to update an existing workorder. The row_id of workorder_no can be used to identify the specific workorder.
{{client_token}}{{software_token}}1909257workorder_no05-03-201616%3A45671Response_200
No content
POST /UpdateWorkorder/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Response_200
No content
A workorder contains the following data:
Id
WBA database unique row number
WorkorderNo
Unique number originated from ERP/CRM
Order Nr
Unique Workorder number created in tablet app
WorkDate
Scheduled date for work (d-m-Y)
WorkTime
Scheduled time for work (H:i)
WorkEndDate
Scheduled end date for work (d-m-Y)
WorkEndTime
Scheduled end time for work (H:i)
ProjectNr
Internal Project number
ExternProjectNr
External Project number
CustomerName
Customer name
CustomerDebtorNr
Customer debtor number
CustomerStreet
Customer street
CustomerStreetNo
Customer street number
CustomerEmail
Customer Email
CustomerZIP
Customer zip code
CustomerCity
Customer city
CustomerContactPerson
Customer contact person
CustomerPhone
Customer phone number
CustomerRemark
Customer remark
CustomerNameInvoice
Invoice customer name
CustomerDebtorNrInvoice
Invoice customer debtor number
CustomerStreetInvoice
Invoice customer street name
CustomerStreetNoInvoice
Invoice customer street number
CustomerEmailInvoice
Invoice customer email
CustomerZIPInvoice
Invoice customer zip code
CustomerCityInvoice
Invoice customer city
CustomerContactPersonInvoice
Invoice customer contact person
CustomerPhoneInvoice
Invoice customer phone number
CustomerRemarkInvoice
Invoice customer remark
TypeOfWork
Installatie, Garantie, Levering, Onderhoud, Project, Regie, Reparatie,Service, Storing, Verkoop, Verhuur
WorkDescription
Work description of executed work
WorkInstruction
Work instructions from ERP / CRM (future use)
PaymentMethod
niet van toepassing, op rekening, contact voldaan, pin betaling, conform offerte
CreationDate
Date time of creation of workorder in WBA backoffice
EmployeeNr
Employee Number
Signature
Signature file name
SignatureUrl
Url to download/open signature image
PdfUrl
Url to download/open PDF
WordUrl
Url to download/open Word document
WorksheetCode
Unique code to use when retrieving a document
Status
Status of the workorder
WorkFinished
Indication if the work is finished. When the value is 1 the employee marked the work ready in the tablet.
Archived
Indication if the workorder is archived
Photos
Array of photo objects (URL's)
Workperiods
Array of Workperiods
Materials
Array of used materials (MaterialNr is amount of materials)
Documents
Array of file names
Forms
Array of forms. Each row contains Name, Data and ObjectCode
Employees
Array of employee numbers.
WorkObjects
Array of objects codes.
{{client_token}}{{software_token}}row_idworkorder_notrueResponse_200
No content
GET /GetWorkorder/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Response_200
No content
Use this endpoint to get a list of workorders from the Outsmart account.
To avoid receiving a large amount of workorders at once, please consider adding filters according to your requirements.
Freefields
Additional freefields can be added to the workorder data. To include these in the results, add the URL parameter includeFreefields with value true. Freefields will only be added to the results when declared, use the Freefields endpoint to see which fields have been set. Freefields are numbered 1-50.
Filtering
This endpoint supports filtering options. Read the section on applying filters to the request here. Filters can be applied to the following field values
JobNr
OrderNr
WorkorderNo
Reference
ExternalReference
ProjectNr
WorkDate
WorkTime
WorkEndDate
WorkEndTime
ExternProjectNr
CustomerDebtorNr
CustomerDebtorNrInvoice
TypeOfWork
CreationDate
MutationDate
EmployeeNr
WorkStatus
archived
Example with filters
In order to get specific results, multiple filters can be applied by adding multiple key[], value[], and operator[] URL parameters. For example with the request below:
{api_url}/GetWorkorders/?token={client_token}&software_token={software_token}&status=Compleet&update_status=false&key[]=MutationDate&value[]=2022-01-01 00:00:00&operator[]=ge
The example above makes use of several URL parameters and a filter set on MutationDate to get all the completed workorders that have been modified after new years 2022. The following parameters and filter are applied:
The URL parameter
statusis given the value 'Compleet' to get all completed ordersThe URL parameter
update_statusis given the valuefalseas indication that we don't want the status to be directly updatedA filter is added on the field
MutationDatewith the operator set asge(greaterequals) on the value2022-01-01 00:00:00. This will make sure this request only receives workorders that have been modified after the given date and time.
Additional filters can by applied by adding more of the filter URL parameters. Do note that currently all added filters will be applied as AND, there is currently no way to check 2 filters with OR keyword. So all the applied filters will have to be checked as true on the workorders returned.
{{client_token}}{{software_token}}Possible values: Alle, Klaargezet, Opgehaald, Ingepland, Compleet, Afgehandeld
Boolean value
Determines whether the workorders status should be updated upon being requested. Changes the status for orders that are 'Compleet' to 'Afgehandeld'.
Workstatus given to the workorder. These are custom statusses that can be changed by the user. Use the 'workstatusses' endpoint to get the available statusses for the account
Filter parameter. Name of the field to apply filter to
Filter parameter. Search value for the filter
Filter parameter. Operator applied to the filter query
Boolean value. Determines whether freefields are included in the response. Default value is false
Response_200
No content
GET /GetWorkorders/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Response_200
No content
Last updated
Was this helpful?
