Field Nation Developer Portal

Welcome to the Field Nation Developer Hub. Here you'll find comprehensive guides and documentation to help you get started integrating Field Nation with the applications and web services you already use.

Get Started    Discussions
Suggest Edits

!Important! ACCESS ALL v2 REST ENDPOINTS

 

Using Postman to access V2 Endpoints

We recommend using a tool such as Postman to view and test our v2 REST API endpoints. A few reasons to use Postman include:

  • Easily create test suites
  • Store information for running tests in different environments
  • Store data for use in other tests
  • On-the-fly testing

There are 278 endpoints available. This documentation does not cover every endpoint available. Please use Postman to see all v2 REST endpoints.

Run in Postman

If you want to manually setup Postman, this guide will help you get Postman set up to target our V2 Endpoints. Once completed postman will contain a collection of V2 endpoints which are configured to pull required information from a list of pre-populated environment templates. Each endpoint also includes a pre-request script that automatically refreshes the access_token based on the user defined in the selected environment template.

Download & Install Postman

https://www.getpostman.com

Import Collection

Open Postman and click the "Import" button.

Select "Import From Link" and paste the following URL into the textbox and click the "Import" button
https://www.getpostman.com/collections/099c12bf164ef565466a

Create Environment Templates

In Postman, you can setup different environments to handle environment variables. For example, you may have a test environment and a production environment.

Click on the Gear Icon and select 'Manage Environments' and then click Add.

We suggest setting up a Sandbox environment and a Production environment.

Add the keys & values below

KEY
VALUE

OATUH_USERNAME

your Field Nation username

OAUTH_PASSWORD

your Field Nation password

host_name

Sandbox: api-sandbox.fndev.net/api/rest/v2
Production: api.fieldnation.com/api/rest/v2

OAUTH_CLIENT_ID

Your unique OAuth client id

OAUTH_CLIENT_SECRET

Your unique OAuth client secret

Putting It All Together

Select an environment template

After selecting a template, click the 'Eye' icon to view the variables configured for the template.

Expand the "mono" collection and select "company > Get clients"

Add your access token as a parameter and click 'Send' to request a list of your clients using the REST API.

Suggest Edits

Sandbox & Production Environments

 

Field Nation has separate Sandbox and Production environments, and you will need a different client_id and client_secret for each environment. We recommend that you test your integration in the Sandbox before going live to Production.

Sandbox
API calls made to: https://api-sandbox.fndev.net/api/rest/v2
User Interface: https://app-sandbox.fndev.net/

Production
API calls made to: https://api.fieldnation.com/api/rest/v2/
User Interface: https://ui.fieldnation.com/login

Requesting Access Tokens

Make a support case request at support.fieldnation.com to request your client_id and client_secret. Please mention your Field Nation Company id. your user id for obtaining the access.

As part of our due diligence process to understand and better serve your integration needs, we will request a call to understand your application and your goals on the integration.

Base URL & Access Token

Your production endpoint should be set as https://api.fieldnation.com/api/rest/v2 and every request must include your access_token as part of the URL parameters.

Your sandbox endpoint should be set as https://api-sandbox.fndev.net/api/rest/v2 and every request must include your access_token as part of the URL parameters.

Suggest Edits

Getting Started

 

Welcome to the Field Nation REST API documentation. Our REST API uses many of the same standards as other APIs you may be familiar with. All requests are simple HTTPS GET, POST, PUT, and DELETE requests that return JSON responses.

Note:

  • Request parameters are not JSON but rather are standard HTTPS keys and values.
    • For POST requests, please ensure parameters are passed in the request body, and not in the query string.
    • All requests MUST use HTTPS.

Authentication

Authentication is done using the OAuth Client Credentials flow. You must include a valid access token with all requests.

Responses

Every response is contained by an envelope. That is, each response has a predictable set of keys with which you can expect to interact:

{
  "metadata": {
    "total": 0,
    "page": 0,
    "pages": 0,
    "per_page": 0,
    "columns": "string"
  },
  "results": [
    {
			...
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "trace": [
    {
      "file": "string",
      "line": 0,
      "function": "string",
      "class": "string",
      "object": {},
      "type": "string",
      "args": [
        {
          "status_code": 0,
          "message": "string"
        }
      ]
    }
  ],
  "fields": "string"
}
Suggest Edits

Production - Request OAuth Token

Endpoint to obtain an OAuth token with Field Nation

 
posthttps://app.fieldnation.com/authentication/api/oauth/token
POST /authentication/api/oauth/token HTTP/1.1
Host: api.fieldnation.com
Content-Type: application/json
Cache-Control: no-cache


{
	"grant_type":"password",
	"client_id":"FN-provided-clientid",
	"client_secret":"FN-provided-clientsecret",
	"username":"FNUserName",
	"password":"FNPassword"
}
var data = JSON.stringify({
  "grant_type": "password",
  "client_id": "FN-provided-clientid",
  "client_secret": "FN-provided-clientsecret",
  "username": "FNUserName",
  "password": "FNPassword"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/authentication/api/oauth/token");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("cache-control", "no-cache");
 

xhr.send(data);
var client = new RestClient("https://api.fieldnation.com/authentication/api/oauth/token");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n\"grant_type\":\"password\",\n\"client_id\":\"FN-provided-clientid\",\n\"client_secret\":\"FN-provided-clientsecret\",\n\"username\":\"FNUserName\",\n\"password\":\"FNPassword\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.fieldnation.com/authentication/api/oauth/token"

	payload := strings.NewReader("{\n\"grant_type\":\"password\",\n\"client_id\":\"FN-provided-clientid\",\n\"client_secret\":\"FN-provided-clientsecret\",\n\"username\":\"FNUserName\",\n\"password\":\"FNPassword\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("cache-control", "no-cache")


	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.fieldnation.com/authentication/api/oauth/token")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\n\"grant_type\":\"password\",\n\"client_id\":\"FN-provided-clientid\",\n\"client_secret\":\"FN-provided-clientsecret\",\n\"username\":\"FNUserName\",\n\"password\":\"FNPassword\"\n}")
  .asString();
<?php
$base_url = 'https://api.fieldnation.com/';

function request($request, $endpoint, $method = 'POST') {
    global $base_url, $token;
    $url = $base_url . $endpoint;
    $request = (array) $request;
    $ch = curl_init();
    
    if (empty($request['grant_type'])) {
        $url = $url . "?access_token=$token";
    }
    if ($method == 'GET') {
        $url .= "&" . http_build_query($request);
    }
    else if (empty($request['grant_type'])) {
        $request = json_encode($request);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                'Content-Type: application/json',
                'Content-Length: ' . strlen($request))
        );
    }
    else {
        $request = http_build_query($request);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'Content-Type: application/x-www-form-urlencoded'
            //'Content-Type: application/json'
        ));
    }
    curl_setopt($ch, CURLOPT_URL, $url);
    if ($method == 'POST') {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
    }
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2); // 2 second timeout!
    curl_setopt($ch, CURLOPT_TIMEOUT, 15); // 15 second timeout!
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    return curl_exec($ch);
}

function requestToken() {
    $request = new StdClass();
    $request->client_id = ''; // FN provided client_id
    $request->client_secret = ''; // FN provided client_secret
    $request->grant_type = 'password';
    $request->username = ''; // FN login
    $request->password = ''; // FN password
    return request($request, 'authentication/api/oauth/token', 'POST');
}


$tokenResponse = json_decode(requestToken());
$token = $tokenResponse->access_token;
echo $token;

?>
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/authentication/api/oauth/token');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json'
));

$request->setBody('{
"grant_type":"password",
"client_id":"FN-provided-clientid",
"client_secret":"FN-provided-clientsecret",
"username":"FNUserName",
"password":"FNPassword"
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
A binary file was returned

You couldn't be authenticated

{
    "access_token": "<string>",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "viewprofile",
    "refresh_token": "<string>"
}
{
    "error": "invalid_client",
    "error_description": "The client credentials are invalid"
}

Body Params

client_id
string
required

Your unique client id obtained from Field Nation

client_secret
string
required

Your unique client secret obtained from Field Nation.

grant_type
string
required

The grant type of this request. Must be set to password.

username
string
required

Your username with Field Nation account

password
string
required

Your password with Field Nation account

 
Suggest Edits

Sandbox - Request OAuth Token

Endpoint to obtain an OAuth token with Field Nation

 
posthttps://api-sandbox.fndev.net/authentication/api/oauth/token
POST /authentication/api/oauth/token HTTP/1.1
Host: api-sandbox.fndev.net
Content-Type: application/json
Cache-Control: no-cache


{
	"grant_type":"password",
	"client_id":"FN-provided-clientid",
	"client_secret":"FN-provided-clientsecret",
	"username":"FNUserName",
	"password":"FNPassword"
}
var data = JSON.stringify({
  "grant_type": "password",
  "client_id": "FN-provided-clientid",
  "client_secret": "FN-provided-clientsecret",
  "username": "FNUserName",
  "password": "FNPassword"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api-sandbox.fndev.net/authentication/api/oauth/token");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("cache-control", "no-cache");
 

xhr.send(data);
var client = new RestClient("https://api-sandbox.fndev.net/authentication/api/oauth/token");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n\"grant_type\":\"password\",\n\"client_id\":\"FN-provided-clientid\",\n\"client_secret\":\"FN-provided-clientsecret\",\n\"username\":\"FNUserName\",\n\"password\":\"FNPassword\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api-sandbox.fndev.net/authentication/api/oauth/token"

	payload := strings.NewReader("{\n\"grant_type\":\"password\",\n\"client_id\":\"FN-provided-clientid\",\n\"client_secret\":\"FN-provided-clientsecret\",\n\"username\":\"FNUserName\",\n\"password\":\"FNPassword\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("cache-control", "no-cache")


	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api-sandbox.fndev.net/authentication/api/oauth/token")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\n\"grant_type\":\"password\",\n\"client_id\":\"FN-provided-clientid\",\n\"client_secret\":\"FN-provided-clientsecret\",\n\"username\":\"FNUserName\",\n\"password\":\"FNPassword\"\n}")
  .asString();
<?php
$base_url = 'https://api-sandbox.fndev.net/';

function request($request, $endpoint, $method = 'POST') {
    global $base_url, $token;
    $url = $base_url . $endpoint;
    $request = (array) $request;
    $ch = curl_init();
    
    if (empty($request['grant_type'])) {
        $url = $url . "?access_token=$token";
    }
    if ($method == 'GET') {
        $url .= "&" . http_build_query($request);
    }
    else if (empty($request['grant_type'])) {
        $request = json_encode($request);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                'Content-Type: application/json',
                'Content-Length: ' . strlen($request))
        );
    }
    else {
        $request = http_build_query($request);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'Content-Type: application/x-www-form-urlencoded'
            //'Content-Type: application/json'
        ));
    }
    curl_setopt($ch, CURLOPT_URL, $url);
    if ($method == 'POST') {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
    }
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2); // 2 second timeout!
    curl_setopt($ch, CURLOPT_TIMEOUT, 15); // 15 second timeout!
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    return curl_exec($ch);
}

function requestToken() {
    $request = new StdClass();
    $request->client_id = ''; // FN provided client_id
    $request->client_secret = ''; // FN provided client_secret
    $request->grant_type = 'password';
    $request->username = ''; // FN login
    $request->password = ''; // FN password
    return request($request, 'authentication/api/oauth/token', 'POST');
}


$tokenResponse = json_decode(requestToken());
$token = $tokenResponse->access_token;
echo $token;

?>
<?php

