Comprehensive guide to creating work orders via the API.
The core action of the Client API is creating work orders. This is done via a POST request to /workorders.
Before creating a work order, ensure you have the necessary IDs. You cannot "makes up" these values; they must exist in the system.
Where to find IDs:
types_of_work: Call GET /types-of-worktemplate: Call GET /templates (or create one in the UI)project: Call GET /projectslocation: Call GET /locations (for saved locations)A work order is composed of several key objects. You do not need to provide all of them if you use a Template.
Title, Description, and Classification.
{
"title": "Replace POS Terminal",
"description": { "html": "<p>Swap out the defective unit.</p>" },
"types_of_work": [{ "id": 62, "isPrimary": true }]
}Where the work acts.
"location": {
"mode": "custom",
"address1": "123 Main St",
"city": "Minneapolis",
"state": "MN",
"zip": "55401",
"country": "US"
}When the work should be done. Three schedule modes are available:
"schedule": {
"service_window": {
"mode": "exact",
"start": { "utc": "2025-01-15 09:00:00" }
}
}For Hard Start (strict on-time requirement), add require_ontime:
{
"schedule": {
"service_window": {
"mode": "exact",
"start": { "utc": "2025-01-15 09:00:00" }
}
},
"require_ontime": true
}How much you are offering.
"pay": {
"type": "fixed",
"base": { "amount": 150.00, "units": 1 }
}Scenario: Simple job at a specific time with a flat rate.
{
"title":"Install Point of Sale",
"types_of_work":[{ "id": 62, "isPrimary": true }],
"location":{
"mode":"custom",
"address1":"123 Main Street",
"city":"Phoenix",
"state":"AZ",
"zip":"85001",
"country":"US"
},
"schedule":{
"service_window":{
"mode":"exact",
"start":{ "utc":"2025-01-15 13:00:00" }
}
},
"pay":{
"type":"fixed",
"base":{ "amount":400, "units":1 }
}
}Scenario: Rate per hour, with a "Between" service window (Open window).
{
"title":"Troubleshoot Network",
"types_of_work":[{ "id": 76, "isPrimary": true }],
"location":{
"mode":"custom",
"address1":"123 Main Street",
"city":"Phoenix",
"state":"AZ",
"zip":"85001"
},
"schedule":{
"service_window":{
"mode":"between",
"start":{ "utc":"2025-01-15 09:00:00" },
"end":{ "utc":"2025-01-15 17:00:00" }
}
},
"pay":{
"type":"hourly",
"base":{ "amount":45, "units":2 }
}
}Scenario: Using a Template ID (68) to pre-fill description and settings.
{
"title":"Standard Maintenance",
"template":{ "id":68 },
"location":{
"mode":"custom",
"address1":"123 Main Street",
"city":"Phoenix",
"state":"AZ",
"zip":"85001"
},
"schedule":{
"service_window":{
"mode":"exact",
"start":{ "utc":"2025-01-15 13:00:00" }
}
}
}You can pass custom field values if your project requires them.
"custom_fields": {
"results": [
{
"results": [
{ "id": 129, "value": "Store #5521" }
]
}
]
}Add incentives or requirements to the pay structure.
"pay": {
"type": "fixed",
"base": { "amount": 100, "units": 1 },
"bonuses": { "results": [{ "id": 3 }] }
}Validation: Ensure your types_of_work IDs and template IDs are valid in the Production environment, as they differ from Sandbox.
Prop
Type
Last updated on