SiteSense MMS API Developers Guide API Reference

SiteSense® provides a powerful 3rd Party RESTful API which can be used to integrate SiteSense® with other systems such ERP, BIM, project management, engineering design tools or other business systems.

API Endpoint
https://www.sitesenseweb.com/api/{environment}/{resource}
Schemes: https
Version: 3.0

Authentication

api_key

name
x-api-key
in
header

createparts

POST /createparts

Used to create or update part resources within SiteSense®. Response includes an array of objects with the status of each

Request Content-Types: appplication/json
Request Example
{
  "projectID": 99,
  "resources": [
    {
      "name": "Resource-001",
      "description": "Resource 001 Desription",
      "uom": "Each",
      "commodity": false,
      "resourceTypeID": 4,
      "schemaID": 13,
      "properties": [
        {
          "name": "Length",
          "value": "12"
        }
      ]
    }
  ]
}
200 OK

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "created",
  "report": "null",
  "guid": "b4e9a884-b19a-4359-857e-e64fcc5486e1"
}

createpo

POST /createpo

Used to create purchase order documents within SiteSense®. The request must include all document line items in one request.

Request Content-Types: appplication/json
Request Example
{
  "referenceDocumentImports": [
    {
      "projectID": 99,
      "poName": "SSPO-01",
      "poDescription": "SSPO-01 Description",
      "poItemLineNumber": "1",
      "poSubItemLineNumber": "2",
      "poItemName": "Resource-001",
      "poItemQuantity": "23",
      "poItemUOM": "Each",
      "poItemResourceTypeID": 4,
      "poItemExecutionDate": "01/01/2019",
      "poItemParameter": "Length|Width|Height",
      "poItemParameterValues": "12|4|5",
      "poParameter": "Vendor",
      "poParameterValues": "ABC Deliveries",
      "poLocked": false
    }
  ]
}

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "a1367d45-dbc2-41f8-addb-f6g4523a5deg_7b8a48be-0241-412e-9cbe-7d5067502b8b",
  "date": "1511987596447",
  "report": ""
}

createshipment

POST /createshipment

Used to create shipments documents within SiteSense®. The request must include all document line items in one request.

Request Content-Types: appplication/json
Request Example
{
  "referenceDocumentImports": [
    {
      "projectID": 99,
      "shipmentName": "SS-01",
      "shipmentDescription": "SS01 Description",
      "shipmentItemLineNumber": "1",
      "shipmentSubItemLineNumber": "2",
      "shipmentItemName": "Resource-001",
      "shipmentItemQuantity": "23",
      "shipmentItemUOM": "Each",
      "shipmentItemResourceTypeID": 4,
      "shipmentItemExecutionDate": "01/01/2019",
      "shipmentItemParameter": "Length|Width|Height",
      "shipmentItemParameterValues": "12|4|5",
      "shipmentParameter": "Vendor",
      "shipmentParameterValues": "ABC Deliveries",
      "shipmentLocked": false
    }
  ]
}

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "a1367d45-dbc2-41f8-addb-f6g4523a5deg_7b8a48be-0241-412e-9cbe-7d5067502b8b",
  "date": "1511987596447",
  "report": ""
}

getdocumentheaders

GET /getdocumentheaders

Used to retrieve a list of reference document headers from SiteSense®. The optional parameters can be used to filter the returned results by name or reference document type.

Request Content-Types: appplication/json
Request Example
{
  "documentName": "SSPO-0001",
  "documentType": "PO"
}

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "documentHeaders": [
    {
      "ResourceGuid": "1e71a067-207c-4dd4-825a-00169a42fd65",
      "name": "SSPO-0003",
      "description": "PO SSPO-00005 Description",
      "resourceClass": 7,
      "resourceType": 702,
      "createdAtUTC": "2017-12-01T17:57:11.733Z",
      "updatedAtUTC": "2017-12-01T17:57:11.733Z",
      "updatedBySystem": "SiteSense Web",
      "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
    }
  ]
}

getdocument

GET /getdocument