$request = new HttpRequest();
$request->setUrl('https://api-sandbox.fndev.net/authentication/api/oauth/token');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json'
));

$request->setBody('{
"grant_type":"password",
"client_id":"FN-provided-clientid",
"client_secret":"FN-provided-clientsecret",
"username":"FNUserName",
"password":"FNPassword"
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
A binary file was returned

You couldn't be authenticated

{
    "access_token": "<string>",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "viewprofile",
    "refresh_token": "<string>"
}
{
    "error": "invalid_client",
    "error_description": "The client credentials are invalid"
}

Body Params

client_id
string
required

Your unique client id obtained from Field Nation

client_secret
string
required

Your unique client secret obtained from Field Nation.

grant_type
string
required

The grant type of this request. Must be set to password.

username
string
required

Your username with Field Nation account

password
string
required

Your password with Field Nation account

 
Suggest Edits

Frequently Asked Questions

 

Do you have a sandbox environment to build and test with?

Yes, we do. Please request a client_id and client_secret to the sandbox account.

How do I get a client_id and client_secret?

Make a support case request at https://support.fieldnation.com/s/submit-case to request your client_id and client_secret. Please mention your Field Nation Company id.

As part of our due diligence process to understand and better serve your integration needs, we will request a call to understand your application and your goals on the integration.

  • Environment URL (sandbox or production)
  • Company ID
  • Company Name

Are timestamps sent as UTC?

We provide both the UTC value as well as the local time of the work order based on the service location address.

Who can I contact for help?

Make a support case request at https://support.fieldnation.com/s/submit-case to request help.

Suggest Edits

Country Codes (ISO "ALPHA-2 Code")

 

The list below includes all country codes that can be used to create work orders. When using these codes to create work orders, you must pass them as strings.

Please use ISO "ALPHA-2 Code" when passing country information to Field Nation.

Country or Area Name
ISO "ALPHA-2 Code"

United States of America

US

Austria

AT

Belgium

BE

Brazil

BR

Canada

CA

Chile

CL

China

CN

Czech Republic

CZ

Germany

DE

Denmark

DK

Estonia

EE

Spain

ES

Finland

FI

France

FR

United Kingdom

GB

Greece

GR

Croatia

HR

Hungary

HU

Ireland (Eire)

IE

Italy

IT

Korea, Republic Of

KR

Lithuania

LT

Luxembourg

LU

Latvia

LV

Malta

MT

Mexico

MX

Netherlands

NL

Norway

NO

Phillippines

PH

Poland

PL

Portugal

PT

Romania

RO

Sweden

SE

Slovenia

SI

Slovakia

SK

Switzerland

CH

Suggest Edits

Types of Work

 
gethttps://api.fieldnation.com/api/rest/v2/types-of-work
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://ui.fieldnation.com/v2/types-of-work?access_token=91190b7e2d641b48f56b969f025c65f5bc5e3658",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache",
    "postman-token": "88cd4237-f2ac-d043-e9ac-8dc0dd573fde"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://ui.fieldnation.com/v2/types-of-work?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://ui.fieldnation.com/v2/types-of-work?access_token=",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
A binary file was returned

You couldn't be authenticated

{
    "actions": [],
    "metadata": {
        "total": 27,
        "page": 1,
        "pages": 1,
        "per_page": 5000,
        "columns": "industry_name:175,type_of_work_name:175,type_of_work_id:175",
        "view": "list",
        "sort": "",
        "order": "asc",
        "available_columns": [
            {
                "group": "Type",
                "items": [
                    {
                        "id": "type_of_work_id",
                        "label": "Id",
                        "group": "Type",
                        "order": 100,
                        "icon": "",
                        "selected": true,
                        "can_sort": false,
                        "sort_dir": ""
                    },
                    {
                        "id": "type_of_work_name",
                        "label": "Name",
                        "group": "Type",
                        "order": 100,
                        "icon": "",
                        "selected": true,
                        "can_sort": false,
                        "sort_dir": ""
                    }
                ]
            },
            {
                "group": "Industry",
                "items": [
                    {
                        "id": "industry_name",
                        "label": "Name",
                        "group": "Industry",
                        "order": 100,
                        "icon": "",
                        "selected": true,
                        "can_sort": false,
                        "sort_dir": ""
                    }
                ]
            }
        ],
        "available_filters": [
            {
                "id": false,
                "label": "Load"
            }
        ]
    },
    "params": [],
    "results": [
        {
            "id": 70,
            "industry": "Other",
            "name": "Adjustable Bed Bases"
        },
        {
            "id": 60,
            "industry": "Information Technology / Communications",
            "name": "Audio-Visual / Home Theater"
        },
        {
            "id": 63,
            "industry": "Information Technology / Communications",
            "name": "Automated Teller Machine (ATM)"
        },
        {
            "id": 56,
            "industry": "Construction / Trades",
            "name": "Carpentry / Fixture Install"
        },
        {
            "id": 65,
            "industry": "Information Technology / Communications",
            "name": "CCTV / Alarm Systems"
        },
        {
            "id": 76,
            "industry": "Information Technology / Communications",
            "name": "Copier"
        },
        {
            "id": 61,
            "industry": "Information Technology / Communications",
            "name": "Desktop/Laptop"
        },
        {
            "id": 69,
            "industry": "Information Technology / Communications",
            "name": "Fiber Cabling"
        },
        {
            "id": 74,
            "industry": "Other",
            "name": "General Tasks"
        },
        {
            "id": 59,
            "industry": "Construction / Trades",
            "name": "High Voltage Wiring"
        },
        {
            "id": 8,
            "industry": "Construction / Trades",
            "name": "HVAC"
        },
        {
            "id": 64,
            "industry": "Information Technology / Communications",
            "name": "Kiosk"
        },
        {
            "id": 68,
            "industry": "Information Technology / Communications",
            "name": "Low Voltage Cabling"
        },
        {
            "id": 75,
            "industry": "Retail",
            "name": "Merchandising"
        },
        {
            "id": 4,
            "industry": "Information Technology / Communications",
            "name": "Networking"
        },
        {
            "id": 50,
            "industry": "Other",
            "name": "Other"
        },
        {
            "id": 58,
            "industry": "Construction / Trades",
            "name": "Plumbing"
        },
        {
            "id": 62,
            "industry": "Information Technology / Communications",
            "name": "Point of Sale (POS)"
        },
        {
            "id": 54,
            "industry": "Information Technology / Communications",
            "name": "Printer"
        },
        {
            "id": 71,
            "industry": "Information Technology / Communications",
            "name": "Pro A/V, Digital Signage"
        },
        {
            "id": 72,
            "industry": "Other",
            "name": "Project Manager"
        },
        {
            "id": 57,
            "industry": "Information Technology / Communications",
            "name": "Satellite"
        },
        {
            "id": 51,
            "industry": "Other",
            "name": "Secret Shopping"
        },
        {
            "id": 66,
            "industry": "Information Technology / Communications",
            "name": "Server Hardware/Software"
        },
        {
            "id": 1,
            "industry": "Professional Services",
            "name": "Software Development"
        },
        {
            "id": 67,
            "industry": "Information Technology / Communications",
            "name": "Structured Cabling"
        },
        {
            "id": 3,
            "industry": "Information Technology / Communications",
            "name": "Telecom / VOIP"
        }
    ]
}

Query Params

access_token
string
required
 
Suggest Edits

Expense Categories

 
gethttps://api.fieldnation.com/api/rest/v2/company/expenses?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/company/expenses?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/company/expenses',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/company/expenses?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/company/expenses?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/company/expenses"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "metadata": {
        "total": 9,
        "per_page": 9,
        "pages": 1,
        "page": 1
    },
    "results": [
        {
            "uid": 5,
            "id": 5,
            "company_expense_id": 0,
            "label": "Freight",
            "description": "",
            "type": "system",
            "actions": []
        },
        {
            "uid": 1,
            "id": 1,
            "company_expense_id": 0,
            "label": "Personal Material Costs (Other Materials)",
            "description": "",
            "type": "system",
            "actions": []
        },
        {
            "uid": 4,
            "id": 4,
            "company_expense_id": 0,
            "label": "Real Material Costs (attached to land/building)",
            "description": "",
            "type": "system",
            "actions": []
        },
        {
            "uid": 3,
            "id": 3,
            "company_expense_id": 0,
            "label": "Scope-of-Work Change",
            "description": "",
            "type": "system",
            "actions": []
        },
        {
            "uid": 6,
            "id": 6,
            "company_expense_id": 0,
            "label": "Taxes",
            "description": "",
            "type": "system",
            "actions": []
        },
        {
            "uid": 2,
            "id": 2,
            "company_expense_id": 0,
            "label": "Travel Expense",
            "description": "",
            "type": "system",
            "actions": []
        },
        {
            "uid": 0,
            "id": 0,
            "company_expense_id": 0,
            "label": "Uncategorized",
            "description": "",
            "type": "system",
            "actions": []
        },
        {
            "uid": -170,
            "id": 0,
            "company_expense_id": 170,
            "label": "Freight -$1.00",
            "description": "Freight",
            "amount": 1,
            "type": "custom",
            "actions": [
                "delete",
                "edit"
            ]
        },
        {
            "uid": -169,
            "id": 0,
            "company_expense_id": 169,
            "label": "Taxes -$10.00",
            "description": "Taxes",
            "amount": 10,
            "type": "custom",
            "actions": [
                "delete",
                "edit"
            ]
        }
    ],
    "actions": [
        "add"
    ]
}

Query Params

access_token
string
required
 
Suggest Edits

Location Types

 
gethttps://api.fieldnation.com/api/rest/v2/locations/location-types
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/locations/location-types?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/locations/location-types',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/locations/location-types?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/locations/location-types?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/locations/location-types"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "status_code": 400,
    "message": "Argument 1 passed to FieldNation\\Framework\\RestController::addDepth() must be of the type array, boolean given, called in /var/www/html/modules/Locations/Api/v2/Details.php on line 172 and defined"
}

Query Params

access_token
string
required
 

Add example on how to search for specific location by name or id,

Suggest Edits

Service Types

 

To set the service type when creating a work order, pass the service type ID to the service_types fields.

Based on the type of work selected, the service types available will change

{
    "type_of_work": {
        "id": 63
    },
    "project": {
        "id": 11741
    },
    "client": {
        "id": 34930
    },
    "title": "ATM Maintenance",
    "team": {
        "id": 0
    },
    "service_types": [
            {id: 15},
      			{id: 18},
      			{id: 17},
      			{id: 19},
      			{id: 16}
        ]
}
Type of Work
Service Type
Service_types ID

Adjustable Bed Bases

Installation

102

Adjustable Bed Bases

Removal

105

Adjustable Bed Bases

Repair

104

Adjustable Bed Bases

Site Survey

106

Adjustable Bed Bases

Troubleshooting

103

Audio-Visual / Home Theater

Installation

48

Audio-Visual / Home Theater

Removal

51

Audio-Visual / Home Theater

Repair

50

Audio-Visual / Home Theater

Site Survey

52

Audio-Visual / Home Theater

Troubleshooting

49

Automated Teller Machine (ATM)

Installation

66

Automated Teller Machine (ATM)

Removal

69

Automated Teller Machine (ATM)

Repair

68

Automated Teller Machine (ATM)

Site Survey

70

Automated Teller Machine (ATM)

Troubleshooting

67

CCTV / Alarm Systems

Installation

76

CCTV / Alarm Systems

Removal

79

CCTV / Alarm Systems

Repair

78

CCTV / Alarm Systems

Site Survey

80

