The ServiceM8 Developer Portal

Welcome to the ServiceM8 developer portal. You'll find comprehensive guides and documentation to help you start working with ServiceM8 as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Asset endpoints are active only for accounts with the Asset Management addon turned on.

Please note that because each Asset must be associated with a globally unique QR code label, Assets can only be created using the ServiceM8 mobile app. The API can be used to read and modify Assets.

Suggest Edits

List all Assets

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

OAuth Scope

This endpoint requires the following OAuth scope read_assets.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/asset.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/asset.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/asset.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/asset.json")

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.servicem8.com/api_1.0/asset.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/asset.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-4105-4caa-a5df-bfc8d955282b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "company_uuid": "123e4567-055f-4706-af82-891d7f34302b",
    "asset_code": "string",
    "asset_type_uuid": "123e4567-3188-4e70-a3ed-d404f306a94b",
    "name": "string",
    "lat": "number",
    "lng": "number",
    "geo_timestamp": "YYYY-MM-DD HH:MM:SS",
    "altitude": "number",
    "field_data": [
      {
        "uuid": "string",
        "fieldType": "string",
        "fieldName": "string",
        "fieldValue": "string",
        "sortOrder": "number"
      }
    ]
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Assets

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve an Asset

OAuth Scope

This endpoint requires the following OAuth scope read_assets.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/asset/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/asset/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/asset/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/asset/uuid.json")

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.servicem8.com/api_1.0/asset/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/asset/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-1ce4-428e-9369-28cecef8f0bb",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "company_uuid": "123e4567-9fdc-4c45-8389-9a5e9c8adf5b",
  "asset_code": "string",
  "asset_type_uuid": "123e4567-4557-4200-9f67-30e4f740f5ab",
  "name": "string",
  "lat": "number",
  "lng": "number",
  "geo_timestamp": "YYYY-MM-DD HH:MM:SS",
  "altitude": "number",
  "field_data": [
    {
      "uuid": "string",
      "fieldType": "string",
      "fieldName": "string",
      "fieldValue": "string",
      "sortOrder": "number"
    }
  ]
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset

Response

Asset record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

company_uuidstring

UUID of the Client to which this Asset is attached

asset_codestring

The unique code printed on this Asset's attached label (read only)

asset_type_uuidstring

UUID of an Asset Type which defines the fields that can be stored for this Asset

namestring

User-facing description of this asset

latnumber

Latitude component of the Asset's location in degrees

lngnumber

Longitude component of the Asset's location in degrees

geo_timestampstring

Timestamp at which the Asset's location was last updated

altitudenumber

Altitude component of the Asset's location in metres

field_dataarray

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update an Asset

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/asset/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/asset/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/asset/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/asset/uuid.json")

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.servicem8.com/api_1.0/asset/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/asset/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

company_uuid
uuid

UUID of the Client to which this Asset is attached

asset_code
string

The unique code printed on this Asset's attached label (read only)

asset_type_uuid
uuid

UUID of an Asset Type which defines the fields that can be stored for this Asset

name
string

User-facing description of this asset

lat
float

Latitude component of the Asset's location in degrees

lng
float

Longitude component of the Asset's location in degrees

geo_timestamp
string

Timestamp at which the Asset's location was last updated

altitude
number

Altitude component of the Asset's location in metres

field_data
array of objects
uuid
fieldType
fieldName
fieldValue
sortOrder

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete an Asset

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/asset/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/asset/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/asset/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/asset/uuid.json")

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.servicem8.com/api_1.0/asset/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/asset/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset

Response

Asset successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Asset Types

 
Suggest Edits

List all Asset Types

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

OAuth Scope

This endpoint requires the following OAuth scope read_assets.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/assettype.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/assettype.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/assettype.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettype.json")

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.servicem8.com/api_1.0/assettype.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettype.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-0b45-4414-ac97-bc0806b7a57b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "name": "string"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Asset Types

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Asset Type

OAuth Scope