Used to retrieve a reference document from SiteSense®.

Request Content-Types: application/json
Request Example
{
  "resourceGuid": "1e71a067-207c-4dd4-825a-00169a42fd65"
}
200 OK

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "resourceGuid": "1e71a067-207c-4dd4-825a-00169a42fd65",
  "name": "SSPO-0003",
  "description": "SSPO-0003 Description",
  "resourceClass": 7,
  "resourceType": 702,
  "resourceTracking": [
    {
      "trackedQuantity": "0",
      "trackedInstanceIdentifier": "791155da-e5c6-4ca2-8c7c-7767bdb9a118",
      "properties": [
        {
          "name": "Length",
          "value": "12"
        }
      ],
      "sensors": [
        {
          "sensorKey": "00121234"
        }
      ],
      "schemaID": 0,
      "recentAttachements": [
        {
          "name": "pic.jpeg",
          "path": "/file/Download?id=UAT/39f21d61-e35a-4658-a498-8ef7f9c8b488"
        }
      ],
      "parents": [
        {
          "resourceGuid": "39f21d61-e35a-4658-a498-8ef7f9c8b499"
        }
      ],
      "location": "null"
    }
  ],
  "projects": [
    {
      "projectID": 10
    }
  ],
  "commodity": "null",
  "referenceDocument": {
    "locked": false,
    "lineItems": [
      {
        "quantity": 1,
        "lineItemNumber": 1,
        "subLineItemNumber": 0,
        "executionDate": "2017-12-01T17:57:11.670Z",
        "properties": {
          "movementFromLocation": "Current Location"
        },
        "lineItemGuid": "7c3c18ae-2b89-4800-9f67-b840c7ab509e",
        "metaData": {
          "createdAtUTC": "2017-12-01T17:57:11.733Z",
          "updatedAtUTC": "2017-12-01T17:57:11.733Z",
          "updatedBySystem": "Integration",
          "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
        },
        "fromReferenceDocumentLineItem": null,
        "resource": {
          "resourceGuid": "ad056d29-7b8a-466b-9ce1-29a2517083cc",
          "resourceID": 0,
          "name": "c1",
          "description": "c1 description",
          "resourceClass": 1,
          "resourceType": 6,
          "unitOfMeasure": "Each",
          "resourceTracking": [
            {
              "sensorKey": "00121234"
            }
          ]
        }
      }
    ]
  },
  "metaData": {
    "createdAtUTC": "2017-12-01T17:57:11.733Z",
    "updatedAtUTC": "2017-12-01T17:57:11.733Z",
    "updatedBySystem": "Integration",
    "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
  }
}

assignsensors

POST /assignsensors

Used to assign a sensor such as an RFID tag or Barcode to a resource within SiteSense®.

Request Content-Types: appplication/json
Request Example
{
  "completedBy": "GPS Updater",
  "task": [
    {
      "sensorKey": "00979797",
      "resource": "1e71a067-207c-4dd4-825a-00169a42fd907",
      "location": "[53.306093, -113.521712]",
      "accuracy": "10",
      "timeStamp": "1486486070"
    }
  ]
}
200 OK

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "result": true,
  "message": ""
}

unassignsensors

POST /unassignsensors

Used to unassign a sensor such as a RFID tag or Barcode within SiteSense®.

Request Content-Types: application/json
Request Example
{
  "completedBy": "GPS Updater",
  "task": [
    {
      "sensorKey": "00979797",
      "timeStamp": "1486486070"
    }
  ]
}
200 OK

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "result": true,
  "message": ""
}

updatelocation

POST /updatelocation

Used to update the location within SiteSense®.

Request Content-Types: application/json
Request Example
{
  "completedBy": "GPS Updater",
  "task": [
    {
      "sensorKey": "00979797",
      "location": "[53.306093, -113.521712]",
      "accuracy": "10",
      "timestamp": "1486486070"
    }
  ]
}
200 OK

200 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "result": true,
  "message": ""
}

Schema Definitions

resources: object