CCTV / Alarm Systems

Troubleshooting

77

Desktop / Laptop

Backup

57

Desktop / Laptop

Imaging

58

Desktop / Laptop

Installation

53

Desktop / Laptop

Removal

55

Desktop / Laptop

Restore

59

Desktop / Laptop

Setup

60

Desktop / Laptop

Site Survey

56

Desktop / Laptop

Troubleshooting

54

Fiber Cabling

Installation

96

Fiber Cabling

Removal

98

Fiber Cabling

Repair

97

Fiber Cabling

Site Survey

99

Fiber Cabling

Splicing

100

Fiber Cabling

Testing

101

General Tasks

N/A

N/A

HVAC

Installation

15

HVAC

Removal

18

HVAC

Repair

17

HVAC

Site Survey

19

HVAC

Troubleshooting

16

Kiosk

Installation

71

Kiosk

Removal

74

Kiosk

Repair

73

Kiosk

Site Survey

75

Kiosk

Troubleshooting

72

Merchandising

N/A

N/A

Networking

Installation

10

Networking

Removal

13

Networking

Repair

12

Networking

Site Survey

14

Networking

Troubleshooting

11

Other

Installation

20

Other

Removal

23

Other

Repair

22

Other

Site Survey

24

Other

Troubleshooting

21

Point of Sales (POS)

Installation

61

Point of Sales (POS)

Removal

64

Point of Sales (POS)

Repair

63

Point of Sales (POS)

Site Survey

65

Point of Sales (POS)

Troubleshooting

62

Printer

Installation

27

Printer

Removal

30

Printer

Repair

29

Printer

Site Survey

31

Printer

Troubleshooting

28

Pro A/V, Digital Signage

Installation

107

Pro A/V, Digital Signage

Programming

112

Pro A/V, Digital Signage

Removal

110

Pro A/V, Digital Signage

Repair

109

Pro A/V, Digital Signage

Site Survey

111

Pro A/V, Digital Signage

Troubleshooting

108

Server Hardware/Software

Installation

81

Server Hardware/Software

Removal

84

Server Hardware/Software

Repair

83

Server Hardware/Software

Site Survey

85

Server Hardware/Software

Troubleshooting

82

Structured Cabling

Installation

86

Structured Cabling

Removal

89

Structured Cabling

Repair

88

Structured Cabling

Site Survey

90

Structured Cabling

Troubleshooting

87

Telecom / VOIP

Installation

5

Telecom / VOIP

Removal

8

Telecom / VOIP

Repair

7

Telecom / VOIP

Site Survey

9

Telecom / VOIP

Troubleshooting

6

Suggest Edits

Problem Types

 

Use problem types to submit problems on a work order.

{
  "types": [
  {
    "id": 22,
    "name": "I can't find a provider",
  },
  {
    "id": 24,
    "name": "Provider did not show up - cancel WO",
  },
  {
    "id": 25,
    "name": "Provider did not show up - reschedule WO/update ETA",
  }, 
  {
    "id": 30,
    "name": "Onsite work is not complete",
  },
  {
    "id": 31,
    "name": "Internal Issue with my company",
  },
  {
    "id": 33,
    "name": "How to/platform help",
  },
  {
    "id": 40,
    "name": "Payment /Expense/Fee amount is not accurate",
  },
  {
    "id": 41,
    "name": "Provider unresponsive before assignment",
  },
  {
    "id": 42,
    "name": "Provider is onsite - cannot reach",
  },
  {
    "id": 43,
    "name": "Deliverables/Closing WO is not complete",
  },
  {
    "id": 44,
    "name": "Missing parts",
  },
  {
    "id": 45,
    "name": "Provider did not show - remove provider from WO",
  }]
}
Suggest Edits

Work order Status

Explains about the all the work order status and its sub status.

 

The REST API provides you the status and the sub status as separate fields and the pre-packaged integrations will provide them as a single field with both the fields is concatenated as one, If there is no sub status then on the main status will be displayed

Status and Sub-status

The pattern of the status will be as follows "Main status"+":"+"Sub status"

Draft | Work order is only viewable by users who are part of the company that created the work order

Published | Work order is visible to service providers who can request work on the marketplace

Routed | Work order is visible to service providers to whom this work order is routed. Work order
will be assigned to the first service provider that accepts the routed work order

Cancelled | The buyer has cancelled the work order

Assigned | Work order is assigned to a service provider; this happens upon acceptance of a route or assignment of a requesting service provider

Assigned:ETA Set | Service provider has set Estimated Time of Arrival (ETA); this may occur at any point after assignment

Assigned:Confirmed | Service provider has confirmed that they are ready to perform work; this may occur starting at 6:00 am (WO time zone) the day previous to the scheduled start time of the work order

Assigned:Checked in | Service provider has arrived to site and has checked in

Assigned:Checked out | Service provider is leaving site and has checked out

Assigned:At risk | Service provider has NOT confirmed that they are still ready to perform work; this may occur starting at 12:00 noon (WO time zone) the day previous to the scheduled start time of the work order

Assigned:On my way | Service provider has indicated that they are on their way to the job site

Assigned:On hold | The buyer has placed this work order on hold - this could be for a number of reasons

Assigned:Delayed | Service provider has indicated that they are running late and will not be to site by the stated start time

Assigned:Canceled | Service provider has indicated thay they can no longer make it to the assigned work order

Work Done | Service provider has marked that the work has been completed

Work Done:Increase Requested | Service provider has marked the work order as complete and has requested increase in pay or an approval of an expense

Approved | Work order has been approved for payment

Paid | Work order has been paid

Suggest Edits

Pay Types / Pay Modes

 
Pay Type
Display Value
Integration Value

Fixed

Fixed

fixed

Per Hour

Per Hour

hourly

Per Device

Per Device

device

Blended

Blended

blended

Suggest Edits

Clients and Projects of Clients

Get a list of clients and projects of the clients

 
gethttps://api.fieldnation.com/api/rest/v2/company/clients
curl --request GET \
  --url https://api.fieldnation.com/api/rest/v2/company/clients
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/company/clients' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/company/clients")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/company/clients");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/company/clients"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

access_token
string
 
Suggest Edits