This endpoint requires the following OAuth scope manage_assets.

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/assettype.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/assettype.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/assettype.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettype.json")

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.servicem8.com/api_1.0/assettype.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettype.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve an Asset Type

OAuth Scope

This endpoint requires the following OAuth scope read_assets.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/assettype/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/assettype/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/assettype/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettype/uuid.json")

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.servicem8.com/api_1.0/assettype/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettype/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-2fa9-4e04-911e-a584b59abd8b",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "name": "string"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset Type

Response

Asset Type record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

namestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update an Asset Type

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/assettype/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/assettype/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/assettype/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettype/uuid.json")

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.servicem8.com/api_1.0/assettype/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettype/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset Type

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete an Asset Type

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/assettype/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/assettype/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/assettype/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettype/uuid.json")

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.servicem8.com/api_1.0/assettype/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettype/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset Type

Response

Asset Type successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Asset Type Fields

 
Suggest Edits

List all Asset Type Fields

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

OAuth Scope

This endpoint requires the following OAuth scope read_assets.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/assettypefield.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/assettypefield.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/assettypefield.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettypefield.json")

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.servicem8.com/api_1.0/assettypefield.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettypefield.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-f143-4192-a041-9b19e6ae59cb",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "asset_type_uuid": "123e4567-ce8e-4092-943f-f39c275a0c2b",
    "name": "string",
    "field_data": {
      "fieldType": "string",
      "mandatory": "string",
      "choices": [
        "string"
      ]
    },
    "sort_order": "number"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Asset Type Fields

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Asset Type Field

OAuth Scope

This endpoint requires the following OAuth scope manage_assets.

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/assettypefield.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/assettypefield.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/assettypefield.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettypefield.json")

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.servicem8.com/api_1.0/assettypefield.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettypefield.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

asset_type_uuid
uuid
name
string
required
field_data
object
 
field_data.fieldType
string
required
field_data.mandatory
boolean
required
field_data.choices
array of strings
sort_order
number

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve an Asset Type Field

OAuth Scope

This endpoint requires the following OAuth scope read_assets.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/assettypefield/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/assettypefield/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/assettypefield/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettypefield/uuid.json")

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.servicem8.com/api_1.0/assettypefield/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettypefield/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-033e-444e-8add-b41c43a268eb",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "asset_type_uuid": "123e4567-b833-456e-a072-65ccf9b7becb",
  "name": "string",
  "field_data": {
    "fieldType": "string",
    "mandatory": "string",
    "choices": [
      "string"
    ]
  },
  "sort_order": "number"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset Type Field

Response

Asset Type Field record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

asset_type_uuidstring
namestring
field_dataobject
field_data.fieldTypestring
field_data.mandatoryboolean
field_data.choicesarray
sort_ordernumber

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update an Asset Type Field

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/assettypefield/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/assettypefield/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/assettypefield/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettypefield/uuid.json")

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.servicem8.com/api_1.0/assettypefield/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettypefield/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset Type Field

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

asset_type_uuid
uuid
name
string
required
field_data
object
 
field_data.fieldType
string
required
field_data.mandatory
boolean
required
field_data.choices
array of strings
sort_order
number

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete an Asset Type Field

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/assettypefield/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/assettypefield/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/assettypefield/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/assettypefield/uuid.json")

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.servicem8.com/api_1.0/assettypefield/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/assettypefield/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Asset Type Field

Response

Asset Type Field successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Attachments

 

For additional assistance in attaching files into a ServiceM8 account, review the how to guide for how to attach a file to the job diary.

Suggest Edits

List all Attachments

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/attachment.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/attachment.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/attachment.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/attachment.json")

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.servicem8.com/api_1.0/attachment.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/attachment.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-563c-4694-8ce7-88857eac79db",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "related_object": "string",
    "related_object_uuid": "123e4567-f777-4205-8226-afc275ca28cb",
    "attachment_name": "string",
    "file_type": "string",
    "created_by_staff_uuid": "123e4567-6624-49f5-b875-46c26a9d972b",
    "timestamp": "string",
    "attachment_source": "string",
    "tags": "string",
    "lng": "number",
    "lat": "number"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Attachments

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Attachment

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/attachment.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/attachment.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/attachment.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/attachment.json")

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.servicem8.com/api_1.0/attachment.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/attachment.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

