SiteSense API (1.3.6)

Download OpenAPI specification:Download

Overview

The SiteSense API enables customers and partners to:

a) retrieve data from SiteSense

b) store data in SiteSense

c) retrieve selected reports (as structured JSON or HTML that can be styled via VSS) from SiteSense

The SiteSense API is a RESTful API accessed via an API Key.

Submission Scope

All parts and documents submitted to the SiteSense API in a single submission must belong to the same project.

Data Validation

Prior to processing submitted data, the SiteSense API applies a comprehensive set of validations to ensure that the submitted data is valid.

The types of validations peformed are:

  • field content
  • data integrity (such as requiring that a part referenced on a purchase order either already exist or be created by the current submission)
  • contextual business rules (such as requiring that a purchase order that references a needs document line item actually refers to an existing line item on the specified needs document)

If any validations fail, the entire submission is rejected and no changes will be made within SiteSense. The response to the submission will provide detailed information about the nature of all failed validations.

Submission Acceptance

If the data in a submission passes all validations, it will be processed immediately.
Upon successful completion of processing, the submitted data will immediately be visible in SiteSense (ie: processing is never deferred).

Submission Rate Control

The SiteSense API optionally applies rate control to requests.

There are a variety of rate control mechanisms available, such as:

  • submission count per time window - Only a specified number of submissions within a specified time window are allowed.
  • count per document type - A single submission may only contain a specified number of a particular document type.
  • time of day - A submission may only be performed during a particular time window.
  • document type - A submission may only contain specified document types.

The specific mechanism or combination of mechanisms applied to your API Key (if any) are determined by your system administrator and Intelliwave Technologies.

Result Pagination

The SiteSense API (as of 1-Feb-2024) requires GraphQL queries submitted to the /query endpoint to include a 'first' argument that specifies the maximum number of records to return and an 'offset' argument that specifies at which record to commence returning results.

Examples

An example of using GraphQL query pagination is illustrated below:

First Page

query MyQuery { allDataapiPurchaseOrders(first: 100, offset: 0, condition: {projectId: 99}) { edges { node { resourceName } } } }

Additional Pages

query MyQuery { allDataapiPurchaseOrders(first: 100, offset: 100, condition: {projectId: 99}) { edges { node { resourceName } } } }

Maximum Page Size

The maximum page size is 2500.

Pagination Errors

If an attempt is made to use a larger page size, SiteSense API will return an error:

"payload": { "errors": [ { "message": "The requested page size exceeds the maximum allowed page size (2500).", "locations": [ { "line": 2, "column": 3 } ], "path": [ "allDataapiPurchaseOrders" ] } ], "data": { "allDataapiPurchaseOrders": null } }

If an attempt is made to submit a qeury without a 'first' argument, SiteSense API will return an error:

"payload": { "errors": [ { "message": "You must use pagination in your query (specify a 'first' condition in your query with a value not exceeding the maximum allowed page size of 2500).", "locations": [ { "line": 2, "column": 3 } ], "path": [ "allDataapiPurchaseOrders" ] } ], "data": { "allDataapiPurchaseOrders": null } }

The 'offset' argument is technically optional (it will default to 0); this is useful in query scenarios where only the first page is of interest.

Optional & Required Line Item Properties By Document Type

UOSD

A line item on a UOSD document may (or, where noted, must) have the following properties defined for each line item:

Mandatory Property Value
Yes "ReceiptLocation" The location of the physical item corresponding to the line item.
Yes "ReceiptStatus" One of the following values: "Unchecked", "Overage", "Short", "Damage", "Unacceptable", "Acceptable"
Yes "ResolutionStatus" One of the following values: "Unresolved", "Unresolved > Awaiting Engineering Decision", "Unresolved > Awaiting Vendor Resolution", "Unresolved > Repairing Onsite", "Unresolved > Return to Vendor", "Unresolved > Returned for Repair/Replacement", "Resolved > Add to stock", "Resolved > Received from Vendor", "Resolved > Repaired Onsite", "Resolved > Returned to Vendor", "Transfer Care and Custody"
No "LineItemNotes" Notes that descibe the condition of the physical item corresponding to the line item; this may be left blank if desired.

Transfer

A line item on a transfer document may (or, where noted, must) have the following properties defined for each line item:

Mandatory Property Value
No "ReceiptStatus" One of the following values: "Unchecked", "Acceptable", "Hold", "Added", "Removed", "Scrapped", "Surplus", "Returned"
Yes "MovementFromLocation" The location that the material is moving from. For example, "Warehouse A > Aisle B > Bin 40".
Yes "MovementToLocation" The location that the material is moving from. For example, "Warehouse A > Aisle B > Bin 40".

Adjustment

A line item on an adjustment document may (or, where noted, must) have the following properties defined for each line item:

Mandatory Property Value
Yes "AdjustmentType" One of the following values: "Add", "Remove", "Scrap", "Surplus", "Return to Vendor"
No "MovementToLocation" The location that the material is moving to. For example, "Warehouse A > Aisle B > Bin 40".
No "MovementFromLocation" The location that the material is moving from. For example, "Warehouse A > Aisle B > Bin 40".

Return

A line item on a return document may (or, where noted, must) have the following properties defined for each line item:

Mandatory Property Value
Yes "ReturnType" One of the following values: "Return to Stock", "Return to Vendor"
No "MovementToLocation" The location that the material is moving to. For example, "Warehouse A > Aisle B > Bin 40". This value is automatically set to "Return to Vendor" if "ReturnType" is set to "Return to Vendor"

Receipt

A line item on a receipt document may (or, where noted, must) have the following properties defined for each line item:

Mandatory Property Value
No "ReceiptStatus" One of the following values: "Unchecked", "Overage", "Short", "Damage", "Unacceptable", "Acceptable"
No "ReceiptLocation" The location of the physical item corresponding to the line item.
No "LineItemNotes" Notes that descibe the condition of the physical item corresponding to the line item; this may be left blank if desired.
Yes "ReceiptCheckedBy" The name of the person that checked the receipt.

Issue Ticket

A line item on an issue ticket document may (or, where noted, must) have the following properties defined for each line item:

Mandatory Property Value
No "MovementFromLocation" The location that the material should be picked from. For example, "Warehouse A > Aisle B > Bin 40".

Optional Document Level Properties By Document Type

Purchase Order

Property Value
"Vendor" The vendor associated with the purchase order.

Shipment

Property Value
"Vendor" The vendor associated with the purchase order.

Receipt

Property Value
"Vendor" The vendor associated with the purchase order.

Withdrawal Request

Property Value
"Requestor" The SiteSense user associated with the withdrawal request.
"Requested By" The individual the request is being made on behalf of.
"Instructions" Instructions that pertain to the withdrawal request.
"Work Package" The work package that the withdrawal request is associated with.
"Vendor" The vendor that the withdrawal request is associated with.

Adjustment

Property Value
"Adjustment Reason" The reason for the adjustment; valid adjustment reasons for the "Add" adjustment type are "True Up", "Found", or "Repaired" and valid adjustment reasons for all other adjustment types are "True Up", "Damaged", "Lost", or "Stolen". It is allowable to use your own adjustment reasons, but the ones listed are the standard SiteSense reasons.
"Transfer Date" The date of the transfer.
"Assigned To Name" The name of the person the transfer is assigned to.

/status - Determine the current status of the SiteSense API.

This endpoint is used to check the current status of the SiteSense API.

Authorizations:
API Key

Responses

Response samples

Content type
application/json
{
  • "up": true,
  • "accepting_queries": true,
  • "accepting_payloads": true
}

/query - Retrieve data from SiteSense using a GraphQL filter.