Get Templates

 
gethttps://api.fieldnation.com/api/rest/v2/templates?default_view=list&list=templates_all&sticky=1
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/templates?access_token=access_token&sticky=1&list=templates_all&default_view=list'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/templates',
  qs: 
   { access_token: 'access_token',
     sticky: '1',
     list: 'templates_all',
     default_view: 'list' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/templates?access_token=access_token&sticky=1&list=templates_all&default_view=list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/templates?access_token=access_token&sticky=1&list=templates_all&default_view=list");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/templates"

querystring = {"access_token":"access_token","sticky":"1","list":"templates_all","default_view":"list"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

access_token
string
required
 
Suggest Edits

Create Work Order

Create your work order with a title, service description, project, template, manager, custom fields, schedule, and pay

 
posthttps://api.fieldnation.com/api/rest/v2/workorders
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders?access_token=",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": "{\r\n  \"id\": 0,\r\n  \"networks\": [\r\n    {\r\n      \"id\": 0,\r\n      \"name\": \"string\"\r\n    }\r\n  ],\r\n  \"correlation_id\": \"string\",\r\n  \"printable\": true,\r\n  \"allow_counter_offers\": true,\r\n  \"closing_notes\": \"string\",\r\n  \"title\": \"Hello World\",\r\n  \"assignee\": {\r\n    \"correlation_id\": \"string\",\r\n    \"role\": \"string\",\r\n    \"work_order_id\": 0,\r\n    \"status_id\": 0,\r\n    \"actions\": [\r\n      \"unassign\"\r\n    ],\r\n    \"reason_id\": 0,\r\n    \"comment\": \"string\"\r\n  },\r\n  \"type_of_work\": {\r\n    \"id\": 61,\r\n    \"industry\": \"Information Technology / Communications\",\r\n    \"name\": \"Desktop/Laptop\"\r\n  },\r\n  \"manager\": {\r\n    \"id\": 0,\r\n    \"first_name\": \"string\",\r\n    \"last_name\": \"string\",\r\n    \"email\": \"string\",\r\n    \"phone\": \"string\"\r\n  },\r\n  \"template\": {\r\n    \"id\": 0,\r\n    \"name\": \"string\"\r\n  },\r\n  \"project\": {\r\n    \"id\": 0,\r\n    \"name\": \"string\"\r\n  },\r\n  \"description\": {\r\n    \"html\": \"<p>Hello World</p>\",\r\n    \"markdown\": \"string\",\r\n    \"actions\": [\r\n      \"edit\"\r\n    ]\r\n  },\r\n  \"location\": {\r\n\t\"mode\":\"custom\",\r\n\t\"address1\":\"910 S Marquette Ave\",\r\n\t\"address2\":\"\",\r\n\t\"city\":\"Minneapolis\",\r\n\t\"state\":\"MN\",\r\n\t\"zip\":\"55402\",\r\n\t\"country\":\"US\",\r\n\t\"type\":{\"id\":1},\r\n\t\"saved_location\":null\r\n  }\r\n}\r\n"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
curl -X POST \
  'https://api.fieldnation.com/api/rest/v2/workorders?access_token=' \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
  "printable": true,
  "allow_counter_offers": true,
  "type_of_work": {
    "id": 61,
    "industry": "Information Technology / Communications",
    "name": "Desktop/Laptop"
  },
  "manager": {
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone": "string"
  },
  "template": {
    "id": 0,
    "name": "string"
  },
  "project": {
    "id": 0,
    "name": "string"
  },
  "title": "Hello World",
  "description": {
    "html": "<p>Hello World</p>",
    "markdown": "string",
    "actions": [
      "edit"
    ]
  },
  "location": {
	"mode":"custom",
	"address1":"910 S Marquette Ave",
	"address2":"",
	"city":"Minneapolis",
	"state":"MN",
	"zip":"55402",
	"country":"US",
	"type":{"id":1},
	"saved_location":null
  },
  "pay": {
    "type": "hourly",
    "minimum_payment": 0,
    "base": {
      "units": 2,
      "amount": 35
    },
    "additional": {
      "units": 0,
      "amount": 0
    },
    "range": {
      "min": 0,
      "max": 0
    }
  },
  "schedule": {
        "service_window": {
            "mode": "exact",
            "start": {
                "local": {
                    "date": "2017-11-21",
                    "time": "07:00:00"
                },
                "utc": "2017-11-21 14:00:00"
            },
            "end": {
                "local": {
                    "date": "",
                    "time": ""
                },
                "utc": ""
            }
        },
        "time_zone": {
            "id": 9,
            "name": "America/Boise",
            "offset": -1,
            "short": "MST"
        }
    },
  "custom_fields": {
        "results": [
            {
                "results": [
                    {
                        "id": 5,
                        "value": "ACC-1004-C"
                    }
                ]
            }
        ]
    }
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

$request->setBody('{
  "printable": true,
  "allow_counter_offers": true,
  "type_of_work": {
    "id": 61,
    "industry": "Information Technology / Communications",
    "name": "Desktop/Laptop"
  },
  "manager": {
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone": "string"
  },
  "template": {
    "id": 0,
    "name": "string"
  },
  "project": {
    "id": 0,
    "name": "string"
  },
  "title": "Hello World",
  "description": {
    "html": "<p>Hello World</p>",
    "markdown": "string",
    "actions": [
      "edit"
    ]
  },
  "location": {
	"mode":"custom",
	"address1":"910 S Marquette Ave",
	"address2":"",
	"city":"Minneapolis",
	"state":"MN",
	"zip":"55402",
	"country":"US",
	"type":{"id":1},
	"saved_location":null
  },
  "pay": {
    "type": "hourly",
    "minimum_payment": 0,
    "base": {
      "units": 2,
      "amount": 35
    },
    "additional": {
      "units": 0,
      "amount": 0
    },
    "range": {
      "min": 0,
      "max": 0
    }
  }
}
');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"printable\": true,\r\n  \"allow_counter_offers\": true,\r\n  \"type_of_work\": {\r\n    \"id\": 61,\r\n    \"industry\": \"Information Technology / Communications\",\r\n    \"name\": \"Desktop/Laptop\"\r\n  },\r\n  \"manager\": {\r\n    \"id\": 0,\r\n    \"first_name\": \"string\",\r\n    \"last_name\": \"string\",\r\n    \"email\": \"string\",\r\n    \"phone\": \"string\"\r\n  },\r\n  \"template\": {\r\n    \"id\": 0,\r\n    \"name\": \"string\"\r\n  },\r\n  \"project\": {\r\n    \"id\": 0,\r\n    \"name\": \"string\"\r\n  },\r\n  \"title\": \"Hello World\",\r\n  \"description\": {\r\n    \"html\": \"<p>Hello World</p>\",\r\n    \"markdown\": \"string\",\r\n    \"actions\": [\r\n      \"edit\"\r\n    ]\r\n  },\r\n  \"location\": {\r\n\t\"mode\":\"custom\",\r\n\t\"address1\":\"910 S Marquette Ave\",\r\n\t\"address2\":\"\",\r\n\t\"city\":\"Minneapolis\",\r\n\t\"state\":\"MN\",\r\n\t\"zip\":\"55402\",\r\n\t\"country\":\"US\",\r\n\t\"type\":{\"id\":1},\r\n\t\"saved_location\":null\r\n  },\r\n  \"pay\": {\r\n    \"type\": \"hourly\",\r\n    \"minimum_payment\": 0,\r\n    \"base\": {\r\n      \"units\": 2,\r\n      \"amount\": 35\r\n    },\r\n    \"additional\": {\r\n      \"units\": 0,\r\n      \"amount\": 0\r\n    },\r\n    \"range\": {\r\n      \"min\": 0,\r\n      \"max\": 0\r\n    }\r\n  }\r\n}\r\n",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
  "printable": true,
  "allow_counter_offers": true,
  "type_of_work": {
    "id": 61,
    "industry": "Information Technology / Communications",
    "name": "Desktop/Laptop"
  },
  "manager": {
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone": "string"
  },
  "template": {
    "id": 0,
    "name": "string"
  },
  "project": {
    "id": 0,
    "name": "string"
  },
  "title": "Hello World",
  "description": {
    "html": "<p>Hello World</p>",
    "markdown": "string",
    "actions": [
      "edit"
    ]
  },
  "location": {
	"mode":"custom",
	"address1":"910 S Marquette Ave",
	"address2":"",
	"city":"Minneapolis",
	"state":"MN",
	"zip":"55402",
	"country":"US",
	"type":{"id":1},
	"saved_location":null
  },
  "pay": {
    "type": "hourly",
    "minimum_payment": 0,
    "base": {
      "units": 2,
      "amount": 35
    },
    "additional": {
      "units": 0,
      "amount": 0
    },
    "range": {
      "min": 0,
      "max": 0
    }
  },
  "schedule": {
        "service_window": {
            "mode": "exact",
            "start": {
                "local": {
                    "date": "2017-11-21",
                    "time": "07:00:00"
                },
                "utc": "2017-11-21 14:00:00"
            },
            "end": {
                "local": {
                    "date": "",
                    "time": ""
                },
                "utc": ""
            }
        },
        "time_zone": {
            "id": 9,
            "name": "America/Boise",
            "offset": -1,
            "short": "MST"
        }
    },
  "custom_fields": {
        "results": [
            {
                "results": [
                    {
                        "id": 5,
                        "value": "ACC-1004-C"
                    }
                ]
            }
        ]
    }
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

access_token
string
required

Body Params

work_order
json
required
 
Suggest Edits

Company Managers

 
gethttps://api.fieldnation.com/api/rest/v2/company/managers?access_token=access_token
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/company/managers?access_token=",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/company/managers?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/company/managers');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
A binary file was returned

You couldn't be authenticated

[
    {
        "id": 0,
        "first_name": "string",
        "last_name": "string"
    },
    {
        "id": 0,
        "first_name": "string",
        "last_name": "string"
    }
]

Query Params

access_token
string
required
 
Suggest Edits

Cancel / Delete a Work Order

 
deletehttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id?access_token=access_token&async=async
{notes: "message to field nation support", cancel_reason: 58, message_to_provider: "", cancel_request_not_charge: false}
{"cancel_reason":0,"notes":"","cancel_request_not_charge":false,"message_to_provider":""}
{"notes":"message to field nation support","cancel_reason":7,"message_to_provider":"message to assigned provider","cancel_request_not_charge":false,"apply_passive_cancellation_fee":false}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
async
boolean

Headers

payload
json

{"notes":"message to field nation support","cancel_reason":58,"message_to_provider":"message to assigned provider","cancel_request_not_charge":false,"apply_passive_cancellation_fee":false}

 
Suggest Edits

Publish by Work Order

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Unpublish by Work Order

 
deletehttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token
curl --request DELETE \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/publish"

querystring = {"access_token":"access_token"}

response = requests.request("DELETE", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Revert Work Order to Draft

 
deletehttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/draft?access_token=access_token
curl --request DELETE \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/draft?access_token=access_token'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/draft',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/draft?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/draft?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/draft"

querystring = {"access_token":"access_token"}

response = requests.request("DELETE", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Requests by Work Order

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/providers?view=list&sticky=1&list=find_providers_pending_assignment
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders/{work_order_id}/providers?view=list&sticky=1&list=find_providers_pending_assignment&access_token={access_token}",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/{work_order_id}/providers?view=list&sticky=1&list=find_providers_pending_assignment&access_token={access_token}');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/{work_order_id}/providers?view=list&sticky=1&list=find_providers_pending_assignment&access_token={access_token}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
  "request": {
    "id": 123456,
    "schedule": {
    "eta": {
    "mode": "exact",
    "start": {
    "utc": "",
    "local": {
    "date": "",
    "time": ""
  }
  },
    "end": {
    "utc": "",
    "local": {
    "date": "",
    "time": ""
  }
  },
    "hour_estimate": "0"
  }
  },
    "counter_notes": "",
    "counter": false,
    "work_order": {
    "id": 123456
  },
    "user": {
      "id": 123456
  },
    "notes": "",
    "hour_estimate": 4,
    "expires": {
    "utc": "",
    "local": {
    "date": "",
    "time": ""
  }
  },
    "pay": {
    "type": "",
    "term": {
    "id": 0,
    "explanation": ""
  },
    "base": {
    "amount": 0,
    "units": 0
  },
    "additional": {
    "amount": 0,
    "units": 0
  },
    "labor_sum": 0,
    "max_pay": 0
  },
    "active": true,
    "expired": false,
    "created": {
    "utc": "2018-02-05 15:20:58",
    "local": {
    "date": "2018-02-05",
    "time": "10:20:58"
  }
  },
    "type": 1,
    "arrival": {
    "utc": "2018-03-19 23:00:00",
    "local": {
    "date": "2018-03-19",
    "time": "19:00:00"
  }
  },
    "expenses": {
    "results": [],
    "total": 0,
    "pending": 0
  }
}

Path Params

work_order_id
int32
required

Work Order Id

Query Params

access_token
string
required
 
Suggest Edits

Request by Request ID

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/requests/request_id?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/requests/request_id?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/requests/request_id',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/requests/request_id?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/requests/request_id?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/requests/request_id"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
request_id
int32
required

Query Params

access_token
string
required
async
boolean
 
Suggest Edits

Assign Provider By Work Order

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/assignee?access_token=access_token
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/assignee?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/assignee',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/assignee?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/assignee?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/assignee"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "code": 0,
  "message": "string",
  "trace": [
    {
      "file": "string",
      "line": 0,
      "function": "string",
      "class": "string",
      "object": {},
      "type": "string",
      "args": [
        {
          "status_code": 0,
          "message": "string"
        }
      ]
    }
  ],
  "fields": "string"
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
async
boolean

Body Params

assignee
string
required
 
Suggest Edits

Route Work Order to Provider

Route a work order to a provider

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/route?access_token=access_token
curl -X POST \
  'https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/route?async=%7B%7Basync%7D%7D&access_token=' \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/route?async=%7B%7Basync%7D%7D&access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/route');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'async' => '{{async}}',
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/x-www-form-urlencoded',
  'accept' => 'application/json'
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(null);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
A binary file was returned

You couldn't be authenticated

{
    "id": 12345,
    "rating": {
        "marketplace": {
            "total_ratings": 0,
            "stars": 0
        },
        "my_company": {
            "total_ratings": 0,
            "stars": 0
        }
    },
    "first_name": "Bill",
    "last_name": "Boberson",
    "w2": true,
    "cell": "",
    "thumbnail": "URL_STRING",
    "city": "Minneapolis",
    "state": "MN",
    "country": "US",
    "correlation_id": "string",
    "company": {
        "technicians": 4,
        "id": 34929,
        "name": "KDB Enterprises",
        "role": {
            "marketplace_manager": false
        },
        "service_company_verified": false,
        "vendors": []
    },
    "last_active": {
        "utc": "2017-09-25 15:48:14"
    },
    "created_date": {
        "utc": "2016-05-12 14:23:28"
    },
    "about": "About",
    "time_zone": {
        "id": 4,
        "name": "America/Chicago",
        "offset": "-5"
    },
    "background_checks": [],
    "drug_tests": [],
    "credit_check": true,
    "driving_records_check": false,
    "protec": false,
    "worker_compensation": false,
    "routable": true,
    "marketplace": false
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

route
json
required

{"technician":{ "id": 12345}}

 
Suggest Edits

Unroute Work Order to Provider

Unroute a user from a work order

 
deletehttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/route?access_token=access_token
curl --request DELETE \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/route?access_token=access_token'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/route',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/route?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/route?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/route"

querystring = {"access_token":"access_token"}

response = requests.request("DELETE", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "id": 12345,
    "rating": {
        "marketplace": {
            "total_ratings": 0,
            "stars": 0
        },
        "my_company": {
            "total_ratings": 0,
            "stars": 0
        }
    },
    "first_name": "Bill",
    "last_name": "Boberson",
    "w2": true,
    "cell": "",
    "thumbnail": "URL_STRING",
    "city": "Minneapolis",
    "state": "MN",
    "country": "US",
    "correlation_id": "string",
    "company": {
        "technicians": 4,
        "id": 34929,
        "name": "KDB Enterprises",
        "role": {
            "marketplace_manager": false
        },
        "service_company_verified": false,
        "vendors": []
    },
    "last_active": {
        "utc": "2017-09-25 15:48:14"
    },
    "created_date": {
        "utc": "2016-05-12 14:23:28"
    },
    "about": "About",
    "time_zone": {
        "id": 4,
        "name": "America/Chicago",
        "offset": "-5"
    },
    "background_checks": [],
    "drug_tests": [],
    "credit_check": true,
    "driving_records_check": false,
    "protec": false,
    "worker_compensation": false,
    "routable": true,
    "marketplace": false
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

route
json
required

{"technician": {"id": 12345}}

 
Suggest Edits

Preferred Providers

 
gethttps://api.fieldnation.com/api/rest/v2/company/preferred-providers?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/company/preferred-providers?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/company/preferred-providers',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/company/preferred-providers?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/company/preferred-providers?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/company/preferred-providers"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

access_token
string
required
 
Suggest Edits

Auto Dispatch Work Orders

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/auto_dispatch?access_token=access_token
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders/auto_dispatch?access_token=",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache",
  },
  "processData": false,
  "data": "{\r\n  \"work_order_ids\": [\r\n    4093403\r\n  ],\r\n  \"selection_rule_id\": 0,\r\n  \"delay\": 0,\r\n  \"w2_skippub\": true,\r\n  \"w2_failswitch\": true,\r\n  \"should_route\": true\r\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/auto_dispatch?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"work_order_ids\": [\r\n    4093403\r\n  ],\r\n  \"selection_rule_id\": 0,\r\n  \"delay\": 0,\r\n  \"w2_skippub\": true,\r\n  \"w2_failswitch\": true,\r\n  \"should_route\": true\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/auto_dispatch');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

$request->setBody('{
  "work_order_ids": [
    4093403
  ],
  "selection_rule_id": 0,
  "delay": 0,
  "w2_skippub": true,
  "w2_failswitch": true,
  "should_route": true
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
A binary file was returned

You couldn't be authenticated

{
    "__worker": {
        "id": 0,
        "type": "AUTODISP",
        "user": {
            "thumbnail": "/images/missing-profile.png",
            "id": 0,
            "first_name": "string",
            "last_name": "string"
        },
        "created": {
            "utc": "datetime"
        },
        "status": "in_progress",
        "request": "POST /api/v2/workorders/auto_dispatch",
        "payload": {
            "query": [],
            "body": {
                "work_order_ids": [
                    0
                ],
                "selection_rule_id": 0,
                "delay": 0,
                "w2_skippub": true,
                "w2_failswitch": true,
                "should_route": true
            },
            "additional_params": []
        },
        "response": {},
        "correlation_id": "",
        "actions": [
            "delete"
        ]
    }
}

Query Params

access_token
string
required

Body Params

auto_dispatch
json
 
Suggest Edits

Accept Swap Request

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/accept?access_token=access_token
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/accept?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/accept',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/accept?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/accept?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/accept"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true
}
{
  "code": 0,
  "message": "string",
  "trace": [
    {
      "file": "string",
      "line": 0,
      "function": "string",
      "class": "string",
      "object": {},
      "type": "string",
      "args": [
        {
          "status_code": 0,
          "message": "string"
        }
      ]
    }
  ],
  "fields": "string"
}

Path Params

work_order_id
int32
required
swap_request_id
string
required

Query Params

access_token
string
required
 
Suggest Edits

Decline Swap Request

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/decline?access_token=access_token
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/decline?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/decline',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/decline?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/decline?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/swaps/swap_request_id/decline"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true
}
{
  "code": 0,
  "message": "string",
  "trace": [
    {
      "file": "string",
      "line": 0,
      "function": "string",
      "class": "string",
      "object": {},
      "type": "string",
      "args": [
        {
          "status_code": 0,
          "message": "string"
        }
      ]
    }
  ],
  "fields": "string"
}

Path Params

work_order_id
int32
required
swap_request_id
string
required

Query Params

access_token
string
required
 
Suggest Edits

Get User Profile Details

Returns summary details about a user profile.

 
gethttps://api.fieldnation.com/api/rest/v2/users/user?access_token=access_token
curl -X GET \
  'https://api.fieldnation.com/api/rest/v2/users/:user?access_token=' \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/users/:user?access_token=",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/users/:user');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/users/:user?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

user
int32
required

user id

Query Params

access_token
string
required
 
Suggest Edits

Get Status by Work Order

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/status?access_token=access_token
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/{work_order_id}/status');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'postman-token' => '',
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/{work_order_id}/status?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
  "id": 0,
  "name": "status string",
  "display": "status string",
  "is_routed": false,
  "code": "",
  "delay": 0,
  "ncns": false,
  "sub_status": "",
  "confirmed": true,
  "correlation_id": ""
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Get Work Order Tags

Use this endpoint to GET all of your custom created work order tags

 
gethttps://api.fieldnation.com/api/rest/v2/company/tags?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/company/tags?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/company/tags',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/company/tags?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/company/tags?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/company/tags"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "actions": [
  "add"
  ],
  "metadata": {
  "total": 11,
  "page": 1,
  "pages": 1,
  "per_page": 5000,
  "columns": "id,label,hex_color,valid_statuses,types",
  "view": "model",
  "sort": "",
  "order": "asc"
},
"params": [],
"results": [
{
  "id": 1530,
  "label": "Additional Information Required to Close WO",
  "hex_color": "#F6F21E",
  "valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
	"edit"
]
},
{
  "id": 1529,
  "label": "Duplicate Photo",
  "hex_color": "#F61E29",
  "valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
	"edit"
]
},
{
"id": 1538,
"label": "Materials Damaged",
"hex_color": "#8AF61E",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1537,
"label": "needs to be QC'd in Portal",
"hex_color": "#F61E71",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
  "types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1532,
"label": "Previously Installed",
"hex_color": "#3BF61E",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1536,
"label": "Provider Unresponsive",
"hex_color": "#000000",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1535,
"label": "Re-Assigned",
"hex_color": "#2811AD",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1534,
"label": "Re-Routed",
"hex_color": "#F61E98",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1528,
"label": "Reduce Payment",
"hex_color": "#F67B1E",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1531,
"label": "Theater denied installtion",
"hex_color": "#1EF6EB",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
},
{
"id": 1533,
"label": "Theater lost deliverables",
"hex_color": "#AE1EF6",
"valid_statuses": [
  "created",
  "published",
  "routed",
  "assigned",
  "workdone",
  "approved",
  "paid",
  "canceled"
],
"types": [
  "custom_company",
  "hide_from_provider",
  "show_in_dashboard"
],
"actions": [
"edit"
]
}
]
}