related_object
string
related_object_uuid
uuid
attachment_name
string

The security roles description

file_type
string

Location's name

created_by_staff_uuid
uuid
timestamp
string
attachment_source
string
tags
string
lng
float
lat
float

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve an Attachment

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/attachment/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/attachment/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/attachment/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/attachment/uuid.json")

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.servicem8.com/api_1.0/attachment/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/attachment/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-414c-4916-878f-2df6294a97bb",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "related_object": "string",
  "related_object_uuid": "123e4567-756c-4cf0-84d2-c1c7f8ce56ab",
  "attachment_name": "string",
  "file_type": "string",
  "created_by_staff_uuid": "123e4567-02ea-4203-bd8f-dd2a3ce6b65b",
  "timestamp": "string",
  "attachment_source": "string",
  "tags": "string",
  "lng": "number",
  "lat": "number"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Attachment

Response

Attachment record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

related_objectstring
related_object_uuidstring
attachment_namestring

The security roles description

file_typestring

Location's name

created_by_staff_uuidstring
timestampstring
attachment_sourcestring
tagsstring
lngnumber
latnumber

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update an Attachment

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/attachment/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/attachment/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/attachment/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/attachment/uuid.json")

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.servicem8.com/api_1.0/attachment/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/attachment/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Attachment

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

related_object
string
related_object_uuid
uuid
attachment_name
string

The security roles description

file_type
string

Location's name

created_by_staff_uuid
uuid
timestamp
string
attachment_source
string
tags
string
lng
float
lat
float

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete an Attachment

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/attachment/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/attachment/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/attachment/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/attachment/uuid.json")

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.servicem8.com/api_1.0/attachment/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/attachment/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Attachment

Response

Attachment successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

List all Badges

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

OAuth Scope

This endpoint requires the following OAuth scope manage_badges.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/badge.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/badge.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/badge.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/badge.json")

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.servicem8.com/api_1.0/badge.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/badge.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-90b1-4bd4-8f5b-c0a130ef134b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "name": "string",
    "automatically_allocated": "string",
    "file_name": "string",
    "regarding_form_uuid": "123e4567-15ac-4408-8fee-ac3102ffd8bb",
    "regarding_asset_type_uuid": "123e4567-c642-4a54-9b10-4c4f85fc539b"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Badges

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Badge

OAuth Scope

This endpoint requires the following OAuth scope manage_badges.

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/badge.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/badge.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/badge.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/badge.json")

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.servicem8.com/api_1.0/badge.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/badge.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required

Badge Name

automatically_allocated
string
file_name
string
regarding_form_uuid
uuid
regarding_asset_type_uuid
uuid

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve a Badge

OAuth Scope

This endpoint requires the following OAuth scope manage_badges.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/badge/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/badge/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/badge/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/badge/uuid.json")

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.servicem8.com/api_1.0/badge/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/badge/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-06d1-488f-92c5-67c8f5cccdbb",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "name": "string",
  "automatically_allocated": "string",
  "file_name": "string",
  "regarding_form_uuid": "123e4567-fd55-4104-bb58-8c923580b91b",
  "regarding_asset_type_uuid": "123e4567-de5d-438e-a72f-4717578f73fb"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Badge

Response

Badge record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

namestring

Badge Name

automatically_allocatedstring
file_namestring
regarding_form_uuidstring
regarding_asset_type_uuidstring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update a Badge

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/badge/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/badge/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/badge/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/badge/uuid.json")

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.servicem8.com/api_1.0/badge/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/badge/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Badge

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required

Badge Name

automatically_allocated
string
file_name
string
regarding_form_uuid
uuid
regarding_asset_type_uuid
uuid

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete a Badge

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/badge/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/badge/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/badge/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/badge/uuid.json")

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.servicem8.com/api_1.0/badge/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/badge/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Badge