projectID: integer

ID associated with project

resources: resource
Example
{
  "projectID": 99,
  "resources": [
    {
      "name": "Resource-001",
      "description": "Resource 001 Desription",
      "uom": "Each",
      "commodity": false,
      "resourceTypeID": 4,
      "schemaID": 13,
      "properties": [
        {
          "name": "Length",
          "value": "12"
        }
      ]
    }
  ]
}

resource: object

name: string

Name of resource

description: string

Short description of resource

uom: string

Unit of measure of resource

commodity: boolean

Flag if resource is commodity or unique

resourceTypeID: integer

Resource type

schemaID: integer

Workflow definition

properties: resourceProperty

Name and value pair

Example
{
  "name": "Resource-001",
  "description": "Resource 001 Desription",
  "uom": "Each",
  "commodity": false,
  "resourceTypeID": 4,
  "schemaID": 13,
  "properties": [
    {
      "name": "Length",
      "value": "12"
    }
  ]
}

resourceProperty: object

name: string

Name of property

value: string

Value of property

Example
{
  "name": "Length",
  "value": "12"
}

purchaseOrder: object

referenceDocumentImports: purchaseOrderLineItem
Example
{
  "referenceDocumentImports": [
    {
      "projectID": 99,
      "poName": "SSPO-01",
      "poDescription": "SSPO-01 Description",
      "poItemLineNumber": "1",
      "poSubItemLineNumber": "2",
      "poItemName": "Resource-001",
      "poItemQuantity": "23",
      "poItemUOM": "Each",
      "poItemResourceTypeID": 4,
      "poItemExecutionDate": "01/01/2019",
      "poItemParameter": "Length|Width|Height",
      "poItemParameterValues": "12|4|5",
      "poParameter": "Vendor",
      "poParameterValues": "ABC Deliveries",
      "poLocked": false
    }
  ]
}

purchaseOrderLineItem: object

projectID: integer

ID associated with project

poName: string

PO name

poDescription: string

PO description

poItemLineNumber: string

PO line item number

poSubItemLineNumber: string

PO sub line item number

poItemName: string

name of resource on line item

poItemQuantity: string

Quantity for line item

poItemUOM: string

Unit of measure for line item

poItemResourceTypeID: integer

Resource Type

poItemExecutionDate: string

Expected PO delivery date

poItemParameter: string

Line item parameter names. Seperated by '|'

poItemParameterValues: string

Line item parameter values. Seperated by '|'

poParameter: string

Parameter names. Seperated by '|'

poParameterValues: string

Parameter values. Seperated by '|'

poLocked: boolean

Document state. Defaults to true. When locked users are unable to edit document.

Example
{
  "projectID": 99,
  "poName": "SSPO-01",
  "poDescription": "SSPO-01 Description",
  "poItemLineNumber": "1",
  "poSubItemLineNumber": "2",
  "poItemName": "Resource-001",
  "poItemQuantity": "23",
  "poItemUOM": "Each",
  "poItemResourceTypeID": 4,
  "poItemExecutionDate": "01/01/2019",
  "poItemParameter": "Length|Width|Height",
  "poItemParameterValues": "12|4|5",
  "poParameter": "Vendor",
  "poParameterValues": "ABC Deliveries",
  "poLocked": false
}

shipment: object

referenceDocumentImports: shipmentLineItem
Example
{
  "referenceDocumentImports": [
    {
      "projectID": 99,
      "shipmentName": "SS-01",
      "shipmentDescription": "SS01 Description",
      "shipmentItemLineNumber": "1",
      "shipmentSubItemLineNumber": "2",
      "shipmentItemName": "Resource-001",
      "shipmentItemQuantity": "23",
      "shipmentItemUOM": "Each",
      "shipmentItemResourceTypeID": 4,
      "shipmentItemExecutionDate": "01/01/2019",
      "shipmentItemParameter": "Length|Width|Height",
      "shipmentItemParameterValues": "12|4|5",
      "shipmentParameter": "Vendor",
      "shipmentParameterValues": "ABC Deliveries",
      "shipmentLocked": false
    }
  ]
}