Query Params

access_token
string
required
 
Suggest Edits

Get All Work Orders

Swagger Spec for our V2 REST API

 
gethttps://api.fieldnation.com/api/rest/v2/workorders?access_token=access_token
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => '' //your requested access token
));

$request->setHeaders(array(
   'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders?access_token=<youraccesstoken>",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders?access_token=",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

access_token
string
required
 
Suggest Edits

Get Work Order by Work Order ID

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id?access_token=access_token
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/:{work_order_id}');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/:{work_order_id}?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/messages?access_token=",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
A binary file was returned

You couldn't be authenticated

{
  "status_code": 400,
  "message": "No workorder, call setWorkorder() first"
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Get Schedule by Work Order

Updates the service schedule or eta of a work order (depending on your role)

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/schedule?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/schedule?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/schedule',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/schedule?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/schedule?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/schedule"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Update Schedule by Work Order

Updates the service schedule or eta of a work order (depending on your role)

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/schedule?access_token=access_token
{
  "schedule": {
        "service_window": {
            "mode": "exact",
            "start": {
                "local": {
                    "date": "2017-11-21",
                    "time": "07:00:00"
                },
                "utc": "2017-11-21 14:00:00"
            },
            "end": {
                "local": {
                    "date": "",
                    "time": ""
                },
                "utc": ""
            }
        },
        "time_zone": {
            "id": 9,
            "name": "America/Boise",
            "offset": -1,
            "short": "MST"
        }
    }
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

schedule
json
required

JSON Payload

 
Suggest Edits

Add Shipments by Work Order

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

shipment
json
required
 
Suggest Edits

Work Order Tags By Work Order ID

 
gethttps://api.fieldnation.com/api/rest/v2/company/tags/work_order_id?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/company/tags/work_order_id?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/company/tags/work_order_id',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/company/tags/work_order_id?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/company/tags/work_order_id?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/company/tags/work_order_id"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Update Work Order Tags

Add/Update Flags on Work Order

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token
curl --request PUT \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token'
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id"

querystring = {"access_token":"access_token"}

response = requests.request("PUT", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
tag_id
int32
required

Query Params

access_token
string
required
async
boolean

Body Params

tag
json
 
Suggest Edits

Remove Work Order Tags

 
deletehttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token
curl --request DELETE \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tags/tag_id"

querystring = {"access_token":"access_token"}

response = requests.request("DELETE", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
tag_id
int32
required

Query Params

access_token
string
required
async
boolean
 
Suggest Edits

Get Messages by Work Order

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages?access_token=access_token
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/messages?access_token=",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/messages?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/messages');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
A binary file was returned

You couldn't be authenticated

{
    "actions": [
        "add",
        "messageCompany",
        "messageProvider"
    ],
    "workorderProviders": [],
    "correlation_id": "string",
    "metadata": {
        "total": 1,
        "page": 1,
        "pages": 1,
        "per_page": 250,
        "columns": "from,to,date,content,message,read,created,actions",
        "view": "model",
        "sort": "",
        "order": "asc"
    },
    "params": [],
    "f_work_order": [
        true,
        123456
    ],
    "fs_work_order": true,
    "f_only_workorder": false,
    "fs_only_workorder": true,
    "results": [
        {
            "from": {
                "id": 112222,
                "name": "Bill Boberson",
                "thumbnail": "profile_image_url",
                "hideWoManager": false,
                "msgLink": "/admin/service_call_management/wo_details.php?tab=3&workorder_id=123456",
                "role": "Manager"
            },
            "to": {
                "id": 121212,
                "name": "KDB Manager",
                "thumbnail": "/images/missing-profile.png",
                "role": "Manager"
            },
            "role": "Manager",
            "msg_id": "9999999",
            "parent_id": "0",
            "read": true,
            "created": {
                "utc": "2017-09-07 15:36:15",
                "local": {
                    "date": "2017-09-07",
                    "time": "10:36:15"
                }
            },
            "message": "Provider is running late, estimated arrival in 10 minutes.",
            "actions": [],
            "replies": [],
            "sharedText": " Field Nation Support, KDB Manager , KDB Enterprises"
        }
    ]
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Add Messages by Work Order

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages?access_token=access_token
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

json
json
required

JSON payload

 
Suggest Edits

Add Folder by Work Order

Adds an attachment folder

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments?access_token=access_token
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments?access_token=&name=Name%20of%20Folder",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache",
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'access_token' => '',
  'name' => 'Name of Folder'
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments?access_token=&name=Test%20Folder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
name
string

name of the folder

 
Suggest Edits

Add Attachment by Work Order and Folder

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments/folder_id?access_token=access_token
curl -X POST \
  'https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments/:folder_id?async=true&access_token=' \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'data=@path/to/local/file/SignOffSheet.doc'
var form = new FormData();
form.append("file", "path/to/local/file/SignOffSheet.doc");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments/:folder_id?async=true&access_token=",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "cache-control": "no-cache"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments/:folder_id');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'async' => 'true',
  'access_token' => 'your_token_here'
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'accept' => 'application/json',
  'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
));

$request->setBody('------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="/path/to/file/SignOffSheet.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document


------WebKitFormBoundary7MA4YWxkTrZu0gW--');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

// The API endpoint for all API calls into Field Nation
$base_url = 'https://api.fieldnation.com/';

// The WO ID
$wo_id = 0;

// The folder ID on that WO ID
$folder_id = 0;

// Sample from developer.fieldnation.com (Request helper for standard requests)
function request($request, $endpoint, $method = 'POST') {
    global $base_url, $token;
    $url = $base_url . $endpoint;
    $request = (array) $request;
    $ch = curl_init();
    
    if (empty($request['grant_type'])) {
        $url = $url . "?access_token=$token";
    }
    if ($method == 'GET') {
        $url .= "&" . http_build_query($request);
    }
    else if (empty($request['grant_type'])) {
        $request = json_encode($request);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                'Content-Type: application/json',
                'Content-Length: ' . strlen($request))
        );
    }
    else {
        $request = http_build_query($request);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'Content-Type: application/x-www-form-urlencoded'
            //'Content-Type: application/json'
        ));
    }
    curl_setopt($ch, CURLOPT_URL, $url);
    if ($method == 'POST') {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
    }
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2); // 2 second timeout!
    curl_setopt($ch, CURLOPT_TIMEOUT, 15); // 15 second timeout!
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    return curl_exec($ch);
}

// Sample from developer.fieldnation.com (Request token interface)
function requestToken() {
    $request = new StdClass();
    $request->client_id = ''; // FN provided client_id
    $request->client_secret = ''; // FN provided client_secret
    $request->grant_type = 'password';
    $request->username = ''; // FN login
    $request->password = ''; // FN password
    return request($request, 'authentication/api/oauth/token', 'POST');
}

// Sample from developer.fieldnation.com (Make the request and store the access_token)
$tokenResponse = json_decode(requestToken());
$token = $tokenResponse->access_token;

// Use curl_file_create if it exists, otherwise fall back to @filepath
$file_name_with_full_path = "file.png";
if (function_exists('curl_file_create')) { // php 5.5+
    $cFile = curl_file_create($file_name_with_full_path);
} else { // 
    $cFile = '@' . realpath($file_name_with_full_path);
}

// The POST vars for the request to upload the file
$post = array(
    'access_token' => $token,
    'file'=> $cFile
);

// Initiate a basic cURL request
$ch = curl_init();

// Set the endpoint for the cURL request
$target_url = "{$base_url}api/rest/v2/workorders/{$wo_id}/attachments/{$folder_id}";
curl_setopt($ch, CURLOPT_URL, $target_url);

// Set the request to POST instead of GET, PUT, DELETE, or HEAD
curl_setopt($ch, CURLOPT_POST, 1);

// Bind the POST vars to the cURL request
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

// Complete the request and store the status in the $result variable
$result = curl_exec($ch);

// Close the connection (though this will happen with garbage collection on page completion)
curl_close ($ch);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments/:folder_id"

querystring = {"async":"true","access_token":"your_token_here"}

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"file\"; filename=\"\/path\/to\/file\/SignOffSheet.docx\"\r\nContent-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'accept': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
POST /api/rest/v2/workorders/:work_order_id/attachments/:folder_id?async=true&amp;access_token= HTTP/1.1
Host: api.fieldnation.com
Accept: application/json
Cache-Control: no-cache
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="/path/to/file/SignOffSheet.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document


------WebKitFormBoundary7MA4YWxkTrZu0gW--
A binary file was returned

You couldn't be authenticated

{
    "id": 4063953,
    "attachments": {
        "correlation_id": "64c4e204bbace0e7e57e648daf0e3dad449c5fdc",
        "actions": [
            "add_slot",
            "download"
        ],
        "sum": {
            "unreviewed": 0
        },
        "metadata": {
            "total": 6,
            "per_page": 6,
            "pages": 1,
            "page": 1
        }
    }
}

Path Params

work_order_id
int32
required

Work Order Id

folder_id
int32
required

Folder Id

Query Params

access_token
string
required
async
boolean

Async

Body Params

file
file
required
 
Suggest Edits

Reply to Message by Work Order

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages/message_id?access_token=access_token
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages/message_id?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages/message_id',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages/message_id?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages/message_id?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/messages/message_id"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "code": 0,
  "message": "string",
  "trace": [
    {
      "file": "string",
      "line": 0,
      "function": "string",
      "class": "string",
      "object": {},
      "type": "string",
      "args": [
        {
          "status_code": 0,
          "message": "string"
        }
      ]
    }
  ],
  "fields": "string"
}