Response

Badge successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Categories

 
Suggest Edits

List all Categories

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

OAuth Scope

This endpoint requires the following OAuth scope read_job_categories.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/category.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/category.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/category.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/category.json")

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.servicem8.com/api_1.0/category.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/category.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-0f84-4ba1-b8df-472c1130c18b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "name": "string",
    "colour": "string"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Categories

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Category

OAuth Scope

This endpoint requires the following OAuth scope manage_job_categories.

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/category.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/category.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/category.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/category.json")

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.servicem8.com/api_1.0/category.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/category.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required
colour
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve a Category

OAuth Scope

This endpoint requires the following OAuth scope read_job_categories.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/category/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/category/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/category/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/category/uuid.json")

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.servicem8.com/api_1.0/category/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/category/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-34b1-47e6-876d-0d2338ad731b",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "name": "string",
  "colour": "string"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Category

Response

Category record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

namestring
colourstring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update a Category

OAuth Scope

This endpoint requires the following OAuth scope manage_job_categories.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/category/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/category/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/category/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/category/uuid.json")

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.servicem8.com/api_1.0/category/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/category/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Category

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required
colour
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete a Category

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

OAuth Scope

This endpoint requires the following OAuth scope manage_job_categories.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/category/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/category/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/category/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/category/uuid.json")

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.servicem8.com/api_1.0/category/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/category/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Category

Response

Category successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
 
Suggest Edits

List all Clients

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

OAuth Scope

This endpoint requires the following OAuth scope read_customers.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/company.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/company.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/company.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/company.json")

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.servicem8.com/api_1.0/company.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/company.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-2326-4b3d-86c4-625ad3307eab",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "name": "string",
    "website": "string",
    "abn_number": "string",
    "is_individual": "string",
    "address_street": "string",
    "address_city": "string",
    "address_state": "string",
    "address_postcode": "string",
    "address_country": "string",
    "fax_number": "string",
    "address": "string",
    "billing_address": "string",
    "badges": "string",
    "tax_rate_uuid": "123e4567-1dd3-43fb-9fcf-6eb1f9e46b7b"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Clients

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Client

OAuth Scope

This endpoint requires the following OAuth scope manage_customers.

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/company.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/company.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/company.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/company.json")

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.servicem8.com/api_1.0/company.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/company.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required

Company Name

website
string
abn_number
string
is_individual
string
address_street
string
address_city
string
address_state
string
address_postcode
string
address_country
string
fax_number
string
address
string

Password

billing_address
string

Confirm Password

badges
string
tax_rate_uuid
uuid

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve a Client

OAuth Scope

This endpoint requires the following OAuth scope read_customers.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/company/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/company/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/company/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/company/uuid.json")

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.servicem8.com/api_1.0/company/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/company/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-6595-4832-b833-d3b2121f8bbb",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "name": "string",
  "website": "string",
  "abn_number": "string",
  "is_individual": "string",
  "address_street": "string",
  "address_city": "string",
  "address_state": "string",
  "address_postcode": "string",
  "address_country": "string",
  "fax_number": "string",
  "address": "string",
  "billing_address": "string",
  "badges": "string",
  "tax_rate_uuid": "123e4567-b429-42e7-b670-5796a078923b"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Client

Response

Client record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

namestring

Company Name

websitestring
abn_numberstring
is_individualstring
address_streetstring
address_citystring
address_statestring
address_postcodestring
address_countrystring
fax_numberstring
addressstring

Password

billing_addressstring

Confirm Password

badgesstring
tax_rate_uuidstring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update a Client

OAuth Scope

This endpoint requires the following OAuth scope manage_customers.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/company/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/company/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/company/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/company/uuid.json")

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.servicem8.com/api_1.0/company/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/company/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Client

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required

Company Name

website
string
abn_number
string
is_individual
string
address_street
string
address_city
string
address_state
string
address_postcode
string
address_country
string
fax_number
string
address
string

Password

billing_address
string

