Skip to content

API Overview

Introduction

The Trimble Unity Web Services use JSON as the serialization format for communications.

To use the Trimble Unity Web Services three simple steps must be followed:

  1. Authentication
  2. Execution
  3. Return

Authentication

Authentication is performed by calling the General/Authentication/Authenticate method and passing in a LoginName and Password.

{
    LoginName: "jdoe",
    Password: "jdoe"
}

The method will respond with an authentication token.

{   
    "Value": {
        "Token": "eyJFbXBsb3llZVNpZCI6NTg4OSwiSXNzdWVkVGltZSI6MTQ"
    },
    "Status": 0,
    "Message": null,
    "ErrorMessages": [ ],
    "WarningMessages": [ ],
    "SuccessMessages": [ ]
}

The token property will be passed to every future method for authentication purposes.

Execution

Methods are executed by sending an HTTP POST or an HTTP GET with the data and/or token parameters.

The data parameter is the JSON serialized parameter.
The token parameter is the authentication token's Token value.

When using POST, the data parameter is placed in the request body as a form key-value pair with content type application/x-www-form-urlencoded or multipart/form-data.

When using GET, the data parameter can be placed in the request body the same as for POST, or added to the URL query.

In both cases, the authentication token should be passed in the Authorization header using the format bearer {token}. For POST requests, the token can also be included as a POST body parameter.

HTTP GET Example of General/Authentication/Authenticate

# No token is needed for this request
https://<my-site>/services/General/Authentication/Authenticate?data={"LoginName":"jdoe","Password":"jdoe"}

HTTP GET Example of Ams/WorkOrder/ById

# token is added to the authorization header as
# Authorization: bearer eyJFbXBsb3llZVNpZCI6NTg4OSwiSXNzdWVkVGltZSI6MTQ
https://<my-site>/services/Ams/WorkOrder/ById?data={"WorkOrderId":"12345"}

Return

All return values have Value, Status and Messages.

{
    "Value": { "WorkOrderId":"12345", ... },
    "Status": 0,
    "Message": null,
    "ErrorMessages": [ ],
    "WarningMessages": [ ],
    "SuccessMessages": [ ]
}
  • Value - The return value from the method. This will be null when an error occurs.
  • Status - The return status of the method.
  • Message - [Deprecated: use message array ] The error message returned if any.
  • ErrorMessages - An array of messages that contain error details/codes.
  • WarningMessages - An array of messages that contain warning details/codes.
  • SuccessMessages - An array of messages that contain success details/codes.

Status codes

  • -1 - Connection Error
  • 0 - Ok
  • 1 - Error
  • 2 - Unauthorized
  • 3 - InvalidCredentials

Dates

  • Dates are returned in UTC format, ex. "2012-03-19T07:22Z"
  • Minimum Date returned as null instead of "0001-01-01T00:00:00"

Updated: 2026-06-11 22:25:16 UTC