Field NationDeveloper Platform
Field NationDeveloper Platform
IntroductionQuick StartAPI Playground

Getting Started

API Reference

Overview
Create Work OrderSearch & FilterUpdate & Cancel
Work OrdersBasics

Create Work Order

Comprehensive guide to creating work orders via the API.


Creating Work Orders

The core action of the Client API is creating work orders. This is done via a POST request to /workorders.

Endpoint

Prerequisites

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-work
  • template: Call GET /templates (or create one in the UI)
  • project: Call GET /projects
  • location: Call GET /locations (for saved locations)

Payload Structure

A work order is composed of several key objects. You do not need to provide all of them if you use a Template.

1. Basic Info

Title, Description, and Classification.

{
  "title": "Replace POS Terminal",
  "description": { "html": "<p>Swap out the defective unit.</p>" },
  "types_of_work": [{ "id": 62, "isPrimary": true }]
}

2. Location

Where the work acts.

"location": {
  "mode": "custom",
  "address1": "123 Main St",
  "city": "Minneapolis",
  "state": "MN",
  "zip": "55401",
  "country": "US"
}

3. Schedule

When the work should be done. Three schedule modes are available:

  • exact: Must arrive at a specific time
  • between: Arrival within a time window
  • hours: Complete within specified hours from start
"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
}

4. Pay

How much you are offering.

"pay": {
  "type": "fixed",
  "base": { "amount": 150.00, "units": 1 }
}

Complete Examples

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" }
      }
   }
}

Advanced Options

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.

Field Reference

Prop

Type

Related

  • Templates - Pre-fill work order fields
  • Types of Work - Job classifications
  • Locations - Saved locations
  • Workflow - Next: publish and route

Last updated on

Overview

Understand the Work Order lifecycle, key concepts, and resource prerequisites.

Search & Filter

Find work orders using powerful search, filtering, and sorting parameters.

On this page

Creating Work Orders
Endpoint
Prerequisites
Payload Structure
1. Basic Info
2. Location
3. Schedule
4. Pay
Complete Examples
Advanced Options
Field Reference
Related