shipmentLineItem: object

projectID: integer

ID associated with project

shipmentName: string

Shipment name

shipmentDescription: string

Shipment description

shipmentItemLineNumber: string

Shipment line item number

shipmentSubItemLineNumber: string

Shipment sub line item number

shipmentItemName: string

name of resource on line item

shipmentItemQuantity: string

Quantity for line item

shipmentItemUOM: string

Unit of measure for line item

shipmentItemResourceTypeID: integer

Resource Type

shipmentItemExecutionDate: string

Expected delivery date

shipmentItemParameter: string

Line item parameter names. Seperated by '|'

shipmentItemParameterValues: string

Line item parameter values. Seperated by '|'

shipmentParameter: string

parameter names. Seperated by '|'

shipmentParameterValues: string

parameter values. Seperated by '|'

shipmentLocked: boolean

Document state. Defaults to true. When locked users are unable to edit document.

Example
{
  "projectID": 99,
  "shipmentName": "SS-01",
  "shipmentDescription": "SS01 Description",
  "shipmentItemLineNumber": "1",
  "shipmentSubItemLineNumber": "2",
  "shipmentItemName": "Resource-001",
  "shipmentItemQuantity": "23",
  "shipmentItemUOM": "Each",
  "shipmentItemResourceTypeID": 4,
  "shipmentItemExecutionDate": "01/01/2019",
  "shipmentItemParameter": "Length|Width|Height",
  "shipmentItemParameterValues": "12|4|5",
  "shipmentParameter": "Vendor",
  "shipmentParameterValues": "ABC Deliveries",
  "shipmentLocked": false
}

getDocuments: object

documentName: string

Name of requested document.

documentType: string

Name of requested document type.

Example
{
  "documentName": "SSPO-0001",
  "documentType": "PO"
}

getDocument: object

resourceGuid: string

Unique key for SiteSense® document

Example
{
  "resourceGuid": "1e71a067-207c-4dd4-825a-00169a42fd65"
}

sensors: object

sensorKey: string
Example
{
  "sensorKey": "00121234"
}

attachments: object

name: string
path: string
Example
{
  "name": "pic.jpeg",
  "path": "/file/Download?id=UAT/39f21d61-e35a-4658-a498-8ef7f9c8b488"
}

parents: object

resourceGuid: string
Example
{
  "resourceGuid": "39f21d61-e35a-4658-a498-8ef7f9c8b499"
}

projects: object

projectID: integer
Example
{
  "projectID": 10
}

assignSensors: object

completedBy: string

Name for user/service responsible for assignment

task: sensor
Example
{
  "completedBy": "GPS Updater",
  "task": [
    {
      "sensorKey": "00979797",
      "resource": "1e71a067-207c-4dd4-825a-00169a42fd907",
      "location": "[53.306093, -113.521712]",
      "accuracy": "10",
      "timeStamp": "1486486070"
    }
  ]
}

unassignSensors: object

completedBy: string

Name for user/service responsible for assignment

task: sensorUnassign
Example
{
  "completedBy": "GPS Updater",
  "task": [
    {
      "sensorKey": "00979797",
      "timeStamp": "1486486070"
    }
  ]
}

sensor: object

sensorKey: string

Sensor ID

resource: string

Resource ID

location: string

Location at assignment. [Latitude, Longitude]

accuracy: string

Accuracy of the location at assignment

timeStamp: string

Time of assignment

Example
{
  "sensorKey": "00979797",
  "resource": "1e71a067-207c-4dd4-825a-00169a42fd907",
  "location": "[53.306093, -113.521712]",
  "accuracy": "10",
  "timeStamp": "1486486070"
}

sensorUnassign: object

sensorKey: string

Sensor ID

timeStamp: string

Time of assignment

Example
{
  "sensorKey": "00979797",
  "timeStamp": "1486486070"
}

updateLocations: object

completedBy: string

Name for user/service responsible for assignment