Confirm Password

badges
string
tax_rate_uuid
uuid

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete a Client

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

OAuth Scope

This endpoint requires the following OAuth scope manage_customers.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/company/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/company/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/company/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/company/uuid.json")

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.servicem8.com/api_1.0/company/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/company/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Client

Response

Client successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Company Contacts

 
Suggest Edits

List all Company Contacts

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

OAuth Scope

This endpoint requires the following OAuth scope read_customer_contacts.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/companycontact.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/companycontact.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/companycontact.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/companycontact.json")

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.servicem8.com/api_1.0/companycontact.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/companycontact.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-4e09-4f1a-a826-329eb7e5975b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "company_uuid": "123e4567-405a-4ef2-a80c-21f1ff457bab",
    "first": "string",
    "last": "string",
    "phone": "string",
    "mobile": "string",
    "email": "string",
    "type": "string",
    "is_primary_contact": "string"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Company Contacts

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Company Contact

OAuth Scope

This endpoint requires the following OAuth scope manage_customer_contacts.

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/companycontact.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/companycontact.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/companycontact.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/companycontact.json")

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.servicem8.com/api_1.0/companycontact.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/companycontact.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

company_uuid
uuid
first
string
last
string
phone
string
mobile
string
email
email
type
string
is_primary_contact
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve a Company Contact

OAuth Scope

This endpoint requires the following OAuth scope read_customer_contacts.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/companycontact/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/companycontact/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/companycontact/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/companycontact/uuid.json")

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.servicem8.com/api_1.0/companycontact/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/companycontact/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-0f8f-47d1-b741-8e11115af24b",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "company_uuid": "123e4567-9584-48f0-a225-4f3460710feb",
  "first": "string",
  "last": "string",
  "phone": "string",
  "mobile": "string",
  "email": "string",
  "type": "string",
  "is_primary_contact": "string"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Company Contact

Response

Company Contact record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

company_uuidstring
firststring
laststring
phonestring
mobilestring
emailstring
typestring
is_primary_contactstring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update a Company Contact

OAuth Scope

This endpoint requires the following OAuth scope manage_customer_contacts.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/companycontact/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/companycontact/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/companycontact/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/companycontact/uuid.json")

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.servicem8.com/api_1.0/companycontact/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/companycontact/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Company Contact

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

company_uuid
uuid
first
string
last
string
phone
string
mobile
string
email
email
type
string
is_primary_contact
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete a Company Contact

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

OAuth Scope

This endpoint requires the following OAuth scope manage_customer_contacts.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/companycontact/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/companycontact/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/companycontact/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/companycontact/uuid.json")

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.servicem8.com/api_1.0/companycontact/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/companycontact/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Company Contact

Response

Company Contact successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Email Templates

 
Suggest Edits

List all Email Templates

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/emailtemplate.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/emailtemplate.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/emailtemplate.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/emailtemplate.json")

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.servicem8.com/api_1.0/emailtemplate.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/emailtemplate.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-c35e-4483-90c2-8d43d22205ab",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "name": "string",
    "subject": "string",
    "message": "string"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Email Templates

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Email Template

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/emailtemplate.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/emailtemplate.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/emailtemplate.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/emailtemplate.json")

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.servicem8.com/api_1.0/emailtemplate.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/emailtemplate.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required
subject
string
message
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve an Email Template

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/emailtemplate/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/emailtemplate/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/emailtemplate/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/emailtemplate/uuid.json")

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.servicem8.com/api_1.0/emailtemplate/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/emailtemplate/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-eb23-4c75-b490-0a37df2d823b",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "name": "string",
  "subject": "string",
  "message": "string"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Email Template

Response

Email Template record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

namestring
subjectstring
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update an Email Template

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/emailtemplate/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/emailtemplate/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/emailtemplate/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/emailtemplate/uuid.json")

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.servicem8.com/api_1.0/emailtemplate/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/emailtemplate/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Email Template

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
required
subject
string
message
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete an Email Template

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/emailtemplate/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/emailtemplate/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/emailtemplate/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/emailtemplate/uuid.json")

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.servicem8.com/api_1.0/emailtemplate/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/emailtemplate/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Email Template