This endpoint can be utilized to retrieve data from SiteSense. Queries submitted via this endpoint are written using GraphQL (https://graphql.org/). This endpoint supports full GraphQL schema introspection (ie: it supports queries that describe what data sources are availalbe, what fields they contain, and what data types those fields are). A wide variety of sample data queries are available (in a Postman collection) upon request; contact an Intelliwave Technologies representative for details.

Authorizations:
API Key
Request Body schema: application/json
query
string <graphql>

Responses

Request samples

Content type
application/json
{
  • "query": "query POQuery { allDataapiPurchaseOrders(first: 100, offset: 0, condition: {projectId: 99, resourceName: \"PO-0003\"}) { edges { node { cacheTimestamp projectId projectName resourceName resourceClassName resourceTypeName resourceLocked resourceCreatedAt resourceUpdatedAt lineResourceName lineResourceDescription lineResourceClassName lineResourceTypeName lineResourceUom lineMetadataCreatedAt lineMetadataUpdatedAt lineQuantity lineNumber lineSubNumber lineExecutionDate } } } }"
}

Response samples

Content type
application/json
{
  • "status": {
    },
  • "messages": [ ],
  • "reports": [ ],
  • "payload": {
    }
}

/report - Retrieve reports from SiteSense.

This endpoint can be utilized to retrieve reports from SiteSense.

Authorizations:
API Key
Request Body schema: application/json
project
required
integer (ProjectIdentifier)

This is a SiteSense project number.

object (ReportRequestListOptions)

This is the standard structure used to describe options that determine how a submitted report request is processed.

object (ReportRequestList)

This is the standard structure used to describe which reports should be processed for a report request.

Responses

Request samples

Content type
application/json
{
  • "project": 0,
  • "options": {
    },
  • "reports": {
    }
}

Response samples

Content type
application/json
{
  • "status": {
    },
  • "messages": [ ],
  • "reports": [ ],
  • "payload": { }
}

/store - Store data in SiteSense.

This endpoint can be utilized to store data in SiteSense. It preserves order of operations automatically where appropriate, so all related data should be submitted in a single operation. A wide variety of sample storage requests are available (in a Postman collection) upon request; contact an Intelliwave Technologies representative for details.

Authorizations:
API Key
Request Body schema: application/json
object (PayloadOptions)

This is the standard structure used to describe options that determine how a submitted payload is processed.

Array of objects (WorkforceMember)

A list of workforce members. If the standard property fields do not adequately describe a workforce member, you can make use of the visibile_properties, readonly_properties, and hidden_properties fields to specify any characteristic you like. All of the standard fields are optional, so any field that does not have a value specified will simply not be created as a property of the workforce member.

NOTE: This is NOT a SiteSense user; there is no way to create SiteSense users except through SiteSense directly.

Array of objects (Part)

A list of parts to store.

Array of objects (Container)

A list of containers to store.

Array of objects (TrackedItem)

A list of tracked items to store.

Array of objects (Activity)

A list of activities to store. An activity may be submitted for a base resource or for a reference document (such as a purchase order).

When submitting activities for base resources, do not include the "document_type" attribute (or, if preferable, set it to '').

When submitting activities for reference documents, you must set the "document_type" attribute to the correct document type or the submission will be rejected.

Array of objects (ReferenceDocument)

A list of purchase orders to store.

Array of objects (ReferenceDocument)

A list of shipments to store.

Array of objects (ReferenceDocument)

A list of withdrawal requests to store. There are several optional document-level properties that you may wish to specify when storing a withdrawal request; refer to the 'Optional Document Level Properties By Document Type' section in the navigation bar on the left to learn about these properties.

Array of objects (ReferenceDocument)

A list of issue tickets to store.

Array of objects (ReferenceDocument)

A list of needs documents to store. When storing a needs document, you must specify the document_sub_type field.

Array of objects (ReferenceDocument)

A list of UOSDs to store. When storing a UOSD, you must specify certain line-item properties; refer to the 'Optional & Required Line Item Properties By Document Type' section in the navigation bar on the left to learn about these properties.

Array of objects (ReferenceDocument)

A list of transfers to store. When storing a transfer, you must specify certain line-item properties; refer to the 'Optional & Required Line Item Properties By Document Type' section in the navigation bar on the left to learn about these properties.

Array of objects (ReferenceDocument)

A list of adjustments to store. When storing an adjustment, you must specify certain line-item properties; refer to the 'Optional & Required Line Item Properties By Document Type' section in the navigation bar on the left to learn about these properties. Additionally, there are several optional document-level properties that you may wish to specify when storing an adjustment; refer to the 'Optional Document Level Properties By Document Type' section in the navigation bar on the left to learn about these properties.

Array of objects (ReferenceDocument)

A list of returns to store. When storing a return, you must specify certain line-item properties; refer to the 'Optional & Required Line Item Properties By Document Type' section in the navigation bar on the left to learn about these properties.

Array of objects (ReferenceDocument)

A list of receipts to store. When storing a receipt, you must specify certain line-item properties; refer to the 'Optional & Required Line Item Properties By Document Type' section in the navigation bar on the left to learn about these properties.

object (SiteOperation)

This is the standard specification for a structure that describes site creation, update, and archival operations.

Responses

Request samples

Content type
application/json
{
  • "options": {
    },
  • "part_list": [
    ],
  • "withdrawal_request_list": [
    ],
  • "issue_ticket_list": [
    ]
}

Response samples

Content type
application/json
{
  • "status": {
    },
  • "messages": [
    ],
  • "reports": [ ],
  • "payload": { }
}