task: updateLocation
Example
{
  "completedBy": "GPS Updater",
  "task": [
    {
      "sensorKey": "00979797",
      "location": "[53.306093, -113.521712]",
      "accuracy": "10",
      "timestamp": "1486486070"
    }
  ]
}

updateLocation: object

sensorKey: string

Sensor ID

location: string

Location at assignment. [Latitude, Longitude]

accuracy: string

Accuracy of the location at assignment

timestamp: string

Time of assignment

Example
{
  "sensorKey": "00979797",
  "location": "[53.306093, -113.521712]",
  "accuracy": "10",
  "timestamp": "1486486070"
}

referenceDocumentResponse: object

id: string
date: string
report: string
Example
{
  "id": "a1367d45-dbc2-41f8-addb-f6g4523a5deg_7b8a48be-0241-412e-9cbe-7d5067502b8b",
  "date": "1511987596447",
  "report": ""
}

documentHeaders: object

documentHeaders: documentHeader
Example
{
  "documentHeaders": [
    {
      "ResourceGuid": "1e71a067-207c-4dd4-825a-00169a42fd65",
      "name": "SSPO-0003",
      "description": "PO SSPO-00005 Description",
      "resourceClass": 7,
      "resourceType": 702,
      "createdAtUTC": "2017-12-01T17:57:11.733Z",
      "updatedAtUTC": "2017-12-01T17:57:11.733Z",
      "updatedBySystem": "SiteSense Web",
      "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
    }
  ]
}

documentHeader: object

ResourceGuid: string
name: string
description: string
resourceClass: integer
resourceType: integer
createdAtUTC: string
updatedAtUTC: string
updatedBySystem: string
updatedByUser: string
Example
{
  "ResourceGuid": "1e71a067-207c-4dd4-825a-00169a42fd65",
  "name": "SSPO-0003",
  "description": "PO SSPO-00005 Description",
  "resourceClass": 7,
  "resourceType": 702,
  "createdAtUTC": "2017-12-01T17:57:11.733Z",
  "updatedAtUTC": "2017-12-01T17:57:11.733Z",
  "updatedBySystem": "SiteSense Web",
  "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
}

document: object

resourceGuid: string
name: string
description: string
resourceClass: integer
resourceType: integer
resourceTracking: resourceTracking
projects: projects
commodity: boolean
referenceDocument: object
metaData: metaData
Example
{
  "resourceGuid": "1e71a067-207c-4dd4-825a-00169a42fd65",
  "name": "SSPO-0003",
  "description": "SSPO-0003 Description",
  "resourceClass": 7,
  "resourceType": 702,
  "resourceTracking": [
    {
      "trackedQuantity": "0",
      "trackedInstanceIdentifier": "791155da-e5c6-4ca2-8c7c-7767bdb9a118",
      "properties": [
        {
          "name": "Length",
          "value": "12"
        }
      ],
      "sensors": [
        {
          "sensorKey": "00121234"
        }
      ],
      "schemaID": 0,
      "recentAttachements": [
        {
          "name": "pic.jpeg",
          "path": "/file/Download?id=UAT/39f21d61-e35a-4658-a498-8ef7f9c8b488"
        }
      ],
      "parents": [
        {
          "resourceGuid": "39f21d61-e35a-4658-a498-8ef7f9c8b499"
        }
      ],
      "location": "null"
    }
  ],
  "projects": [
    {
      "projectID": 10
    }
  ],
  "commodity": "null",
  "referenceDocument": {
    "locked": false,
    "lineItems": [
      {
        "quantity": 1,
        "lineItemNumber": 1,
        "subLineItemNumber": 0,
        "executionDate": "2017-12-01T17:57:11.670Z",
        "properties": {
          "movementFromLocation": "Current Location"
        },
        "lineItemGuid": "7c3c18ae-2b89-4800-9f67-b840c7ab509e",
        "metaData": {
          "createdAtUTC": "2017-12-01T17:57:11.733Z",
          "updatedAtUTC": "2017-12-01T17:57:11.733Z",
          "updatedBySystem": "Integration",
          "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
        },
        "fromReferenceDocumentLineItem": null,
        "resource": {
          "resourceGuid": "ad056d29-7b8a-466b-9ce1-29a2517083cc",
          "resourceID": 0,
          "name": "c1",
          "description": "c1 description",
          "resourceClass": 1,
          "resourceType": 6,
          "unitOfMeasure": "Each",
          "resourceTracking": [
            {
              "sensorKey": "00121234"
            }
          ]
        }
      }
    ]
  },
  "metaData": {
    "createdAtUTC": "2017-12-01T17:57:11.733Z",
    "updatedAtUTC": "2017-12-01T17:57:11.733Z",
    "updatedBySystem": "Integration",
    "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
  }
}