Response

Email Template successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
 
Suggest Edits

List all Feedback

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/feedback.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/feedback.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/feedback.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/feedback.json")

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.servicem8.com/api_1.0/feedback.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/feedback.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-c6c6-438c-8821-da9907a0c66b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "timestamp": "string",
    "related_object": "string",
    "related_object_uuid": "123e4567-65b4-43cd-acb5-5e7f398f6bcb",
    "rating": "string",
    "comment": "string"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Feedback

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Feedback

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/feedback.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/feedback.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/feedback.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/feedback.json")

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.servicem8.com/api_1.0/feedback.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/feedback.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

timestamp
string
related_object
string
related_object_uuid
uuid
rating
string
comment
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve a Feedback

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/feedback/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/feedback/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/feedback/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/feedback/uuid.json")

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.servicem8.com/api_1.0/feedback/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/feedback/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-3e33-4725-b8c6-9dcf6350414b",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "timestamp": "string",
  "related_object": "string",
  "related_object_uuid": "123e4567-4ce8-412a-b683-e2d0cd9bef4b",
  "rating": "string",
  "comment": "string"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Feedback

Response

Feedback record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

timestampstring
related_objectstring
related_object_uuidstring
ratingstring
commentstring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update a Feedback

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/feedback/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/feedback/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/feedback/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/feedback/uuid.json")

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.servicem8.com/api_1.0/feedback/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/feedback/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Feedback

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

timestamp
string
related_object
string
related_object_uuid
uuid
rating
string
comment
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete a Feedback

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/feedback/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/feedback/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/feedback/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/feedback/uuid.json")

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.servicem8.com/api_1.0/feedback/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/feedback/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Feedback

Response

Feedback successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

List all Forms

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/form.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/form.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/form.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/form.json")

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.servicem8.com/api_1.0/form.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/form.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-ee6d-4771-977f-efd282e9904b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "name": "string",
    "document_template_uuid": "123e4567-6a32-47d2-a8db-0452f9cae70b",
    "can_be_used_independently": "string",
    "badge_mandatory_state": "string"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Forms

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Form

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/form.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/form.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/form.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/form.json")

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.servicem8.com/api_1.0/form.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/form.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
document_template_uuid
uuid
can_be_used_independently
string
badge_mandatory_state
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve a Form

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/form/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/form/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/form/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/form/uuid.json")

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.servicem8.com/api_1.0/form/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/form/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-8f3e-4bc6-9384-465da19d152b",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "name": "string",
  "document_template_uuid": "123e4567-32e4-42aa-b5e4-4331c72b314b",
  "can_be_used_independently": "string",
  "badge_mandatory_state": "string"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Form

Response

Form record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

namestring
document_template_uuidstring
can_be_used_independentlystring
badge_mandatory_statestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update a Form

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/form/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/form/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/form/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/form/uuid.json")

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.servicem8.com/api_1.0/form/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/form/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Form

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

name
string
document_template_uuid
uuid
can_be_used_independently
string
badge_mandatory_state
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete a Form

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/form/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/form/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/form/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/form/uuid.json")

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.servicem8.com/api_1.0/form/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/form/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Form

Response

Form successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Form Fields

 
Suggest Edits

List all Form Fields

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/formfield.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/formfield.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/formfield.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/formfield.json")

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.servicem8.com/api_1.0/formfield.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/formfield.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-28f4-45ad-b53b-9b81a298c11b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "form_uuid": "123e4567-e220-4262-a418-00f48c88b72b",
    "name": "string",
    "field_data_json": "string",
    "sort_order": "string"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Form Fields

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Form Field

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/formfield.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/formfield.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/formfield.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/formfield.json")

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.servicem8.com/api_1.0/formfield.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/formfield.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

