Field NationDeveloper Platform
Field NationDeveloper Platform
IntroductionQuick StartAPI Playground

Getting Started

API Reference

Quick Start

Get up and running with the Field Nation API in 5 minutes.


Quick Start Guide

This guide will take you from Zero to Published Work Order in three steps.

Prerequisites

  • API Credentials: You need a client_id, client_secret, username, and password.
  • Environment: We will use the Sandbox (https://api.sandbox.fieldnation.com/api/rest/v2) for this guide.

1. Account & Authentication

First, exchange your credentials for an access token.

curl -X POST "https://api.sandbox.fieldnation.com/authentication/api/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "password",
    "client_id": "YOUR_ID",
    "client_secret": "YOUR_SECRET",
    "username": "YOUR_USER",
    "password": "YOUR_PASSWORD"
  }'
{
  "access_token": "eyJ0eXAi...",
  "expires_in": 3600
}

2. Create a Draft Work Order

Create a simple job. We will set it to "Draft" mode so we can review it.

Tip: Use type_of_work: { id: 62 } (Point of Sale) for this test.

curl -X POST "https://api.sandbox.fieldnation.com/api/rest/v2/workorders" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Quick Start Test Job",
    "description": { "html": "<p>This is a test.</p>" },
    "type_of_work": { "id": 62 },
    "location": {
      "mode": "custom",
      "address1": "123 Test St",
      "city": "Minneapolis",
      "state": "MN",
      "zip": "55401",
      "country": "US"
    },
    "pay": {
      "type": "fixed",
      "base": { "amount": 100, "units": 1 }
    },
    "schedule": {
      "service_window": {
        "mode": "exact",
        "start": { "utc": "2024-12-01 09:00:00" }
      }
    }
  }'
{
  "id": 998877,
  "status": { "id": 1, "name": "Draft" }
}

3. Publish to Marketplace

Now that it exists, make it live so providers can see it.

curl -X POST "https://api.sandbox.fieldnation.com/api/rest/v2/workorders/998877/publish" \
  -H "Authorization: Bearer YOUR_TOKEN"

Success! You have just dispatched your first work order programmatically.


Next Steps

Now that you've made your first call, dive deeper into the core systems:

  • Work Order Lifecycle: Understand the states (Route, Assign, Work Done).
  • Create Work Order: Learn about Templates, Bundles, and Custom Fields.
  • Webhooks: Set up real-time event listening.

Last updated on

Introduction

Welcome to the Field Nation Client API documentation.

API Playground

Jump to the REST API v2 playground to explore requests and responses.

On this page

Quick Start Guide
Prerequisites
1. Account & Authentication
2. Create a Draft Work Order
3. Publish to Marketplace
Next Steps