resourceTracking: object

trackedQuantity: string
trackedInstanceIdentifier: string
properties: resourceProperty
sensors: sensors
schemaID: integer
recentAttachements: attachments
parents: parents
location: string
Example
{
  "trackedQuantity": "0",
  "trackedInstanceIdentifier": "791155da-e5c6-4ca2-8c7c-7767bdb9a118",
  "properties": [
    {
      "name": "Length",
      "value": "12"
    }
  ],
  "sensors": [
    {
      "sensorKey": "00121234"
    }
  ],
  "schemaID": 0,
  "recentAttachements": [
    {
      "name": "pic.jpeg",
      "path": "/file/Download?id=UAT/39f21d61-e35a-4658-a498-8ef7f9c8b488"
    }
  ],
  "parents": [
    {
      "resourceGuid": "39f21d61-e35a-4658-a498-8ef7f9c8b499"
    }
  ],
  "location": "null"
}

lineItems: object

quantity: string
lineItemNumber: string
subLineItemNumber: string
executionDate: string
properties: object
lineItemGuid: string
metaData: metaData
fromReferenceDocumentLineItem: string
resource: getResource
Example
{
  "quantity": 1,
  "lineItemNumber": 1,
  "subLineItemNumber": 0,
  "executionDate": "2017-12-01T17:57:11.670Z",
  "properties": {
    "movementFromLocation": "Current Location"
  },
  "lineItemGuid": "7c3c18ae-2b89-4800-9f67-b840c7ab509e",
  "metaData": {
    "createdAtUTC": "2017-12-01T17:57:11.733Z",
    "updatedAtUTC": "2017-12-01T17:57:11.733Z",
    "updatedBySystem": "Integration",
    "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
  },
  "fromReferenceDocumentLineItem": null,
  "resource": {
    "resourceGuid": "ad056d29-7b8a-466b-9ce1-29a2517083cc",
    "resourceID": 0,
    "name": "c1",
    "description": "c1 description",
    "resourceClass": 1,
    "resourceType": 6,
    "unitOfMeasure": "Each",
    "resourceTracking": [
      {
        "sensorKey": "00121234"
      }
    ]
  }
}

getResource: object

resourceGuid: string
resourceID: integer
name: string
description: string
resourceClass: integer
resourceType: integer
unitOfMeasure: string
resourceTracking: sensors
Example
{
  "resourceGuid": "ad056d29-7b8a-466b-9ce1-29a2517083cc",
  "resourceID": 0,
  "name": "c1",
  "description": "c1 description",
  "resourceClass": 1,
  "resourceType": 6,
  "unitOfMeasure": "Each",
  "resourceTracking": [
    {
      "sensorKey": "00121234"
    }
  ]
}

metaData: object

createdAtUTC: string
updatedAtUTC: string
updatedBySystem: string
updatedByUser: string
Example
{
  "createdAtUTC": "2017-12-01T17:57:11.733Z",
  "updatedAtUTC": "2017-12-01T17:57:11.733Z",
  "updatedBySystem": "Integration",
  "updatedByUser": "fe4cb950-fab6-42c8-a3ff-fcbb8c0de6d9"
}

result: object

result: boolean
message: string
Example
{
  "result": true,
  "message": ""
}