Path Params

work_order_id
int32
required
message_id
int32
required

Query Params

access_token
string
required

Body Params

json
json
required

JSON payload

 
Suggest Edits

Get Problems Reported by Work Order ID

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "metadata": {
        "total": 4,
        "per_page": 5,
        "page": 1,
        "pages": 1
    },
    "correlation_id": "XXXXXX",
    "actions": [
        "add"
    ],
    "types": [
        {
            "id": 24,
            "name": "Provider did not show up - cancel WO",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 25,
            "name": "Provider did not show up - reschedule WO/update ETA",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 30,
            "name": "Onsite work is not complete",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 31,
            "name": "Internal Issue with my company",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 33,
            "name": "How to/platform help",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 41,
            "name": "Provider unresponsive before assignment",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 42,
            "name": "Provider is onsite - cannot reach",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 43,
            "name": "Deliverables/Closing WO is not complete",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 44,
            "name": "Missing parts",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        },
        {
            "id": 45,
            "name": "Provider did not show up - remove provider from WO",
            "performance_event": false,
            "show_pqap_warning": false,
            "reportable": true,
            "message": "",
            "children": [],
            "has_other": false
        }
    ]
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Report a Problem by Work Order ID

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems/problem_id?access_token=access_token&async=async&acting_user_id=acting_user_id
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems/problem_id?access_token=access_token&acting_user_id=acting_user_id&async=async'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems/problem_id',
  qs: 
   { access_token: 'access_token',
     acting_user_id: 'acting_user_id',
     async: 'async' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems/problem_id?access_token=access_token&acting_user_id=acting_user_id&async=async")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems/problem_id?access_token=access_token&acting_user_id=acting_user_id&async=async");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/problems/problem_id"