form_uuid
uuid
name
string
field_data_json
string
sort_order
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Retrieve a Form Field

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/formfield/uuid.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/formfield/uuid.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/formfield/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/formfield/uuid.json")

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.servicem8.com/api_1.0/formfield/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/formfield/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "uuid": "123e4567-d3f5-4e44-90ef-1f2c1219cc4b",
  "active": 1,
  "edit_date": "YYYY-MM-DD HH:MM:SS",
  "form_uuid": "123e4567-7fe2-4f1b-ae20-4b16f82a876b",
  "name": "string",
  "field_data_json": "string",
  "sort_order": "string"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Form Field

Response

Form Field record

uuidstring

Record UUID key

activenumber

Record active/deleted flag.

Valid values are [0,1]

edit_datestring

Record last modified timestamp

form_uuidstring
namestring
field_data_jsonstring
sort_orderstring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Update a Form Field

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/formfield/uuid.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/formfield/uuid.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/formfield/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/formfield/uuid.json")

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.servicem8.com/api_1.0/formfield/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/formfield/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Form Field

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

form_uuid
uuid
name
string
field_data_json
string
sort_order
string

Response

Success

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Delete a Form Field

In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.servicem8.com/api_1.0/formfield/uuid.json
curl --request DELETE \
  --url https://api.servicem8.com/api_1.0/formfield/uuid.json
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.servicem8.com/api_1.0/formfield/uuid.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/formfield/uuid.json")

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.servicem8.com/api_1.0/formfield/uuid.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/formfield/uuid.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Path Params

uuid
uuid
required

UUID of the Form Field

Response

Form Field successfully archived

errorCodenumber
messagestring

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Form Responses

 
Suggest Edits

List all Form Responses

Filtering

This endpoint supports result filtering. For more information on how to filter this request, go here.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.servicem8.com/api_1.0/formresponse.json
curl --request GET \
  --url https://api.servicem8.com/api_1.0/formresponse.json
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.servicem8.com/api_1.0/formresponse.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/formresponse.json")

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.servicem8.com/api_1.0/formresponse.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/formresponse.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

[
  {
    "uuid": "123e4567-1976-4db7-8ac4-821b2af1226b",
    "active": 1,
    "edit_date": "YYYY-MM-DD HH:MM:SS",
    "form_uuid": "123e4567-96b9-42a4-96cf-69237e4d80fb",
    "staff_uuid": "123e4567-cdf8-4514-aa78-71d7751b511b",
    "regarding_object": "string",
    "regarding_object_uuid": "123e4567-5c95-4f28-8297-8a3559241a6b",
    "field_data": "string",
    "timestamp": "string",
    "form_by_staff_uuid": "123e4567-b58f-4053-885c-33eefa3965eb",
    "document_attachment_uuid": "123e4567-fc52-42da-a713-b0a2a3e8d61b",
    "asset_uuid": "123e4567-2d5b-44cd-8524-bc60babab5ab"
  }
]
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Response

An array of Form Responses

Bad Request

errorCodenumber
messagestring

Unexpected error

errorCodenumber
messagestring
Suggest Edits

Create a new Form Response

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the response header as x-record-uuid.

 

OAuth2 Auth

Bearer

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.servicem8.com/api_1.0/formresponse.json
curl --request POST \
  --url https://api.servicem8.com/api_1.0/formresponse.json
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.servicem8.com/api_1.0/formresponse.json' };

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

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

url = URI("https://api.servicem8.com/api_1.0/formresponse.json")

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.servicem8.com/api_1.0/formresponse.json");

xhr.send(data);
import requests

url = "https://api.servicem8.com/api_1.0/formresponse.json"

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

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "errorCode": "0",
  "message": "OK"
}
{
  "errorCode": "1000",
  "message": "An error occurred completing your request"
}

Body Params

uuid
uuid

Record UUID key

active
number

Record active/deleted flag.

Valid values are [0,1]

form_uuid
uuid
staff_uuid
uuid
regarding_object
string
regarding_object_uuid
uuid
field_data
string
timestamp
string
form_by_staff_uuid
uuid
document_attachment_uuid
uuid
asset_uuid
uuid