querystring = {"access_token":"access_token","acting_user_id":"acting_user_id","async":"async"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
problem_id
int32
required

Query Params

access_token
string
required
async
string
acting_user_id
string
required

Your Field Nation user ID

 
Suggest Edits

Provider Time Logs by Work Order

Returns a list of time logs applied by the assigned provider

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/time_logs?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/time_logs?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/time_logs',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/time_logs?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/time_logs?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/time_logs"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Get Pay Info By Work Order ID

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/pay?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/pay?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/pay',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/pay?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/pay?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/pay"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Get Expenses

Get all expenses of a work order

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "metadata": {
    "total": 0,
    "page": 0,
    "pages": 0,
    "per_page": 0,
    "columns": "string",
    "available_columns": [
      {
        "group": "string",
        "items": [
          {
            "id": "string",
            "label": "string",
            "group": "string",
            "order": 0,
            "icon": "string",
            "selected": true,
            "can_sort": true,
            "sort_dir": "string"
          }
        ]
      }
    ],
    "list": "string",
    "view": "map",
    "sort": "string",
    "order": "asc",
    "timings": [
      {
        "name": "string",
        "time": 0
      }
    ]
  },
  "sum": {
    "all": 0,
    "charged": 0,
    "uncharged": 0
  },
  "results": [
    {
      "id": 0,
      "description": "string",
      "quantity": 0,
      "status": "new",
      "status_description": "string",
      "category": {
        "id": 0,
        "name": "string"
      },
      "added": {
        "utc": "string",
        "local": {
          "date": "string",
          "time": "string"
        }
      },
      "company_expense": {
        "id": 0,
        "expense_amount": 0,
        "hidden_tags": "string",
        "api_code": "string",
        "description": "string"
      },
      "amount": 0,
      "reason": "string",
      "actions": [
        "edit"
      ]
    }
  ],
  "actions": [
    "add"
  ]
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Add Expenses

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses?access_token=access_token
{
  "id": 0,
  "description": "string",
  "quantity": 0,
  "status": "new",
  "status_description": "string",
  "category": {
    "id": 0,
    "name": "string"
  },
  "added": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "company_expense": {
    "id": 0,
    "expense_amount": 0,
    "hidden_tags": "string",
    "api_code": "string",
    "description": "string"
  },
  "amount": 0,
  "reason": "string",
  "actions": [
    "edit"
  ]
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

expense
json
 
Suggest Edits

Update Expenses

Updates all the expenses in a work order

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses?access_token=access_token
{
  "id": 0,
  "description": "string",
  "quantity": 0,
  "status": "new",
  "status_description": "string",
  "category": {
    "id": 0,
    "name": "string"
  },
  "added": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "company_expense": {
    "id": 0,
    "expense_amount": 0,
    "hidden_tags": "string",
    "api_code": "string",
    "description": "string"
  },
  "amount": 0,
  "reason": "string",
  "actions": [
    "edit"
  ]
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

expense
json

JSON Model

 
Suggest Edits

Update Expense by Work Order and Expense

Update an Expense of a Work order

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses/expense_id?access_token=access_token
{
  "id": 0,
  "description": "string",
  "quantity": 0,
  "status": "new",
  "status_description": "string",
  "category": {
    "id": 0,
    "name": "string"
  },
  "added": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "company_expense": {
    "id": 0,
    "expense_amount": 0,
    "hidden_tags": "string",
    "api_code": "string",
    "description": "string"
  },
  "amount": 0,
  "reason": "string",
  "actions": [
    "edit"
  ]
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
expense_id
int32
required

Query Params

access_token
string
required
async
boolean

Body Params

expense
json

JSON Model

 
Suggest Edits

Remove Expense by Work Order and Expense

Update an Expense of a Work order

 
deletehttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/expenses/expense_id?access_token=access_token
{
  "id": 0,
  "description": "string",
  "quantity": 0,
  "status": "new",
  "status_description": "string",
  "category": {
    "id": 0,
    "name": "string"
  },
  "added": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "company_expense": {
    "id": 0,
    "expense_amount": 0,
    "hidden_tags": "string",
    "api_code": "string",
    "description": "string"
  },
  "amount": 0,
  "reason": "string",
  "actions": [
    "edit"
  ]
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
expense_id
int32
required

Query Params

access_token
string
required
async
boolean
 
Suggest Edits

Datetimes of Statuses/Milestones

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/milestones?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/milestones?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/milestones',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/milestones?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/milestones?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/milestones"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "time_to_dispatch": 0,
  "time_to_work_done": 0,
  "time_alive": 0,
  "created": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "published": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "routed": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "assigned": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "workdone": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "approved": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "paid": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  },
  "canceled": {
    "utc": "string",
    "local": {
      "date": "string",
      "time": "string"
    }
  }
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Get Incomplete Reasons

 
gethttps://api.fieldnation.com/api/rest/v2/company/incomplete-reasons?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/company/incomplete-reasons?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/company/incomplete-reasons',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/company/incomplete-reasons?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/company/incomplete-reasons?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/company/incomplete-reasons"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
    {
        "id": 1,
        "label": "Missing/incorrect deliverables"
    },
    {
        "id": 2,
        "label": "Time/pay is incorrect"
    },
    {
        "id": 3,
        "label": "Missing sign-off sheet"
    },
    {
        "id": 4,
        "label": "Required parts not returned"
    },
    {
        "id": 5,
        "label": "Revisit requested"
    }
]

Query Params

access_token
string
required
 
Suggest Edits

Attachments by Work Order

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments?access_token=access_token
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments?access_token=",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.fieldnation.com/api/rest/v2/workorders/:work_order_id/attachments');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Approve/Deny Attachments by Work order, Folder ID, and Attachment ID

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/workorderid/attachments/folder_id/attachement_id?access_token=access_token
{"attachment_id":{attachment_id},“status”:"approved"}
{"attachment_id":{attachment_id},“status”:“denied”,“status_description”:{reason for deny}}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
folder_id
int32
required
attachment_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

File by Work Order and Folder and File

Gets an attachment folder and its contents

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments/folder_id/attachment_id?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments/folder_id/attachment_id?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments/folder_id/attachment_id',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments/folder_id/attachment_id?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments/folder_id/attachment_id?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/attachments/folder_id/attachment_id"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required
folder_id
int32
required
attachment_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Shipments by Work Order

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments?access_token=access_token
curl --request GET \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments?access_token=access_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/shipments"

querystring = {"access_token":"access_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Approve Work Order

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/approve?access_token=access_token
curl --request POST \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/approve?access_token=access_token'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/approve',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/approve?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/approve?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/approve"

querystring = {"access_token":"access_token"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Mark Work Order Incomplete

Marks a work order incomplete and moves it back to the assigned status

 
deletehttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/complete?access_token=access_token
curl --request DELETE \
  --url 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/complete?access_token=access_token'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/complete',
  qs: { access_token: 'access_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/complete?access_token=access_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/complete?access_token=access_token");

xhr.send(data);
import requests

url = "https://api.fieldnation.com/api/rest/v2/workorders/work_order_id/complete"

querystring = {"access_token":"access_token"}

response = requests.request("DELETE", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Activate/Deactivate Penalty

Updated penalty to active it on the work order

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/penalties/penalty_id?access_token=access_token
{"id":827,"charged":true}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///%7B%7Bhost_name%7D%7D/api/rest/v2/penalties/{penalty_id?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "JSON Model",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://{host_name}/api/rest/v2/penalties/{penalty_id}');
$request->setMethod(HTTP_METH_PUT);

$request->setQueryData(array(
  'access_token' => ''
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

$request->setBody('JSON Model');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

penalty_id
string
required
work_order_id
string
required

Query Params

access_token
string
required
 
Suggest Edits

Add Task by Work Order ID

 
posthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tasks?access_token=access_token
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/{work_order_id/tasks?access_token={access_token}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "JSON Model",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

json
 
Suggest Edits

Update Task by Work Order ID

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tasks?access_token=access_token
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/{work_order_id}/tasks?access_token={access_token}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "JSON Model",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

work_order_id
int32
required

Query Params

access_token
string
required

Body Params

json
 
Suggest Edits

Get Tasks by Work Order ID

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tasks?access_token=access_token
<?php

$request = new HttpRequest();
$request->setUrl('https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/:work_order_id:/tasks');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => 'access_token_here'
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/:work_order_id:/tasks?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
curl -X GET \
  'https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/:work_order_id:/tasks?access_token=' \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
    "actions": [],
    "metadata": {
        "total": 10,
        "page": 1,
        "pages": 1,
        "per_page": 25,
        "columns": "id,work_order_id,time_zone,description,descriptions,label,alerts,group,type,created,author,completed,confirm_type,close_out_notes_type,actions,check_in_type,check_out_type,upload_type,custom_field_type,call_phone_type,send_email_type,signature_type,shipment_type,download_type",
        "view": "model",
        "sort": "",
        "order": "asc"
    },
    "params": [],
    "results": [
        {
            "id": 26531147,
            "work_order_id": 5138699,
            "description": "watch short training video",
            "descriptions": {
                "task": "watch short training video",
                "first": "",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "watch short training video",
            "alerts": [],
            "group": {
                "label": "Pre visit",
                "id": "prep"
            },
            "type": {
                "id": 10,
                "key": "other",
                "name": "Unique task"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:01:37",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:01:37"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "actions": [
                "reorder",
                "alerts"
            ]
        },
        {
            "id": 26531148,
            "work_order_id": 5138699,
            "description": "Set ETA",
            "descriptions": {
                "task": "Set ETA",
                "first": "",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "Set ETA",
            "alerts": [],
            "group": {
                "label": "Pre visit",
                "id": "prep"
            },
            "type": {
                "id": 1,
                "key": "confirmassignment",
                "name": "Set ETA"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 17:58:26",
                "local": {
                    "date": "2018-06-21",
                    "time": "12:58:26"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "eta": {
                "user": {
                    "id": 233971
                },
                "task": {
                    "id": 26531148
                },
                "start": {
                    "local": {
                        "date": "2018-06-22",
                        "time": "07:00:00"
                    },
                    "utc": "2018-06-22 12:00:00"
                },
                "end": {
                    "local": {
                        "date": "2018-06-22",
                        "time": "11:30:00"
                    },
                    "utc": "2018-06-22 16:30:00.000000"
                },
                "hour_estimate": 4.5,
                "notes": "",
                "status": {
                    "name": "onmyway",
                    "updated": {
                        "utc": "2018-06-21 17:58:48",
                        "local": {
                            "date": "2018-06-21",
                            "time": "12:58:48"
                        }
                    }
                },
                "mode": "between",
                "actions": [],
                "on_my_way_are_you_sure": 24,
                "correlation_id": "6b73d5f4d1533e154753332935008b159bb47c66"
            },
            "actions": [
                "reorder",
                "alerts"
            ]
        },
        {
            "id": 26531139,
            "work_order_id": 5138699,
            "description": "Check in",
            "descriptions": {
                "task": "Check in",
                "first": "",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "Check in",
            "alerts": [],
            "group": {
                "label": "On site",
                "id": "onsite"
            },
            "type": {
                "id": 3,
                "key": "checkin",
                "name": "Check in"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:01:12",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:01:12"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "time_log": {
                "id": 4491843,
                "devices": 15,
                "in": {
                    "created": {
                        "utc": "2018-06-21 18:01:00",
                        "local": {
                            "date": "2018-06-21",
                            "time": "13:01:00"
                        }
                    },
                    "coords": {
                        "latitude": 44.9757,
                        "longitude": -93.2711
                    },
                    "verified": false,
                    "distance": 0.13868812816808
                },
                "out": {
                    "created": {
                        "utc": "2018-06-21 18:03:00",
                        "local": {
                            "date": "2018-06-21",
                            "time": "13:03:00"
                        }
                    },
                    "coords": {
                        "latitude": 44.9757,
                        "longitude": -93.2712
                    },
                    "verified": false,
                    "distance": 0.13372826823385,
                    "distance_from_in": 4152.1587481724
                },
                "time_zone": {
                    "offset": 0,
                    "id": 4,
                    "name": "America/Chicago",
                    "short": "CDT"
                },
                "verified": true,
                "was_late": false,
                "status": "checked_out",
                "hours": 0.0333,
                "logged_by": {
                    "id": 233971,
                    "first_name": "Bill",
                    "last_name": "Boberson",
                    "created": {
                        "utc": "2018-06-21 18:01:11",
                        "local": {
                            "date": "2018-06-21",
                            "time": "13:01:11"
                        }
                    }
                },
                "should_verify": false,
                "actions": []
            },
            "actions": [
                "reorder",
                "alerts"
            ]
        },
        {
            "id": 26531140,
            "work_order_id": 5138699,
            "description": "Upload/task photo of old/existing asset tag",
            "descriptions": {
                "task": "Upload/task photo",
                "first": "of",
                "second": "old/existing asset tag",
                "third": "",
                "fourth": ""
            },
            "label": "old/existing asset tag",
            "alerts": [],
            "group": {},
            "type": {
                "id": 6,
                "key": "picture",
                "name": "Upload or take a picture"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {},
            "status": "complete",
            "completed": {},
            "attachments": {
                "id": 9245127,
                "name": "old/existing asset tag",
                "min_files": 0,
                "max_files": 999,
                "min_bytes": 1,
                "max_bytes": 104857600,
                "type": "slot",
                "task": {
                    "id": 26531140
                },
                "actions": [
                    "edit",
                    "upload"
                ],
                "metadata": {
                    "total": 1,
                    "per_page": 1,
                    "pages": 1,
                    "page": 1
                },
                "results": [
                    {
                        "id": 13257268,
                        "author": {
                            "id": 233971,
                            "first_name": "Bill",
                            "last_name": "Boberson",
                            "thumbnail": "https://s3.amazonaws.com/fieldnation/profile_image/233971-573493aae78dd.png",
                            "phone": "+16122222222"
                        },
                        "reviewer": {
                            "id": 0,
                            "first_name": "",
                            "last_name": ""
                        },
                        "file": {
                            "name": "062118_130151.jpg",
                            "mime": "image/jpeg",
                            "size_bytes": 2666332,
                            "thumbnail": "https://fieldnation.s3.amazonaws.com/workorder_uploads_image_thumb/company-34929/wo-5138699-13257268.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849223&Signature=WskK1q9tREEjP89U%2BLQLBgKIGtE%3D",
                            "link": "https://fieldnation.s3.amazonaws.com/workorder_uploads/company-34929/wo-5138699-13257268.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849223&Signature=pu9EKmDl0oWFnyvTQ1ggHKDop%2BU%3D",
                            "description": "062118_130151.jpg",
                            "type": "file",
                            "icon": "icon-picture",
                            "preview": "https://fieldnation.s3.amazonaws.com/workorder_uploads/company-34929/wo-5138699-13257268.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849223&Signature=pu9EKmDl0oWFnyvTQ1ggHKDop%2BU%3D"
                        },
                        "created": {
                            "utc": "2018-06-21 18:02:07",
                            "local": {
                                "date": "2018-06-21",
                                "time": "13:02:07"
                            }
                        },
                        "time_zone": {
                            "name": "America/Chicago",
                            "short": "CDT"
                        },
                        "notes": "",
                        "status": "pending",
                        "status_description": "",
                        "task": {
                            "id": 26531140
                        },
                        "reviewed": {
                            "utc": "",
                            "local": {
                                "date": "",
                                "time": ""
                            }
                        },
                        "show_before_assignment": false,
                        "actions": [
                            "notes",
                            "approve",
                            "deny",
                            "view",
                            "delete",
                            "edit"
                        ],
                        "folder_id": 9245127
                    }
                ]
            },
            "actions": [
                "reorder",
                "alerts"
            ]
        },
        {
            "id": 26531141,
            "work_order_id": 5138699,
            "description": "document existing model numbers & serial numbers",
            "descriptions": {
                "task": "document existing model numbers & serial numbers",
                "first": "",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "document existing model numbers & serial numbers",
            "alerts": [],
            "group": {
                "label": "On site",
                "id": "onsite"
            },
            "type": {
                "id": 10,
                "key": "other",
                "name": "Unique task"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:02:40",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:02:40"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "actions": [
                "reorder",
                "alerts"
            ]
        },
        {
            "id": 26531142,
            "work_order_id": 5138699,
            "description": "attach new asset tags",
            "descriptions": {
                "task": "attach new asset tags",
                "first": "",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "attach new asset tags",
            "alerts": [],
            "group": {
                "label": "On site",
                "id": "onsite"
            },
            "type": {
                "id": 10,
                "key": "other",
                "name": "Unique task"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:02:43",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:02:43"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "actions": [
                "reorder",
                "alerts"
            ]
        },
        {
            "id": 26531143,
            "work_order_id": 5138699,
            "description": "Upload/task photo of new asset tags place on washers / dryers",
            "descriptions": {
                "task": "Upload/task photo",
                "first": "of",
                "second": "new asset tags place on washers / dryers",
                "third": "",
                "fourth": ""
            },
            "label": "new asset tags place on washers / dryers",
            "alerts": [],
            "group": {
                "label": "On site",
                "id": "onsite"
            },
            "type": {
                "id": 6,
                "key": "picture",
                "name": "Upload or take a picture"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:03:10",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:03:10"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "attachments": {
                "id": 9245128,
                "name": "new asset tags place on washers / dryers",
                "min_files": 0,
                "max_files": 999,
                "min_bytes": 1,
                "max_bytes": 104857600,
                "type": "slot",
                "task": {
                    "id": 26531143
                },
                "actions": [
                    "edit",
                    "upload"
                ],
                "metadata": {
                    "total": 1,
                    "per_page": 1,
                    "pages": 1,
                    "page": 1
                },
                "results": [
                    {
                        "id": 13257293,
                        "author": {
                            "id": 233971,
                            "first_name": "Bill",
                            "last_name": "Boberson",
                            "thumbnail": "https://s3.amazonaws.com/fieldnation/profile_image/233971-573493aae78dd.png",
                            "phone": "+16122222222"
                        },
                        "reviewer": {
                            "id": 0,
                            "first_name": "",
                            "last_name": ""
                        },
                        "file": {
                            "name": "062118_130305.jpg",
                            "mime": "image/jpeg",
                            "size_bytes": 2182611,
                            "thumbnail": "https://fieldnation.s3.amazonaws.com/workorder_uploads_image_thumb/company-34929/wo-5138699-13257293.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849223&Signature=WGyiz%2FqeCCf3bR0wtb3FbXy3SDA%3D",
                            "link": "https://fieldnation.s3.amazonaws.com/workorder_uploads/company-34929/wo-5138699-13257293.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849223&Signature=8ramkZAybfN7XNoszCgUcE%2FYljk%3D",
                            "description": "062118_130305.jpg",
                            "type": "file",
                            "icon": "icon-picture",
                            "preview": "https://fieldnation.s3.amazonaws.com/workorder_uploads/company-34929/wo-5138699-13257293.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849223&Signature=8ramkZAybfN7XNoszCgUcE%2FYljk%3D"
                        },
                        "created": {
                            "utc": "2018-06-21 18:03:10",
                            "local": {
                                "date": "2018-06-21",
                                "time": "13:03:10"
                            }
                        },
                        "time_zone": {
                            "name": "America/Chicago",
                            "short": "CDT"
                        },
                        "notes": "",
                        "status": "pending",
                        "status_description": "",
                        "task": {
                            "id": 26531143
                        },
                        "reviewed": {
                            "utc": "",
                            "local": {
                                "date": "",
                                "time": ""
                            }
                        },
                        "show_before_assignment": false,
                        "actions": [
                            "notes",
                            "approve",
                            "deny",
                            "view",
                            "delete",
                            "edit"
                        ],
                        "folder_id": 9245128
                    }
                ]
            },
            "actions": [
                "reorder",
                "alerts"
            ]
        },
        {
            "id": 26531144,
            "work_order_id": 5138699,
            "description": "Check out",
            "descriptions": {
                "task": "Check out",
                "first": "",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "Check out",
            "alerts": [],
            "group": {
                "label": "On site",
                "id": "onsite"
            },
            "type": {
                "id": 4,
                "key": "checkout",
                "name": "Check out"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:03:42",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:03:42"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "actions": [
                "reorder",
                "alerts"
            ],
            "time_log": {
                "id": 4491843,
                "devices": 15,
                "in": {
                    "created": {
                        "utc": "2018-06-21 18:01:00",
                        "local": {
                            "date": "2018-06-21",
                            "time": "13:01:00"
                        }
                    },
                    "coords": {
                        "latitude": 44.9757,
                        "longitude": -93.2711
                    },
                    "verified": false,
                    "distance": 0.13868812816808
                },
                "out": {
                    "created": {
                        "utc": "2018-06-21 18:03:00",
                        "local": {
                            "date": "2018-06-21",
                            "time": "13:03:00"
                        }
                    },
                    "coords": {
                        "latitude": 44.9757,
                        "longitude": -93.2712
                    },
                    "verified": false,
                    "distance": 0.13372826823385,
                    "distance_from_in": 4152.1587481724
                },
                "time_zone": {
                    "offset": 0,
                    "id": 4,
                    "name": "America/Chicago",
                    "short": "CDT"
                },
                "verified": true,
                "was_late": false,
                "status": "checked_out",
                "hours": 0.0333,
                "logged_by": {
                    "id": 233971,
                    "first_name": "Bill",
                    "last_name": "Boberson",
                    "created": {
                        "utc": "2018-06-21 18:01:11",
                        "local": {
                            "date": "2018-06-21",
                            "time": "13:01:11"
                        }
                    }
                },
                "should_verify": false,
                "actions": []
            }
        },
        {
            "id": 26531145,
            "work_order_id": 5138699,
            "description": "Enter custom field Site Result",
            "descriptions": {
                "task": "Enter custom field",
                "first": "Site Result",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "Fill out custom field",
            "alerts": [],
            "group": {
                "label": "Post site",
                "id": "post"
            },
            "type": {
                "id": 7,
                "key": "customfield",
                "name": "Fill out custom field"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:03:54",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:03:54"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "actions": [
                "reorder",
                "alerts"
            ],
            "custom_field": {
                "id": 10915,
                "name": "Site Result",
                "tip": "Please select the site result for this work order.",
                "type": "predefined",
                "role": "assigned_provider",
                "dependency": {
                    "id": 0,
                    "value": "",
                    "operator": "equals"
                },
                "options": [
                    "Install Complete",
                    "Manager Denied Entry to Site",
                    "Parts Not Delivered to Sire"
                ],
                "flags": [
                    "seen_by_provider"
                ],
                "value": "Install Complete",
                "category": "Site Information - Provided by Provider",
                "order": 3,
                "actions": [
                    "edit"
                ]
            }
        },
        {
            "id": 26531146,
            "work_order_id": 5138699,
            "description": "Enter closeout notes",
            "descriptions": {
                "task": "Enter closeout notes",
                "first": "",
                "second": "",
                "third": "",
                "fourth": ""
            },
            "label": "Enter close out notes",
            "alerts": [],
            "group": {
                "label": "Post site",
                "id": "post"
            },
            "type": {
                "id": 2,
                "key": "closeoutnotes",
                "name": "Enter close out notes"
            },
            "created": {
                "utc": "2018-06-21 15:43:51",
                "local": {
                    "date": "2018-06-21",
                    "time": "10:43:51"
                }
            },
            "author": {
                "id": 233971,
                "first_name": "Bill",
                "last_name": "Boberson"
            },
            "status": "complete",
            "completed": {
                "utc": "2018-06-21 18:04:06",
                "local": {
                    "date": "2018-06-21",
                    "time": "13:04:06"
                },
                "by": {
                    "id": 233971,
                    "name": "Bill Boberson",
                    "assigned": true
                }
            },
            "actions": [
                "reorder",
                "alerts",
                "complete"
            ],
            "closing_notes": "All 15 washers done",
            "closing_notes_internal": []
        }
    ]
}

Path Params

work_order_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Get Task by by Work Order ID and Task ID

 
gethttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tasks/task_id?access_token=access_token
curl -X GET \
  'https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/{work_order_id}/tasks/{task_idtask_id}?access_token=' \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
<?php

$request = new HttpRequest();
$request->setUrl('https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/{work_order_id}/tasks/{task_id}');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'access_token' => '',
  'acting_user_id' => '{acting_user_id}'
));

$request->setHeaders(array(
  'postman-token' => 'de24ca6e-db00-c287-5b94-abbcc741cc85',
  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/{work_order_id}/tasks/{task_id}?access_token=&acting_user_id=%7B%7Bacting_user_id%7D%7D",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
    "id": 26531140,
    "work_order_id": 5138699,
    "description": "Upload/task photo of old/existing asset tag",
    "descriptions": {
        "task": "Upload/task photo",
        "first": "of",
        "second": "old/existing asset tag",
        "third": "",
        "fourth": ""
    },
    "label": "old/existing asset tag",
    "alerts": [],
    "group": {
        "label": "On site",
        "id": "onsite"
    },
    "type": {
        "id": 6,
        "key": "picture",
        "name": "Upload or take a picture"
    },
    "created": {
        "utc": "2018-06-21 15:43:51",
        "local": {
            "date": "2018-06-21",
            "time": "10:43:51"
        }
    },
    "author": {
        "id": 233971,
        "first_name": "Bill",
        "last_name": "Boberson"
    },
    "status": "complete",
    "completed": {
        "utc": "2018-06-21 18:02:07",
        "local": {
            "date": "2018-06-21",
            "time": "13:02:07"
        },
        "by": {
            "id": 233971,
            "name": "Bill Boberson",
            "assigned": true
        }
    },
    "attachments": {
        "id": 9245127,
        "name": "old/existing asset tag",
        "min_files": 0,
        "max_files": 999,
        "min_bytes": 1,
        "max_bytes": 104857600,
        "type": "slot",
        "task": {
            "id": 26531140
        },
        "actions": [
            "edit",
            "upload"
        ],
        "metadata": {
            "total": 1,
            "per_page": 1,
            "pages": 1,
            "page": 1
        },
        "results": [
            {
                "id": 13257268,
                "author": {
                    "id": 233971,
                    "first_name": "Bill",
                    "last_name": "Boberson",
                    "thumbnail": "https://s3.amazonaws.com/fieldnation/profile_image/233971-573493aae78dd.png",
                    "phone": "+16122222222"
                },
                "reviewer": {
                    "id": 0,
                    "first_name": "",
                    "last_name": ""
                },
                "file": {
                    "name": "062118_130151.jpg",
                    "mime": "image/jpeg",
                    "size_bytes": 2666332,
                    "thumbnail": "https://fieldnation.s3.amazonaws.com/workorder_uploads_image_thumb/company-34929/wo-5138699-13257268.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849890&Signature=QSEQO%2F0KAu%2F%2F7ZhCsqJ5Zf5r0g8%3D",
                    "link": "https://fieldnation.s3.amazonaws.com/workorder_uploads/company-34929/wo-5138699-13257268.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849890&Signature=NM1ZQD%2BF5GbFw9kepj5d0z7F27I%3D",
                    "description": "062118_130151.jpg",
                    "type": "file",
                    "icon": "icon-picture",
                    "preview": "https://fieldnation.s3.amazonaws.com/workorder_uploads/company-34929/wo-5138699-13257268.jpg?AWSAccessKeyId=AKIAIUCP3K2FOJ5SUCKA&Expires=1531849890&Signature=NM1ZQD%2BF5GbFw9kepj5d0z7F27I%3D"
                },
                "created": {
                    "utc": "2018-06-21 18:02:07",
                    "local": {
                        "date": "2018-06-21",
                        "time": "13:02:07"
                    }
                },
                "time_zone": {
                    "name": "America/Chicago",
                    "short": "CDT"
                },
                "notes": "",
                "status": "pending",
                "status_description": "",
                "task": {
                    "id": 26531140
                },
                "reviewed": {
                    "utc": "",
                    "local": {
                        "date": "",
                        "time": ""
                    }
                },
                "show_before_assignment": false,
                "actions": [
                    "notes",
                    "approve",
                    "deny",
                    "view",
                    "delete",
                    "edit"
                ],
                "folder_id": 9245127
            }
        ]
    },
    "actions": [
        "reorder",
        "alerts"
    ]
}

Path Params

work_order_id
int32
required
task_id
int32
required

Query Params

access_token
string
required
 
Suggest Edits

Delete Task by Work Order ID and Task ID

 
puthttps://api.fieldnation.com/api/rest/v2/workorders/work_order_id/tasks/task_id?access_token=access_token
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///%7B%7Bhost_name%7D%7D/api/rest/v2/workorders/{work_order_id}/tasks/{task_id}?access_token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated