Visitt Partner API Reference
Use our GraphQL API to get, create and update data from Visitt platform.
Terms of Service
API Endpoints
https://partner-api.visitt.io/graphql
Headers
# Your Partner API token provided by Visitt. Required in every request.
Authorization: <YOUR_TOKEN_HERE>
Getting Started
GraphQL request is an HTTP request with the following interface:
Endpoint: https://partner-api.visitt.io/graphql
Method: POST
Headers:
"Content-Type": "application/json"
"Authorization": <YOUR_PARTNER_API_TOKEN>
Body: GraphQL query JSON string
To more learn about GraphQL visit GraphQL official documentation
Authorization
API Token is scope to give partner access to a single company.
Once you retrieve the token from the company visitt's account, you can start making requests with the API. You will need to pass the token to the API in the header of your requests.
Send the API token in the "Authorization"
header:
"Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Examples
A few examples on how to use the GraphQL API with curl:
// This request fetches partner`s name
curl \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
-d '{"query":"{ partner { name } }"}' \
"https://partner-api.visitt.io/graphql"
// This request creates a Work Order with provided description
// and returns it`s _id
curl \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
-d '{
"query": "mutation createWorkOrder(:WorkOrderInput!) { createWorkOrder(input:) { workOrder { _id } } }",
"variables": {
"input": {
"description": "Test work order from the API"
}
}
}' \
"https://partner-api.visitt.io/graphql"
How to query a record?
In order to query a record you need to pass its' _id into variables object. As an example, let's say we want to query a building with _id 89b966022061b51b9812524e.
curl \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
-d '{
"query": "query Building(: String!) { building (buildingId: ) { _id name } }",
"variables": {
"buildingId": "89b966022061b51b9812524e"
}
}' \
"https://partner-api.visitt.io/graphql"
Response:
{
"data":{
"building":{
"_id":"89b966022061b51b9812524e",
"name":"Building One"
}
}
}
Where to get the _id of a record from?
You can use the records list querires or get it as a part of a mutation. For example, to query all buildings and get the _id of each we can do the following request:
curl \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
-d '{"query": "{ buildings { items { _id } } }" }' \
"https://partner-api.visitt.io/graphql"
Response:
{
"data":{
"buildings":{
"items":[
{
"_id":"89b966022061b51b9812524e"
},
{
"_id":"90d0540fd16fdd15df3f112a"
}
]
}
}
}
Sandbox
We recommend using the Apollo Studio Sandbox - a powerful web IDE for creating, running, and managing GraphQL operations. Some of the features:
- Setup the authentication once and for all
- Explore the Schema
- Create queries and mutations effortlessly
- Store frequently used requests in collections and share them
and much more
Rate Limit
Calls to our GraphQL API are rate limited to provide equitable access to the API for everyone and to prevent abuse. For each Partner API Token you have rate limit per query or mutation, most of them share the minimum of 100 times per each 10s window.
Webhooks
Automatically notify your app any time certain events occur in Visitt with incoming webhooks
Limitations
Please, consider the following Webhook API limitations:
- Only HTTPS URLs are supported
- Webhook handler should accept HTTPS POST requests with application/json body.
- Response to the webhook event should be HTTPS 200 OK, else the event is considered failed.
- Request to the webhook url has a timeout of 5 seconds, after which sending the event is considered failed.
- When the request to the webhook url failed, there will be 4 retry attempts with exponential 5 seconds delay backoff (5s, 10s, 20s, 40s).
- Webhooks urls are unique within the company.
- Up to 5 webhooks per Partner API token is allowed.
- If a Partner is inactive, Partner's webhooks will also be inactive.
How to use Webhooks API
- Add a webhook subscription to selected event types using the createWebhook mutation:
curl \ -X POST \ -H "Content-Type:application/json" \ -H "Authorization:<YOUR_PARTNER_API_TOKEN>" \ -d '{ "query": "mutation CreateWebhook (: WebhookInput!) { createWebhook (input: ) { webhook { _id url eventTypes active } } }", "variables": { "input": { "url" : <YOUR_WEBHOOK_ENDPOINT_ADDRESS>, "eventTypes": <WEBHOOK_EVENT_TYPES>, "active": <IS_WEBHOOK_ACTIVE> } } }' \ "https://partner-api.visitt.io/graphql"
- Get the full list of supported event types using the webhookEventTypes query:
curl \ -X POST \ -H "Content-Type:application/json" \ -H "Authorization:<YOUR_PARTNER_API_TOKEN>" \ -d '{ "query": "query WebhookEventTypes { webhookEventTypes { key } }" }' \ "https://partner-api.visitt.io/graphql"
- Update the existing webhook subscription or deactivate it using the updateWebhook mutation:
curl \ -X POST \ -H "Content-Type:application/json" \ -H "Authorization:<YOUR_PARTNER_API_TOKEN>" \ -d '{ "query": "mutation UpdateWebhook (: String!, : WebhookInput!) { updateWebhook (webhookId: , input: ) { webhook { _id url eventTypes active } } }", "variables": { "webhookId": <WEBHOOK_ID_TO_UPDATE>, "input": { "url" : <YOUR_WEBHOOK_ENDPOINT_ADDRESS>, "eventTypes": <WEBHOOK_EVENT_TYPES>, "active": <IS_WEBHOOK_ACTIVE> } } }' \ "https://partner-api.visitt.io/graphql"
- Get a list of all partner webhooks with partner query:
curl \ -X POST \ -H "Content-Type:application/json" \ -H "Authorization:<YOUR_PARTNER_API_TOKEN>" \ -d '{ "query": "query Partner { partner { name webhooks { _id url eventTypes active } } }" }' \ "https://partner-api.visitt.io/graphql"
- Access webhooks logs using the webhookLogs query:
curl \ -X POST \ -H "Content-Type:application/json" \ -H "Authorization:<YOUR_PARTNER_API_TOKEN>" \ -d '{ "query": "query WebhookLogs( : [WebhookLogFilter] : Int : Int ) { webhookLogs(filters: , skip: , limit: ) { items { _id eventId createdAt data } }}", "variables": { "skip": 1, "limit": 1, "filters": [ { "status": { "eq": "delivered" } }, { "event": { "eq": "workOrder.statusUpdated" } } ] } }' \ "https://partner-api.visitt.io/graphql"
Webhook authentication
Before processing the request payload, verify the request was sent by Visitt and not an unknown party:
- Extract visitt-signature headers from the request headers. There are two values to parse from the visitt-signature header, delimited by a , (comma) character.
- timestamp: The number of milliseconds since the epoch time at which the event was issued, prefixed by t=
- signatureHash: The HMAC SHA256 hashed signature for the request, prefixed by v1=
- To avoid replay attacks, it's recommended to validate that the timestamp does not differ too much from the current time.
- Take the _id from the request body.
- Concatenate the timestamp and the _id, separating them with a . (dot). Should have the following string [timestamp].[_id]
- Create a hash of that string using SHA 256 algorithm with your Partner API token as a key.
- Hash the string using HMAC SHA256, with the Partner API token as the key. The expected signature will be the hex digest of the hash.
- Finally, compare signatureHash and the result hash to make sure the webhook request is valid.
A simple Webhook authentication example with ExpressJS and Crypto
app.post('/webhook', (req, res) => {
const eventData = req.body;
const visittSignature = req.headers['visitt-signature']; // t=1664380506499,v1=073b17a064351a1e6t7d97a60b4979329f3f3092cf38ac35ea9a0b15c8e476d8
const [prefixedTimestamp, prefixedWebhookHmac] = visittSignature.split(',');
const timestamp = prefixedTimestamp.replace('t=', '');
if (Math.abs(new Date().getTime() - timestamp) > 1000 * 60 * 60 * 4) {
// Timestamp difference is more than 4 hours, might indicate an attack attempt
}
const webhookHmac = prefixedWebhookHmac.replace('v1=', '');
const hmac = crypto
.createHmac('sha256', PARTNER_TOKEN)
.update(`.._id}`)
.digest('hex');
const isValidWebhook = hmac === webhookHmac;
if (isValidWebhook) {
// Handle the valid webhook
}
res.writeHead(200);
res.end();
});
File Upload - POST /files
Upload files using multipart/from-data request, and receive unique file id to attach in mutations like createWorkOrder.
- Max allowed file size is 20mb.
- Max number of files per request is 10.
- Allowed files types are images, pdf and videos with the mimetypes:
image/*
,video/*
,application/pdf
.
Endpoint
Method | Endpoint |
---|---|
POST | /files |
Headers
Header | Value |
---|---|
Content-Type | multipart/form-data |
Authorization | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Request structure (multipart/form-data)
Parameter | Description |
---|---|
files required | You can send the content of the file as binary. This is used when a file is being uploaded from the browser. |
Rate Limit
The allowed rate limit is 20 requests per 60 seconds.
Example
curl
--request POST \
--url https://partner-api.visitt.io/files \
--header 'Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'content-type: multipart/form-data' \
--form 'files=@/Users/username/Desktop/file-1.png' \
--form 'files=@/Users/username/Desktop/file-2.png'
Response
In case of an error, you will get an error code along with the error message. On successful upload, you will receive a 200 status code with uploaded file details in a JSON-encoded response body.
{
"files": [
{
"fileId": "xtbisjz8sktdp57bdhso",
"format": "png",
"url": "https://res.cloudinary.com/gantzi/image/upload/v1653554155/xtbisjz8sktdp57bdhso.png",
"filename": "icon-144x144",
"bytes": 5912,
"resourceType": "image"
},
{
"fileId": "idkcuexbrmax1vlccilu",
"format": "png",
"url": "https://res.cloudinary.com/gantzi/image/upload/v1653554155/idkcuexbrmax1vlccilu.png",
"filename": "visitt-logo-main",
"bytes": 2806,
"resourceType": "image"
}
]
}
Errors
Code | Description |
---|---|
400 | Bad Request. e.g. The request provided too many files, more then 10 files / File mimetype is not supported |
401 | Unauthorized. Partner Token is missing or invalid |
413 | Payload Too Large. The request provided files that are larger then 20mb limit |
429 | Too Many Requests. Rate limit exceeded |
App Link - Verify JWT
Endpoint to verify a JWT generated via App link for auto login.
Endpoint
Method | Pathname |
---|---|
POST | /app-link/jwt-verify |
Headers
Header | Value |
---|---|
Content-Type | application/json |
Authorization | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Rate Limit
The allowed rate limit is 100 requests per 60 seconds.
Example:
Request:
curl \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: <JWT_TOKEN>" \
"https://partner-api.visitt.io/app-link/jwt/verify"
Response:
{
"_id": "token genreated id", // unique token id
"uid": "MgkxsnBYsYgvmYtnr", // id of the user or contact
"utype": "user" // the type of user in Visitt
"email": "[email protected]", // the email address of the entity
"phone": "+14511245298", // the phone number of the entity as international phone number, E.164 format
"companyId": "1k312k31adsa9sjd1", // user's company id
"source": "visitt|portal" // the source of the entity user or tenant
"appId": "your-app"
}
Errors
Code | Description |
---|---|
401 | Unauthorized. Token is missing, invalid or expired |
Changelog
Stay up to date with the latest Partner API schema! We recommend tracking deprecated elements and schema additions using the changelog:
Queries
billableItem
Description
Get a billable item by id
Response
Returns a BillableItem
Arguments
Name | Description |
---|---|
billableItemId - String!
|
id of the billable item. |
Example
Query
query billableItem($billableItemId: String!) {
billableItem(billableItemId: $billableItemId) {
_id
name
chargeCode
price
taxable
type
markup
markupUnit
active
archived
createdAt
updatedAt
}
}
Variables
{"billableItemId": "xyz789"}
Response
{
"data": {
"billableItem": {
"_id": "abc123",
"name": "abc123",
"chargeCode": "xyz789",
"price": 987.65,
"taxable": false,
"type": "labor",
"markup": 123.45,
"markupUnit": "fix_price",
"active": true,
"archived": false,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
billableItems
Description
Get billable items. Sorted descending by created date
Response
Returns a BillableItemsPaginated
Arguments
Name | Description |
---|---|
filters - [BillableItemFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query billableItems(
$filters: [BillableItemFilter],
$skip: Int,
$limit: Int
) {
billableItems(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...BillableItemFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"filters": [BillableItemFilter],
"skip": 123,
"limit": 987
}
Response
{
"data": {
"billableItems": {
"items": [BillableItem],
"pageInfo": PageInfo
}
}
}
building
Description
Get building.
Example
Query
query building($buildingId: String!) {
building(buildingId: $buildingId) {
_id
name
sites {
...SitesPaginatedFragment
}
integrations {
...EntityIntegrationFragment
}
}
}
Variables
{"buildingId": "xyz789"}
Response
{
"data": {
"building": {
"_id": "abc123",
"name": "xyz789",
"sites": SitesPaginated,
"integrations": [EntityIntegration]
}
}
}
buildings
Description
Get buildings. Sorted ascending by name.
Response
Returns a BuildingsPaginated
Arguments
Name | Description |
---|---|
filters - [BuildingFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query buildings(
$filters: [BuildingFilter],
$skip: Int,
$limit: Int
) {
buildings(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...BuildingFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [BuildingFilter], "skip": 987, "limit": 987}
Response
{
"data": {
"buildings": {
"items": [Building],
"pageInfo": PageInfo
}
}
}
categories
Description
Get categories (without sub categories). Sorted ascending by name.
Response
Returns a CategoriesPaginated
Arguments
Name | Description |
---|---|
filters - [CategoryFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query categories(
$filters: [CategoryFilter],
$skip: Int,
$limit: Int
) {
categories(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...CategoryFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [CategoryFilter], "skip": 987, "limit": 987}
Response
{
"data": {
"categories": {
"items": [Category],
"pageInfo": PageInfo
}
}
}
category
Description
Get category.
Example
Query
query category($categoryId: String!) {
category(categoryId: $categoryId) {
_id
name
color
subCategories {
...CategoryFragment
}
}
}
Variables
{"categoryId": "abc123"}
Response
{
"data": {
"category": {
"_id": "abc123",
"name": "abc123",
"color": "abc123",
"subCategories": [Category]
}
}
}
charge
Description
Get charge by id
Example
Query
query charge($chargeId: String!) {
charge(chargeId: $chargeId) {
_id
billableItemId
type
name
chargeCode
status
price
markup
markupUnit
taxable
tax
quantity
total
tenant {
...TenantFragment
}
workOrder {
...WorkOrderFragment
}
verifiedAt
verifiedBy
}
}
Variables
{"chargeId": "abc123"}
Response
{
"data": {
"charge": {
"_id": "abc123",
"billableItemId": "abc123",
"type": "labor",
"name": "xyz789",
"chargeCode": "xyz789",
"status": "open",
"price": 987.65,
"markup": 987.65,
"markupUnit": "fix_price",
"taxable": false,
"tax": 987.65,
"quantity": 123,
"total": 123.45,
"tenant": Tenant,
"workOrder": WorkOrder,
"verifiedAt": "2007-12-03T10:15:30Z",
"verifiedBy": "xyz789"
}
}
}
charges
Description
Get charges. Sorted descending by created date.
Response
Returns a ChargesPaginated
Arguments
Name | Description |
---|---|
filters - [ChargeFilter]
|
Charge filters |
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query charges(
$filters: [ChargeFilter],
$skip: Int,
$limit: Int
) {
charges(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...ChargeFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [ChargeFilter], "skip": 123, "limit": 123}
Response
{
"data": {
"charges": {
"items": [Charge],
"pageInfo": PageInfo
}
}
}
contact
Description
Get a contact by id.
Example
Query
query contact($contactId: String!) {
contact(contactId: $contactId) {
_id
name
phone
email
extraInfo
roles
isArchived
tenant {
...TenantFragment
}
tenants {
...TenantFragment
}
integrations {
...EntityIntegrationFragment
}
}
}
Variables
{"contactId": "abc123"}
Response
{
"data": {
"contact": {
"_id": "xyz789",
"name": "abc123",
"phone": "xyz789",
"email": "abc123",
"extraInfo": "abc123",
"roles": ["admin"],
"isArchived": true,
"tenant": Tenant,
"tenants": [Tenant],
"integrations": [EntityIntegration]
}
}
}
contacts
Description
Get contacts. Sorted ascending by name.
Response
Returns a ContactsPaginated
Arguments
Name | Description |
---|---|
filters - [ContactFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query contacts(
$filters: [ContactFilter],
$skip: Int,
$limit: Int
) {
contacts(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...ContactFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [ContactFilter], "skip": 987, "limit": 987}
Response
{
"data": {
"contacts": {
"items": [Contact],
"pageInfo": PageInfo
}
}
}
inspection
Description
Get an inspection by id.
Response
Returns an Inspection
Arguments
Name | Description |
---|---|
inspectionId - String!
|
id of the inspection. |
Example
Query
query inspection($inspectionId: String!) {
inspection(inspectionId: $inspectionId) {
_id
description
inspectionTrigger {
...InspectionTriggerFragment
}
status
startDate
dueDate
closedAt
assignedUsers {
...UserFragment
}
closedByActor {
...ActorFragment
}
property {
...PropertyFragment
}
buildings {
...BuildingFragment
}
locations {
...LocationFragment
}
sites {
...SiteFragment
}
category {
...CategoryFragment
}
workOrders {
...WorkOrderFragment
}
edits {
...InspectionEditFragment
}
}
}
Variables
{"inspectionId": "abc123"}
Response
{
"data": {
"inspection": {
"_id": "abc123",
"description": "xyz789",
"inspectionTrigger": InspectionTrigger,
"status": "open",
"startDate": "2007-12-03T10:15:30Z",
"dueDate": "2007-12-03T10:15:30Z",
"closedAt": "2007-12-03T10:15:30Z",
"assignedUsers": [User],
"closedByActor": Actor,
"property": Property,
"buildings": [Building],
"locations": [Location],
"sites": [Site],
"category": Category,
"workOrders": [WorkOrder],
"edits": [InspectionEdit]
}
}
}
inspectionTrigger
Description
Get an inspection trigger by id.
Response
Returns an InspectionTrigger
Arguments
Name | Description |
---|---|
inspectionTriggerId - String!
|
id of the inspection trigger. |
Example
Query
query inspectionTrigger($inspectionTriggerId: String!) {
inspectionTrigger(inspectionTriggerId: $inspectionTriggerId) {
_id
name
description
frequencyType
completionPolicySettings {
...CompletionPolicySettingsFragment
}
rrule {
...RRuleFragment
}
category {
...CategoryFragment
}
assignedUsers {
...UserFragment
}
property {
...PropertyFragment
}
buildings {
...BuildingFragment
}
locations {
...LocationFragment
}
sites {
...SiteFragment
}
isPaused
pauseHistory {
...PauseHistoryRecordFragment
}
}
}
Variables
{"inspectionTriggerId": "xyz789"}
Response
{
"data": {
"inspectionTrigger": {
"_id": "xyz789",
"name": "abc123",
"description": "xyz789",
"frequencyType": "one_time",
"completionPolicySettings": CompletionPolicySettings,
"rrule": RRule,
"category": Category,
"assignedUsers": [User],
"property": Property,
"buildings": [Building],
"locations": [Location],
"sites": [Site],
"isPaused": true,
"pauseHistory": [PauseHistoryRecord]
}
}
}
inspectionTriggers
Description
Get work inspection triggers. Sorted descending by the due date of the current instance.
Response
Returns an InspectionTriggersPaginated
Arguments
Name | Description |
---|---|
filters - [InspectionTriggerFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query inspectionTriggers(
$filters: [InspectionTriggerFilter],
$skip: Int,
$limit: Int
) {
inspectionTriggers(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...InspectionTriggerFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"filters": [InspectionTriggerFilter],
"skip": 987,
"limit": 987
}
Response
{
"data": {
"inspectionTriggers": {
"items": [InspectionTrigger],
"pageInfo": PageInfo
}
}
}
inspections
Description
Get inspections. Sorted descending by due date.
Response
Returns an InspectionsPaginated
Arguments
Name | Description |
---|---|
filters - [InspectionFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query inspections(
$filters: [InspectionFilter],
$skip: Int,
$limit: Int
) {
inspections(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...InspectionFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [InspectionFilter], "skip": 123, "limit": 987}
Response
{
"data": {
"inspections": {
"items": [Inspection],
"pageInfo": PageInfo
}
}
}
location
Description
Get location. Deprecated, use building
instead.
Example
Query
query location($locationId: String!) {
location(locationId: $locationId) {
_id
name
sites {
...SitesPaginatedFragment
}
}
}
Variables
{"locationId": "abc123"}
Response
{
"data": {
"location": {
"_id": "xyz789",
"name": "xyz789",
"sites": SitesPaginated
}
}
}
locations
Description
Get locations. Sorted ascending by name. Deprecated, use buildings
instead.
Response
Returns a LocationsPaginated
Arguments
Name | Description |
---|---|
filters - [LocationFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query locations(
$filters: [LocationFilter],
$skip: Int,
$limit: Int
) {
locations(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...LocationFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [LocationFilter], "skip": 987, "limit": 123}
Response
{
"data": {
"locations": {
"items": [Location],
"pageInfo": PageInfo
}
}
}
partner
Description
Get the authorized partner information.
Response
Returns a Partner
Example
Query
query partner {
partner {
name
webhooks {
...WebhookFragment
}
}
}
Response
{
"data": {
"partner": {
"name": "abc123",
"webhooks": [Webhook]
}
}
}
review
Description
Get a work order's review by id.
Example
Query
query review($reviewId: String!) {
review(reviewId: $reviewId) {
_id
workOrder {
...WorkOrderFragment
}
createdByActor {
...ActorFragment
}
createdAt
score
answers {
...ReviewAnswerFragment
}
}
}
Variables
{"reviewId": "xyz789"}
Response
{
"data": {
"review": {
"_id": "abc123",
"workOrder": WorkOrder,
"createdByActor": Actor,
"createdAt": "2007-12-03T10:15:30Z",
"score": 123,
"answers": [ReviewAnswer]
}
}
}
reviews
Description
Get work order's reviews. Sorted descending by created date.
Response
Returns a ReviewsPaginated
Arguments
Name | Description |
---|---|
filters - [ReviewFilter]
|
|
skip - Int
|
|
limit - Int
|
Example
Query
query reviews(
$filters: [ReviewFilter],
$skip: Int,
$limit: Int
) {
reviews(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...ReviewFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [ReviewFilter], "skip": 987, "limit": 123}
Response
{
"data": {
"reviews": {
"items": [Review],
"pageInfo": PageInfo
}
}
}
site
Description
Get site.
Example
Query
query site($siteId: String!) {
site(siteId: $siteId) {
_id
name
modelType
parentSites {
...SiteFragment
}
floor {
...SiteFragment
}
type
qrCode
notes
unitCode
size
level
integrations {
...EntityIntegrationFragment
}
}
}
Variables
{"siteId": "abc123"}
Response
{
"data": {
"site": {
"_id": "abc123",
"name": "xyz789",
"modelType": "site",
"parentSites": [Site],
"floor": Site,
"type": "abc123",
"qrCode": "abc123",
"notes": "xyz789",
"unitCode": "abc123",
"size": 123.45,
"level": 123,
"integrations": [EntityIntegration]
}
}
}
sites
Description
Get sites. Sorted ascending by name.
Response
Returns a SitesPaginated
Arguments
Name | Description |
---|---|
filters - [SiteFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query sites(
$filters: [SiteFilter],
$skip: Int,
$limit: Int
) {
sites(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...SiteFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [SiteFilter], "skip": 987, "limit": 123}
Response
{
"data": {
"sites": {
"items": [Site],
"pageInfo": PageInfo
}
}
}
tenant
Description
Get a tenant by id.
Example
Query
query tenant($tenantId: String!) {
tenant(tenantId: $tenantId) {
_id
name
tenantCode
contacts {
...ContactFragment
}
admins {
...ContactFragment
}
locations {
...TenantLocationFragment
}
isArchived
integrations {
...EntityIntegrationFragment
}
}
}
Variables
{"tenantId": "abc123"}
Response
{
"data": {
"tenant": {
"_id": "xyz789",
"name": "xyz789",
"tenantCode": "abc123",
"contacts": [Contact],
"admins": [Contact],
"locations": [TenantLocation],
"isArchived": true,
"integrations": [EntityIntegration]
}
}
}
tenants
Description
Get tenants. Sorted ascending by name.
Response
Returns a TenantsPaginated
Arguments
Name | Description |
---|---|
filters - [TenantFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query tenants(
$filters: [TenantFilter],
$skip: Int,
$limit: Int
) {
tenants(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...TenantFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [TenantFilter], "skip": 123, "limit": 987}
Response
{
"data": {
"tenants": {
"items": [Tenant],
"pageInfo": PageInfo
}
}
}
user
Description
Get user.
Example
Query
query user($userId: String!) {
user(userId: $userId) {
_id
firstName
lastName
internationalPhone
phone
email
role
position
image {
...MediaFragment
}
integrations {
...EntityIntegrationFragment
}
}
}
Variables
{"userId": "abc123"}
Response
{
"data": {
"user": {
"_id": "abc123",
"firstName": "xyz789",
"lastName": "xyz789",
"internationalPhone": "xyz789",
"phone": "xyz789",
"email": "xyz789",
"role": "admin",
"position": "abc123",
"image": Media,
"integrations": [EntityIntegration]
}
}
}
users
Description
Get users.
Response
Returns a UsersPaginated
Arguments
Name | Description |
---|---|
filters - [UserFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query users(
$filters: [UserFilter],
$skip: Int,
$limit: Int
) {
users(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...UserFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [UserFilter], "skip": 987, "limit": 123}
Response
{
"data": {
"users": {
"items": [User],
"pageInfo": PageInfo
}
}
}
webhookEventTypes
Description
Get a list of available webhook event types, sorted alpha-numerically by ascending key.
Response
Returns [WebhookEventType!]!
Example
Query
query webhookEventTypes {
webhookEventTypes {
key
}
}
Response
{
"data": {
"webhookEventTypes": [{"key": "xyz789"}]
}
}
webhookLogs
Description
Get a list of webhook logs, sorted by descending creation date.
Response
Returns a WebhookLogsPaginated!
Arguments
Name | Description |
---|---|
filters - [WebhookLogFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query webhookLogs(
$filters: [WebhookLogFilter],
$skip: Int,
$limit: Int
) {
webhookLogs(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...WebhookLogFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [WebhookLogFilter], "skip": 123, "limit": 123}
Response
{
"data": {
"webhookLogs": {
"items": [WebhookLog],
"pageInfo": PageInfo
}
}
}
workOrder
Description
Get a work order by id.
Example
Query
query workOrder($workOrderId: String!) {
workOrder(workOrderId: $workOrderId) {
_id
sequence
priority
source
status
statusText
description
assignedUsers {
...UserFragment
}
property {
...PropertyFragment
}
building {
...BuildingFragment
}
location {
...LocationFragment
}
site {
...SiteFragment
}
category {
...CategoryFragment
}
subCategory {
...CategoryFragment
}
contacts {
...ContactFragment
}
tenants {
...TenantFragment
}
tenant {
...TenantFragment
}
defectMedia {
...MediaFragment
}
repairMedia {
...MediaFragment
}
dueDate
createdAt
createdByActor {
...ActorFragment
}
reporterContact {
...ContactFragment
}
firstResponseAt
firstResponseByActor {
...ActorFragment
}
completedAt
completedByActor {
...ActorFragment
}
canceledAt
canceledByActor {
...ActorFragment
}
updatedAt
updatedByActor {
...ActorFragment
}
totalCharge
inspection {
...InspectionFragment
}
type
integrations {
...EntityIntegrationFragment
}
}
}
Variables
{"workOrderId": "abc123"}
Response
{
"data": {
"workOrder": {
"_id": "xyz789",
"sequence": 987,
"priority": 987,
"source": "xyz789",
"status": "pending",
"statusText": "xyz789",
"description": "xyz789",
"assignedUsers": [User],
"property": Property,
"building": Building,
"location": Location,
"site": Site,
"category": Category,
"subCategory": Category,
"contacts": [Contact],
"tenants": [Tenant],
"tenant": Tenant,
"defectMedia": [Media],
"repairMedia": [Media],
"dueDate": "2007-12-03T10:15:30Z",
"createdAt": "2007-12-03T10:15:30Z",
"createdByActor": Actor,
"reporterContact": Contact,
"firstResponseAt": "2007-12-03T10:15:30Z",
"firstResponseByActor": Actor,
"completedAt": "2007-12-03T10:15:30Z",
"completedByActor": Actor,
"canceledAt": "2007-12-03T10:15:30Z",
"canceledByActor": Actor,
"updatedAt": "2007-12-03T10:15:30Z",
"updatedByActor": Actor,
"totalCharge": 123.45,
"inspection": Inspection,
"type": "abc123",
"integrations": [EntityIntegration]
}
}
}
workOrders
Description
Get work orders. Sorted descending by created date.
Response
Returns a WorkOrdersPaginated
Arguments
Name | Description |
---|---|
filters - [WorkOrderFilter]
|
|
skip - Int
|
Number of items to skip, the default is 0. Must be a positive integer. |
limit - Int
|
Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
Example
Query
query workOrders(
$filters: [WorkOrderFilter],
$skip: Int,
$limit: Int
) {
workOrders(
filters: $filters,
skip: $skip,
limit: $limit
) {
items {
...WorkOrderFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"filters": [WorkOrderFilter], "skip": 123, "limit": 987}
Response
{
"data": {
"workOrders": {
"items": [WorkOrder],
"pageInfo": PageInfo
}
}
}
Mutations
archiveContact
Description
Archive or Unarchive contact.
Response
Returns an ArchiveContactsResult!
Example
Query
mutation archiveContact(
$contactId: String!,
$archive: Boolean!
) {
archiveContact(
contactId: $contactId,
archive: $archive
) {
contact {
...ContactFragment
}
}
}
Variables
{"contactId": "abc123", "archive": false}
Response
{"data": {"archiveContact": {"contact": Contact}}}
archiveTenant
Description
Archive or Unarchive tenant.
Response
Returns an ArchiveTenantsResult!
Example
Query
mutation archiveTenant(
$tenantId: String!,
$archive: Boolean!
) {
archiveTenant(
tenantId: $tenantId,
archive: $archive
) {
tenant {
...TenantFragment
}
}
}
Variables
{"tenantId": "abc123", "archive": true}
Response
{"data": {"archiveTenant": {"tenant": Tenant}}}
createBillableItem
Description
Create billable item
Response
Returns a CreateBillableItemResult!
Arguments
Name | Description |
---|---|
input - BillableItemInput!
|
Input of the new billable item. |
Example
Query
mutation createBillableItem($input: BillableItemInput!) {
createBillableItem(input: $input) {
billableItem {
...BillableItemFragment
}
}
}
Variables
{"input": BillableItemInput}
Response
{
"data": {
"createBillableItem": {"billableItem": BillableItem}
}
}
createContact
Description
Create new contact.
Response
Returns a CreateContactResult!
Arguments
Name | Description |
---|---|
input - ContactInput!
|
Input of the contact values to create. |
Example
Query
mutation createContact($input: ContactInput!) {
createContact(input: $input) {
contact {
...ContactFragment
}
}
}
Variables
{"input": ContactInput}
Response
{"data": {"createContact": {"contact": Contact}}}
createTenant
Description
Create new tenant.
Response
Returns a CreateTenantResult!
Arguments
Name | Description |
---|---|
input - TenantInput!
|
Input of the new tenant. |
Example
Query
mutation createTenant($input: TenantInput!) {
createTenant(input: $input) {
tenant {
...TenantFragment
}
}
}
Variables
{"input": TenantInput}
Response
{"data": {"createTenant": {"tenant": Tenant}}}
createWebhook
Description
Create new webhook.
Response
Returns a CreateWebhookResult!
Arguments
Name | Description |
---|---|
input - WebhookInput!
|
Input of the webhook to create. |
Example
Query
mutation createWebhook($input: WebhookInput!) {
createWebhook(input: $input) {
webhook {
...WebhookFragment
}
}
}
Variables
{"input": WebhookInput}
Response
{"data": {"createWebhook": {"webhook": Webhook}}}
createWorkOrder
Description
Create new work order.
Response
Returns a CreateWorkOrderResult!
Arguments
Name | Description |
---|---|
input - WorkOrderInput!
|
Input of the new work order. |
Example
Query
mutation createWorkOrder($input: WorkOrderInput!) {
createWorkOrder(input: $input) {
workOrder {
...WorkOrderFragment
}
}
}
Variables
{"input": WorkOrderInput}
Response
{"data": {"createWorkOrder": {"workOrder": WorkOrder}}}
updateBillableItem
Description
Update billable item
Response
Returns an UpdateBillableItemResult
Arguments
Name | Description |
---|---|
billableItemId - String!
|
The id of the billable item. |
input - BillableItemInput
|
Input of the billable item to update. |
Example
Query
mutation updateBillableItem(
$billableItemId: String!,
$input: BillableItemInput
) {
updateBillableItem(
billableItemId: $billableItemId,
input: $input
) {
billableItem {
...BillableItemFragment
}
}
}
Variables
{
"billableItemId": "xyz789",
"input": BillableItemInput
}
Response
{
"data": {
"updateBillableItem": {"billableItem": BillableItem}
}
}
updateChargesStatus
Description
Update charge status
Response
Returns an UpdateChargeStatusResult
Arguments
Name | Description |
---|---|
chargeIds - [String!]!
|
Charges ids to update |
input - UpdateChargeStatusInput
|
Input of the charges status to update. |
Example
Query
mutation updateChargesStatus(
$chargeIds: [String!]!,
$input: UpdateChargeStatusInput
) {
updateChargesStatus(
chargeIds: $chargeIds,
input: $input
) {
charges {
...ChargeFragment
}
}
}
Variables
{
"chargeIds": ["abc123"],
"input": UpdateChargeStatusInput
}
Response
{"data": {"updateChargesStatus": {"charges": [Charge]}}}
updateContact
Description
Update contact. Only passed fields are updated, to reset a field pass null or "" (empty string)
Response
Returns an UpdateContactsResult!
Arguments
Name | Description |
---|---|
contactId - String!
|
id of the contact. |
input - ContactInput!
|
Input of the contact values to update. |
Example
Query
mutation updateContact(
$contactId: String!,
$input: ContactInput!
) {
updateContact(
contactId: $contactId,
input: $input
) {
contact {
...ContactFragment
}
}
}
Variables
{
"contactId": "xyz789",
"input": ContactInput
}
Response
{"data": {"updateContact": {"contact": Contact}}}
updateTenant
Description
Update tenant.
Response
Returns an UpdateTenantsResult!
Arguments
Name | Description |
---|---|
tenantId - String!
|
id of the tenant. |
input - TenantInput!
|
Input of the tenant values to update. |
Example
Query
mutation updateTenant(
$tenantId: String!,
$input: TenantInput!
) {
updateTenant(
tenantId: $tenantId,
input: $input
) {
tenant {
...TenantFragment
}
}
}
Variables
{
"tenantId": "abc123",
"input": TenantInput
}
Response
{"data": {"updateTenant": {"tenant": Tenant}}}
updateWebhook
Description
Update a webhook.
Response
Returns an UpdateWebhookResult!
Arguments
Name | Description |
---|---|
webhookId - String!
|
The id of the webhook. |
input - WebhookInput!
|
Input of the webhook to update. |
Example
Query
mutation updateWebhook(
$webhookId: String!,
$input: WebhookInput!
) {
updateWebhook(
webhookId: $webhookId,
input: $input
) {
webhook {
...WebhookFragment
}
}
}
Variables
{
"webhookId": "xyz789",
"input": WebhookInput
}
Response
{"data": {"updateWebhook": {"webhook": Webhook}}}
updateWorkOrders
Description
Update work orders.
Response
Returns an UpdateWorkOrdersResult!
Arguments
Name | Description |
---|---|
workOrderIds - [String]
|
Work orders ids to update |
input - WorkOrderUpdateInput
|
Input of the work order values to update. |
Example
Query
mutation updateWorkOrders(
$workOrderIds: [String],
$input: WorkOrderUpdateInput
) {
updateWorkOrders(
workOrderIds: $workOrderIds,
input: $input
) {
workOrders {
...WorkOrderFragment
}
}
}
Variables
{
"workOrderIds": ["abc123"],
"input": WorkOrderUpdateInput
}
Response
{
"data": {
"updateWorkOrders": {"workOrders": [WorkOrder]}
}
}
Types
Actor
Description
Actor is the entity who performed an action. It can be user, contact, integration, partner
Example
{
"_id": "xyz789",
"label": "abc123",
"image": Media,
"type": "user"
}
ActorType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
Example
"user"
ArchiveContactsResult
Fields
Field Name | Description |
---|---|
contact - Contact
|
The archived/unarchived contact. |
Example
{"contact": Contact}
ArchiveTenantsResult
Fields
Field Name | Description |
---|---|
tenant - Tenant
|
The archived/unarchived tenant. |
Example
{"tenant": Tenant}
BillableItem
Fields
Field Name | Description |
---|---|
_id - String!
|
Visitt internal item id |
name - String!
|
Name or description of billable item |
chargeCode - String
|
Chrage code of billable item |
price - Float
|
Price of billable item |
taxable - Boolean
|
Apply tax to charges of billable item |
type - BillableItemType
|
Type of billable item |
markup - Float
|
Markup to apply to billable item charges |
markupUnit - BillableMarkupType
|
Type of markup, fixed amount or percentage |
active - Boolean
|
Is billable item active |
archived - Boolean
|
Is billable item archived |
createdAt - DateTime
|
Creation time in Visitt |
updatedAt - DateTime
|
Update time in Visitt |
Example
{
"_id": "abc123",
"name": "xyz789",
"chargeCode": "xyz789",
"price": 987.65,
"taxable": true,
"type": "labor",
"markup": 987.65,
"markupUnit": "fix_price",
"active": false,
"archived": false,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
BillableItemFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The billable item id filter |
Example
{"_id": FilterIdStringArray}
BillableItemInput
Fields
Input Field | Description |
---|---|
type - BillableItemType!
|
Type of the billable item |
name - String!
|
Name or description of billable item |
price - Float!
|
Price of billable item |
markup - Float
|
Markup to apply to billable item charges |
markupUnit - BillableMarkupType
|
Type of markup, fixed amount or percentage |
chargeCode - String
|
Chrage code of billable item |
active - Boolean
|
Is billable active |
archived - Boolean
|
Is billable archived |
taxable - Boolean
|
Is billable taxable |
Example
{
"type": "labor",
"name": "xyz789",
"price": 987.65,
"markup": 987.65,
"markupUnit": "fix_price",
"chargeCode": "xyz789",
"active": true,
"archived": false,
"taxable": true
}
BillableItemType
Values
Enum Value | Description |
---|---|
|
Labor |
|
Material |
|
Equipment |
|
Utility |
|
Service |
|
Other |
Example
"labor"
BillableItemsPaginated
Fields
Field Name | Description |
---|---|
items - [BillableItem]
|
The list of billable items. |
pageInfo - PageInfo
|
The pagination information of current query. |
Example
{
"items": [BillableItem],
"pageInfo": PageInfo
}
BillableMarkupType
Values
Enum Value | Description |
---|---|
|
Fixed price - fixed currency amount, i.e. 10$. |
|
Percentage of billable item price, i.e. add 10% to price. |
Example
"fix_price"
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
Building
Fields
Field Name | Description |
---|---|
_id - String
|
id of the building. |
name - String
|
Name of the building. |
sites - SitesPaginated
|
Sites associated with the building. |
Arguments
|
|
integrations - [EntityIntegration]
|
External integrations associated with the building |
Example
{
"_id": "abc123",
"name": "abc123",
"sites": SitesPaginated,
"integrations": [EntityIntegration]
}
BuildingFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The building id filter |
name - FilterStringArray
|
The building name filter |
Example
{
"_id": FilterIdStringArray,
"name": FilterStringArray
}
BuildingsPaginated
Fields
Field Name | Description |
---|---|
items - [Building]
|
The list of buildings. |
pageInfo - PageInfo
|
The pagination information of current query. |
Example
{
"items": [Building],
"pageInfo": PageInfo
}
CategoriesPaginated
Fields
Field Name | Description |
---|---|
items - [Category]
|
The list of categories. |
pageInfo - PageInfo
|
The pagination information of current query. |
Example
{
"items": [Category],
"pageInfo": PageInfo
}
Category
Fields
Field Name | Description |
---|---|
_id - String
|
id of the category. |
name - String
|
Name of the category. |
color - String
|
Color of the category, in HEX format. |
subCategories - [Category]
|
Sub categories of the category. |
Example
{
"_id": "xyz789",
"name": "xyz789",
"color": "abc123",
"subCategories": [Category]
}
CategoryFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The category id filter |
Example
{"_id": FilterIdStringArray}
Charge
Fields
Field Name | Description |
---|---|
_id - String!
|
Visitt charge id |
billableItemId - String
|
Billable item id - Visitt id |
type - BillableItemType
|
Type of charge - Defined by billable item types. |
name - String!
|
Charge name/description |
chargeCode - String
|
Charge code of billable item |
status - ChargeStatus
|
Charge's status |
price - Float
|
Price of charge - Not including tax or markup. |
markup - Float
|
Markup |
markupUnit - BillableMarkupType
|
Markup type |
taxable - Boolean
|
Is taxable billing item taxable - At time of charge |
tax - Float
|
Tax amount |
quantity - Int
|
Quantity of items in this charge, 3 chairs, defined from a specific billable item chair. |
total - Float
|
Final price of charge - Including tax, markup and quantity of items. |
tenant - Tenant
|
The tenant the charge is issued for |
workOrder - WorkOrder
|
The work order the charge is attached to |
verifiedAt - DateTime
|
Timestamp indicating when the status was changed to 'verified' |
verifiedBy - String
|
Id of the user who changed the status to 'verified' |
Example
{
"_id": "abc123",
"billableItemId": "abc123",
"type": "labor",
"name": "abc123",
"chargeCode": "xyz789",
"status": "open",
"price": 123.45,
"markup": 123.45,
"markupUnit": "fix_price",
"taxable": true,
"tax": 123.45,
"quantity": 123,
"total": 123.45,
"tenant": Tenant,
"workOrder": WorkOrder,
"verifiedAt": "2007-12-03T10:15:30Z",
"verifiedBy": "abc123"
}
ChargeFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The charge id filter |
status - FilterChargeStatus
|
The charge status filter |
createdAt - FilterDate
|
The charge creation date filter. |
verifiedAt - FilterDate
|
The charge verification date filter. |
Example
{
"_id": FilterIdStringArray,
"status": FilterChargeStatus,
"createdAt": FilterDate,
"verifiedAt": FilterDate
}
ChargeStatus
Values
Enum Value | Description |
---|---|
|
Charge was added and awaiting approval or verification. open status can be changed to => verified |
|
Charge was verified by a manager. verified status can be changed to => submitted_to_accounting / accounting_processing / accounting_error |
|
Charge was sent to accounting and is waiting to be processed. submitted_to_accounting status can be changed to => accounting_processing / accounting_error |
|
Charge is being process by accounting. accounting_processing status can be changed to => settled |
|
Charge encountered an error while being processed by accounting. accounting_error status can be changed to => submitted_to_accounting / accounting_processing |
|
Charge was processed by accounting and is completed. settled status can't be changed |
Example
"open"
ChargesPaginated
CompletionPolicy
Values
Enum Value | Description |
---|---|
|
If set, the inspection due date will be set to the next inspection start date minus 1 millisecond |
|
If set, completionISODuration will be used to calculate the inspection due date |
|
If set, completionEndOfUnit will be used to calculate the inspection due date |
Example
"next_occurrence"
CompletionPolicySettings
Fields
Field Name | Description |
---|---|
completionPolicy - CompletionPolicy
|
The type of completion policy. Default is next_occurrence |
completionISODuration - String
|
ISO 8601 duration string. Added to the inspection start date to evaluate the inspection due date |
completionEndOfUnit - EndOfUnit
|
Due date is set to the end of this unit. E.g end of month, end of week. |
Example
{
"completionPolicy": "next_occurrence",
"completionISODuration": "abc123",
"completionEndOfUnit": "day"
}
Contact
Fields
Field Name | Description |
---|---|
_id - String!
|
id of the contact. |
name - String!
|
Name of the contact. |
phone - String
|
Phone of the contact. |
email - String
|
Email of the contact. |
extraInfo - String
|
Free text additional information of the contact. |
roles - [ContactRole]
|
Roles of contact |
isArchived - Boolean
|
Indicates the contact is archived. |
tenant - Tenant
|
Tenant the contact is assigned to. |
tenants - [Tenant]
|
Tenants list the contact is assigned to. Supports backward compatibility for contacts assigned to multiple tenants. |
integrations - [EntityIntegration]
|
External integrations associated with the contact |
Example
{
"_id": "xyz789",
"name": "abc123",
"phone": "abc123",
"email": "abc123",
"extraInfo": "xyz789",
"roles": ["admin"],
"isArchived": true,
"tenant": Tenant,
"tenants": [Tenant],
"integrations": [EntityIntegration]
}
ContactFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The contact id filter |
email - FilterStringArray
|
The contact email filter |
name - FilterStringArray
|
The contact name filter |
Example
{
"_id": FilterIdStringArray,
"email": FilterStringArray,
"name": FilterStringArray
}
ContactInput
Fields
Input Field | Description |
---|---|
name - String!
|
The name of the contact. (min 2 characters, max 100 characters) |
phone - String
|
The phone of the contact, as international phone number, E.164 format, unique per company. |
email - String
|
The email of the contact, unique per company. |
tenant - ContactTenantInput
|
The id of tenant to be assigned with the contact |
extraInfo - String
|
Free text additional information of the contact. (max 500 characters) |
roles - [ContactRole]
|
Roles of contact |
Example
{
"name": "abc123",
"phone": "abc123",
"email": "abc123",
"tenant": ContactTenantInput,
"extraInfo": "xyz789",
"roles": ["admin"]
}
ContactRole
Values
Enum Value | Description |
---|---|
|
|
|
Example
"admin"
ContactTenantInput
Fields
Input Field | Description |
---|---|
tenantId - String!
|
The id of tenant to be added to the contact. |
Example
{"tenantId": "xyz789"}
ContactsPaginated
CreateBillableItemResult
Fields
Field Name | Description |
---|---|
billableItem - BillableItem
|
Created billable item. |
Example
{"billableItem": BillableItem}
CreateContactResult
Fields
Field Name | Description |
---|---|
contact - Contact
|
The created contact. |
Example
{"contact": Contact}
CreateTenantResult
Fields
Field Name | Description |
---|---|
tenant - Tenant
|
The created tenant. |
Example
{"tenant": Tenant}
CreateWebhookResult
Fields
Field Name | Description |
---|---|
webhook - Webhook
|
Created webhook. |
Example
{"webhook": Webhook}
CreateWorkOrderResult
Fields
Field Name | Description |
---|---|
workOrder - WorkOrder
|
The created work order. |
Example
{"workOrder": WorkOrder}
DateTime
Example
"2007-12-03T10:15:30Z"
EndOfUnit
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
Example
"day"
EntityIntegration
FilterChargeStatus
Fields
Input Field | Description |
---|---|
eq - ChargeStatus
|
Filter by equality to the given status |
neq - ChargeStatus
|
All charges where status is not the given status |
in - [ChargeStatus]
|
Filter by equality to the given status array |
nin - [ChargeStatus]
|
All charges where status is not the given status array |
Example
{"eq": "open", "neq": "open", "in": ["open"], "nin": ["open"]}
FilterDate
Example
{
"eq": "2007-12-03T10:15:30Z",
"neq": "2007-12-03T10:15:30Z",
"gt": "2007-12-03T10:15:30Z",
"gte": "2007-12-03T10:15:30Z",
"lt": "2007-12-03T10:15:30Z",
"lte": "2007-12-03T10:15:30Z"
}
FilterIdStringArray
FilterInspectionStatus
Fields
Input Field | Description |
---|---|
eq - InspectionStatus
|
Filter by equality to the given status |
neq - InspectionStatus
|
All inspection where status is not the given status |
in - [InspectionStatus]
|
Filter by equality to the given status array |
nin - [InspectionStatus]
|
All inspection where status is not the given status array |
Example
{"eq": "open", "neq": "open", "in": ["open"], "nin": ["open"]}
FilterNumberArray
Fields
Input Field | Description |
---|---|
eq - Int
|
Equal to a given number |
neq - Int
|
Not equal to a given number |
gt - Int
|
Greater than a given number |
gte - Int
|
Greater than or equal a given number |
lt - Int
|
Less than a given number |
lte - Int
|
Less than or equal a given number |
in - [Int]
|
In array of given numbers |
nin - [Int]
|
Not in array of given numbers |
Example
{
"eq": 123,
"neq": 987,
"gt": 987,
"gte": 987,
"lt": 123,
"lte": 123,
"in": [123],
"nin": [123]
}
FilterSiteModelType
Fields
Input Field | Description |
---|---|
eq - SiteModelType
|
Filter by equality to the given modelType |
neq - SiteModelType
|
All sites where modelType is not the given modelTypes |
in - [SiteModelType]
|
Filter by equality to the given modelType array |
nin - [SiteModelType]
|
All sites where modelType is not the given modelTypes |
Example
{"eq": "site", "neq": "site", "in": ["site"], "nin": ["site"]}
FilterStringArray
Example
{
"eq": "xyz789",
"neq": "xyz789",
"contains": "xyz789",
"in": ["abc123"],
"nin": ["abc123"]
}
FilterWorkOrderStatus
Fields
Input Field | Description |
---|---|
eq - WorkOrderStatus
|
Filter by equality to the given status |
neq - WorkOrderStatus
|
All worker orders where status is not the given status |
in - [WorkOrderStatus]
|
Filter by equality to the given status array |
nin - [WorkOrderStatus]
|
All worker orders where status is not the given status array |
Example
{"eq": "pending", "neq": "pending", "in": ["pending"], "nin": ["pending"]}
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
FrequencyType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"one_time"
Inspection
Fields
Field Name | Description |
---|---|
_id - String
|
|
description - String
|
The description of the inspection, this value is based on the Inspection Trigger description |
inspectionTrigger - InspectionTrigger
|
The inspection's inspection trigger |
status - InspectionStatus
|
The status of the inspection |
startDate - DateTime
|
The date the inspection is open for completion |
dueDate - DateTime
|
The date the inspection will be marked as missed if it was not completed |
closedAt - DateTime
|
The date the inspection was closed (either because someone completed it or it was missed - on missed the closedDate is set to be the dueDate |
assignedUsers - [User]
|
Users assigned to the inspection |
closedByActor - Actor
|
The actor completed the inspection, will be null when inspection is missed |
property - Property
|
The property of the inspection |
buildings - [Building]
|
The buildings of the inspection |
locations - [Location]
|
Use buildings instead |
sites - [Site]
|
The sites of the inspection |
category - Category
|
The category of the inspection |
workOrders - [WorkOrder]
|
The work orders reported on the inspection |
edits - [InspectionEdit]
|
Log of edits made to a completed inspection |
Example
{
"_id": "xyz789",
"description": "xyz789",
"inspectionTrigger": InspectionTrigger,
"status": "open",
"startDate": "2007-12-03T10:15:30Z",
"dueDate": "2007-12-03T10:15:30Z",
"closedAt": "2007-12-03T10:15:30Z",
"assignedUsers": [User],
"closedByActor": Actor,
"property": Property,
"buildings": [Building],
"locations": [Location],
"sites": [Site],
"category": Category,
"workOrders": [WorkOrder],
"edits": [InspectionEdit]
}
InspectionEdit
InspectionFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The inspection id filter |
status - FilterInspectionStatus
|
The inspection status filter |
inspectionTriggerId - FilterIdStringArray
|
The inspection inspection trigger id filter. |
categoryId - FilterIdStringArray
|
The inspection category id filter. |
dueDate - FilterDate
|
The inspection due date filter. |
closedAt - FilterDate
|
The inspection closed at time filter. |
Example
{
"_id": FilterIdStringArray,
"status": FilterInspectionStatus,
"inspectionTriggerId": FilterIdStringArray,
"categoryId": FilterIdStringArray,
"dueDate": FilterDate,
"closedAt": FilterDate
}
InspectionStatus
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
Example
"open"
InspectionTrigger
Fields
Field Name | Description |
---|---|
_id - String!
|
The id of the inspection trigger |
name - String!
|
The name of the inspection |
description - String
|
The description of the inspection |
frequencyType - FrequencyType
|
The inspection frequency |
completionPolicySettings - CompletionPolicySettings
|
The inspection trigger rule completion policy that controls the inspection due date |
rrule - RRule
|
The inspection trigger rule |
category - Category
|
The inspection category |
assignedUsers - [User]
|
The inspection assigned users |
property - Property
|
The inspection property |
buildings - [Building]
|
The inspection trigger buildings |
locations - [Location]
|
Use buildings instead |
sites - [Site]
|
The inspection sites |
isPaused - Boolean
|
Whether the inspection trigger is currently paused |
pauseHistory - [PauseHistoryRecord]
|
History of pause status changes |
Example
{
"_id": "xyz789",
"name": "xyz789",
"description": "xyz789",
"frequencyType": "one_time",
"completionPolicySettings": CompletionPolicySettings,
"rrule": RRule,
"category": Category,
"assignedUsers": [User],
"property": Property,
"buildings": [Building],
"locations": [Location],
"sites": [Site],
"isPaused": false,
"pauseHistory": [PauseHistoryRecord]
}
InspectionTriggerFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The inspection trigger id filter |
Example
{"_id": FilterIdStringArray}
InspectionTriggersPaginated
Fields
Field Name | Description |
---|---|
items - [InspectionTrigger]
|
|
pageInfo - PageInfo
|
Example
{
"items": [InspectionTrigger],
"pageInfo": PageInfo
}
InspectionsPaginated
Fields
Field Name | Description |
---|---|
items - [Inspection]
|
|
pageInfo - PageInfo
|
Example
{
"items": [Inspection],
"pageInfo": PageInfo
}
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
Location
Description
Deprecated, use Building
instead.
Fields
Field Name | Description |
---|---|
_id - String
|
id of the location. |
name - String
|
Name of the location. |
sites - SitesPaginated
|
Sites associated with the location. |
Arguments
|
Example
{
"_id": "abc123",
"name": "abc123",
"sites": SitesPaginated
}
LocationFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The location id filter |
name - FilterStringArray
|
The location name filter |
Example
{
"_id": FilterIdStringArray,
"name": FilterStringArray
}
LocationsPaginated
Fields
Field Name | Description |
---|---|
items - [Location]
|
The list of locations. |
pageInfo - PageInfo
|
The pagination information of current query. |
Example
{
"items": [Location],
"pageInfo": PageInfo
}
Media
Example
{
"mediaId": "abc123",
"url": "abc123",
"thumbUrl": "xyz789",
"format": "abc123"
}
MediaInput
Fields
Input Field | Description |
---|---|
mediaId - String!
|
The fileId returned from upload Files API. |
Example
{"mediaId": "abc123"}
PageInfo
Example
{"hasNext": false, "totalCount": 123, "skip": 123, "limit": 987}
Partner
PauseAction
Description
Action performed on inspection trigger pause status
Values
Enum Value | Description |
---|---|
|
|
|
Example
"pause"
PauseHistoryRecord
Description
Record of pause status change
Fields
Field Name | Description |
---|---|
updatedByActor - Actor
|
Actor who made the change |
timestamp - DateTime
|
When the change was made |
action - PauseAction
|
Type of action performed |
Example
{
"updatedByActor": Actor,
"timestamp": "2007-12-03T10:15:30Z",
"action": "pause"
}
Property
QuestionKeys
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
Example
"satisfaction"
RRule
Fields
Field Name | Description |
---|---|
freq - String
|
The frequency at which the inspection repeats (e.g. DAILY, WEEKLY, MONTHLY) |
interval - Int
|
The interval between inspections in units of frequency (e.g. 2 for every 2 weeks) |
bymonthday - [Int]
|
The days of the month when inspection starts (e.g. [1, 15] for 1st and 15th) |
byweekday - [Int]
|
The days of the week when inspection starts (0-6, where 0 is Sunday) |
Example
{
"freq": "xyz789",
"interval": 987,
"bymonthday": [987],
"byweekday": [987]
}
Review
Fields
Field Name | Description |
---|---|
_id - String!
|
The id of the review |
workOrder - WorkOrder!
|
The reivew's work order |
createdByActor - Actor!
|
The actor that added the review |
createdAt - DateTime!
|
The time the review was created |
score - Int
|
The general review score from 1-5 |
answers - [ReviewAnswer]
|
The review detailed answers |
Example
{
"_id": "xyz789",
"workOrder": WorkOrder,
"createdByActor": Actor,
"createdAt": "2007-12-03T10:15:30Z",
"score": 987,
"answers": [ReviewAnswer]
}
ReviewAnswer
Fields
Field Name | Description |
---|---|
question - QuestionKeys
|
The quetion asked on the review form |
answerType - ReviewAnswerType
|
The type of the answer |
value - String
|
The answer value |
Example
{
"question": "satisfaction",
"answerType": "comment",
"value": "abc123"
}
ReviewAnswerType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
Example
"comment"
ReviewFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The review id filter |
createdAt - FilterDate
|
The review created at time filter. |
Example
{
"_id": FilterIdStringArray,
"createdAt": FilterDate
}
ReviewsPaginated
Site
Fields
Field Name | Description |
---|---|
_id - String
|
id of the site. |
name - String
|
Name of the site. |
modelType - SiteModelType
|
Model type of the site. |
parentSites - [Site]
|
Parent sites in the hierarchy, from root (first in the array) to immediate parent (last in the array) |
floor - Site
|
Floor that contains this site, can be the immediate parent or a higher level floor |
type - String
|
Type of the site. |
qrCode - String
|
QR code of the site |
notes - String
|
Additional notes about the site |
unitCode - String
|
Unit code of the site. |
size - Float
|
Size of the site in sqft or sqm (based on property settings) |
level - Int
|
Level of the floor (only for floor sites) |
integrations - [EntityIntegration]
|
External integrations associated with the site |
Example
{
"_id": "xyz789",
"name": "xyz789",
"modelType": "site",
"parentSites": [Site],
"floor": Site,
"type": "abc123",
"qrCode": "abc123",
"notes": "xyz789",
"unitCode": "abc123",
"size": 987.65,
"level": 987,
"integrations": [EntityIntegration]
}
SiteFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The site id filter |
buildingId - FilterIdStringArray
|
The site's building id filter |
modelType - FilterSiteModelType
|
The site's model type filter |
type - FilterStringArray
|
The site's type filter |
name - FilterStringArray
|
The site name filter |
parentSiteId - FilterIdStringArray
|
Filter all the children sites of a parent site, returns all immediate children sites and all their children sites |
Example
{
"_id": FilterIdStringArray,
"buildingId": FilterIdStringArray,
"modelType": FilterSiteModelType,
"type": FilterStringArray,
"name": FilterStringArray,
"parentSiteId": FilterIdStringArray
}
SiteModelType
Values
Enum Value | Description |
---|---|
|
Site represents a physical location or space |
|
Equipment represents a piece of equipment or machinery |
|
Leasable site represents a rentable space |
|
Floor represents a level in a building |
Example
"site"
SitesPaginated
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"
Tenant
Fields
Field Name | Description |
---|---|
_id - String!
|
id of the tenant. |
name - String
|
Name of the tenant. |
tenantCode - String
|
external id of the tenant. |
contacts - [Contact]
|
Contact list of the tenant. |
admins - [Contact]
|
Admin list of the tenant. Use contact role |
locations - [TenantLocation]
|
Locations list of the tenant. |
isArchived - Boolean
|
Indicates the tenant is archived. |
integrations - [EntityIntegration]
|
External integrations associated with the tenant |
Example
{
"_id": "xyz789",
"name": "abc123",
"tenantCode": "abc123",
"contacts": [Contact],
"admins": [Contact],
"locations": [TenantLocation],
"isArchived": false,
"integrations": [EntityIntegration]
}
TenantContactInput
Fields
Input Field | Description |
---|---|
contactId - String!
|
The id of contact to be added to the tenant. |
Example
{"contactId": "xyz789"}
TenantFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The tenant id filter |
buildingId - FilterIdStringArray
|
The tenant building ID filter. |
Example
{
"_id": FilterIdStringArray,
"buildingId": FilterIdStringArray
}
TenantInput
Fields
Input Field | Description |
---|---|
name - String!
|
The name of the tenant. (min 2 characters, max 100 characters). Unique per company |
tenantCode - String
|
The external id of the tenant. Unique per company |
contacts - [TenantContactInput!]
|
The contacts to associate to the tenant. Sets the contacts, pass [] to reset |
locations - [TenantLocationInput!]
|
The locations to associate to the tenant. Sets the locations, pass [] to reset |
Example
{
"name": "xyz789",
"tenantCode": "xyz789",
"contacts": [TenantContactInput],
"locations": [TenantLocationInput]
}
TenantLocation
TenantLocationInput
Fields
Input Field | Description |
---|---|
buildingId - String
|
The id of building to be added to the tenant. |
site - TenantSiteInput
|
The information of the site to associate with the tenant. |
Example
{
"buildingId": "xyz789",
"site": TenantSiteInput
}
TenantSiteInput
Fields
Input Field | Description |
---|---|
name - String
|
The name of the site for the tenant, optional, by default use the tenant name with the floor. |
floor - String
|
The floor of the site in the location to create / find existing site according to it. |
type - String
|
The type of the site in the location to set when creating a new site. |
Example
{
"name": "xyz789",
"floor": "xyz789",
"type": "abc123"
}
TenantsPaginated
UpdateBillableItemResult
Fields
Field Name | Description |
---|---|
billableItem - BillableItem
|
Updated billable item. |
Example
{"billableItem": BillableItem}
UpdateChargeStatusInput
Fields
Input Field | Description |
---|---|
status - ChargeStatus!
|
Status of the charge. Can't be unset |
Example
{"status": "open"}
UpdateChargeStatusResult
Fields
Field Name | Description |
---|---|
charges - [Charge]
|
Updated charges |
Example
{"charges": [Charge]}
UpdateContactsResult
Fields
Field Name | Description |
---|---|
contact - Contact
|
The updated contact. |
Example
{"contact": Contact}
UpdateTenantsResult
Fields
Field Name | Description |
---|---|
tenant - Tenant
|
The updated tenant. |
Example
{"tenant": Tenant}
UpdateWebhookResult
Fields
Field Name | Description |
---|---|
webhook - Webhook
|
Updated webhook. |
Example
{"webhook": Webhook}
UpdateWorkOrdersResult
Fields
Field Name | Description |
---|---|
workOrders - [WorkOrder!]!
|
Example
{"workOrders": [WorkOrder]}
User
Fields
Field Name | Description |
---|---|
_id - String!
|
id of the user. |
firstName - String!
|
First name of the user. |
lastName - String!
|
Last name of the user. |
internationalPhone - String
|
Phone of the user, as international phone number, E.164 format. |
phone - String
|
Phone of the user, in local format |
email - String
|
Email of the user. |
role - UserRole
|
Role of the user. |
position - String
|
Position of the user. free text |
image - Media
|
Image of the user |
integrations - [EntityIntegration]
|
External integrations associated with the user |
Example
{
"_id": "xyz789",
"firstName": "xyz789",
"lastName": "xyz789",
"internationalPhone": "xyz789",
"phone": "xyz789",
"email": "xyz789",
"role": "admin",
"position": "abc123",
"image": Media,
"integrations": [EntityIntegration]
}
UserFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The user id filter |
role - UserRoleFilter
|
The user role filter |
Example
{
"_id": FilterIdStringArray,
"role": UserRoleFilter
}
UserRole
Values
Enum Value | Description |
---|---|
|
|
|
|
|
Example
"admin"
UserRoleFilter
Fields
Input Field | Description |
---|---|
eq - UserRole
|
|
neq - UserRole
|
|
in - [UserRole]
|
|
nin - [UserRole]
|
Example
{"eq": "admin", "neq": "admin", "in": ["admin"], "nin": ["admin"]}
UsersPaginated
Webhook
Fields
Field Name | Description |
---|---|
_id - String!
|
The id of the webhook. |
url - String!
|
The url of the webhook. |
eventTypes - [String!]!
|
Event types of the webhook. |
active - Boolean!
|
Active state of the webhook. |
Example
{
"_id": "xyz789",
"url": "abc123",
"eventTypes": ["abc123"],
"active": false
}
WebhookEventType
Fields
Field Name | Description |
---|---|
key - String!
|
The key of the event type. |
Example
{"key": "xyz789"}
WebhookInput
Fields
Input Field | Description |
---|---|
url - String!
|
The HTTPS endpoint url that the webhook event will be sent to. |
eventTypes - [String!]!
|
Event types of the webhook. |
active - Boolean
|
Active state of the webhook. |
Example
{
"url": "xyz789",
"eventTypes": ["abc123"],
"active": false
}
WebhookLog
Fields
Field Name | Description |
---|---|
_id - String!
|
The id of the webhook log. |
webhookId - String!
|
The id of the webhook. |
event - String!
|
The type of the event. |
eventId - String!
|
The id of the event. |
log - String
|
The log message of the event. |
status - String!
|
The execution status of the event. |
attempt - Int!
|
The number of the attempt to send the event. |
data - String
|
The json string of the data of the event. |
createdAt - DateTime
|
The time when the event was created. |
Example
{
"_id": "abc123",
"webhookId": "abc123",
"event": "abc123",
"eventId": "xyz789",
"log": "xyz789",
"status": "abc123",
"attempt": 987,
"data": "abc123",
"createdAt": "2007-12-03T10:15:30Z"
}
WebhookLogFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The webhook log id filter. |
webhookId - FilterIdStringArray
|
The webhook id filter. |
eventId - FilterIdStringArray
|
The event id filter. |
status - FilterStringArray
|
The event status filter. |
event - FilterStringArray
|
The event type filter. |
createdAt - FilterDate
|
The created at time filter. |
Example
{
"_id": FilterIdStringArray,
"webhookId": FilterIdStringArray,
"eventId": FilterIdStringArray,
"status": FilterStringArray,
"event": FilterStringArray,
"createdAt": FilterDate
}
WebhookLogsPaginated
Fields
Field Name | Description |
---|---|
items - [WebhookLog]
|
The list of webhook logs. |
pageInfo - PageInfo
|
The pagination information of current query. |
Example
{
"items": [WebhookLog],
"pageInfo": PageInfo
}
WorkOrder
Fields
Field Name | Description |
---|---|
_id - String
|
id of the work order. |
sequence - Int
|
A running integer counting work orders in the customer. |
priority - Int
|
Priority of a work order |
source - String
|
The source of where the work order was created (Visitt, Visitt+, Integration, Partner API) |
status - WorkOrderStatus
|
Status of the work order. |
statusText - String
|
The text update added to the last status update. |
description - String
|
Description of the work order. |
assignedUsers - [User]
|
Users assigned to the work order. |
property - Property
|
Property of the work order |
building - Building
|
Building of the work order. |
location - Location
|
Use building instead |
site - Site
|
Site of the work order. |
category - Category
|
Category of the work order. |
subCategory - Category
|
Sub-category of the work order. |
contacts - [Contact]
|
Contacts assigned to the work order |
tenants - [Tenant]
|
Tenants assigned to the work order Work Order is now connected to only one Tenant. Use tenant |
tenant - Tenant
|
Tenant assigned to the work order |
defectMedia - [Media]
|
Images, PDFs or videos attached to describe the inital state of the work order. |
repairMedia - [Media]
|
Images, PDFs or videos attached to describe the end state of the work order. |
dueDate - DateTime
|
The date and time of which the work order is due |
createdAt - DateTime
|
The time at which the work order was created. |
createdByActor - Actor
|
The actor who created the work order |
reporterContact - Contact
|
The contact reported on the work order, in case it was created by a contact. |
firstResponseAt - DateTime
|
The first time at which the work order was responded, set to the time the first update happened on the work order. |
firstResponseByActor - Actor
|
The actor who first took action on the work order (update status or add text update) |
completedAt - DateTime
|
The time at which the work order was completed. |
completedByActor - Actor
|
The actor who completed the work order |
canceledAt - DateTime
|
The time at which the work order was canceled. |
canceledByActor - Actor
|
The actor who cancelled the work order |
updatedAt - DateTime
|
The last time the work order was updated. |
updatedByActor - Actor
|
The actor who updated the work order |
totalCharge - Float
|
The work order's total charges price |
inspection - Inspection
|
The inspection a work order was created from. Exists only in work orders created from inspections. |
type - String
|
Type of the work order (Amenity Booking, Proactive, Tenant Request) |
integrations - [EntityIntegration]
|
External integrations associated with the work order |
Example
{
"_id": "xyz789",
"sequence": 123,
"priority": 123,
"source": "xyz789",
"status": "pending",
"statusText": "abc123",
"description": "xyz789",
"assignedUsers": [User],
"property": Property,
"building": Building,
"location": Location,
"site": Site,
"category": Category,
"subCategory": Category,
"contacts": [Contact],
"tenants": [Tenant],
"tenant": Tenant,
"defectMedia": [Media],
"repairMedia": [Media],
"dueDate": "2007-12-03T10:15:30Z",
"createdAt": "2007-12-03T10:15:30Z",
"createdByActor": Actor,
"reporterContact": Contact,
"firstResponseAt": "2007-12-03T10:15:30Z",
"firstResponseByActor": Actor,
"completedAt": "2007-12-03T10:15:30Z",
"completedByActor": Actor,
"canceledAt": "2007-12-03T10:15:30Z",
"canceledByActor": Actor,
"updatedAt": "2007-12-03T10:15:30Z",
"updatedByActor": Actor,
"totalCharge": 987.65,
"inspection": Inspection,
"type": "abc123",
"integrations": [EntityIntegration]
}
WorkOrderFilter
Fields
Input Field | Description |
---|---|
_id - FilterIdStringArray
|
The work order id filter |
status - FilterWorkOrderStatus
|
The work order status filter |
priority - FilterNumberArray
|
The work order priority number filter. |
contactId - FilterIdStringArray
|
The work order contact ID filter. |
categoryId - FilterIdStringArray
|
The work order category ID filter. |
subCategoryId - FilterIdStringArray
|
The work order subcategory ID filter. |
siteId - FilterIdStringArray
|
The work order site ID filter. |
buildingId - FilterIdStringArray
|
The work order building ID filter. |
createdAt - FilterDate
|
The created at time filter. |
dueDate - FilterDate
|
The due date filter. |
completedAt - FilterDate
|
The completed at time filter. |
updatedAt - FilterDate
|
The updated at time filter. |
assignedUserIds - FilterIdStringArray
|
The assigned user list |
type - FilterStringArray
|
The work order type filter |
Example
{
"_id": FilterIdStringArray,
"status": FilterWorkOrderStatus,
"priority": FilterNumberArray,
"contactId": FilterIdStringArray,
"categoryId": FilterIdStringArray,
"subCategoryId": FilterIdStringArray,
"siteId": FilterIdStringArray,
"buildingId": FilterIdStringArray,
"createdAt": FilterDate,
"dueDate": FilterDate,
"completedAt": FilterDate,
"updatedAt": FilterDate,
"assignedUserIds": FilterIdStringArray,
"type": FilterStringArray
}
WorkOrderInput
Fields
Input Field | Description |
---|---|
description - String!
|
The description of the work order, the minimum needed to create work order, max size is 5000 characters. |
buildingId - String
|
The building id of the work order. |
siteId - String
|
The site id in the building of the work order. The site's building must be the same as the work order building id. |
categoryId - String
|
The category id of the work order. |
subCategoryId - String
|
The sub category id in the category of the work order. The sub category's parent category must be the same as the work order category id. categoryId is required with subCategoryId |
priority - Int
|
The priority level of the work order. Must be one of the following values:
|
defectMedia - [MediaInput]
|
The media to attach to the work order describing the inital state. Media should be upload first with the POST /files API, and provide here the fileId. |
reporterContactId - String
|
The contact id to set as the creator of the work order. |
tenantId - String
|
The tenant id to assign to the work order. If provided with reporterContactId, the contact must belong to this tenant. |
Example
{
"description": "xyz789",
"buildingId": "xyz789",
"siteId": "xyz789",
"categoryId": "xyz789",
"subCategoryId": "abc123",
"priority": 123,
"defectMedia": [MediaInput],
"reporterContactId": "abc123",
"tenantId": "xyz789"
}
WorkOrderStatus
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
Example
"pending"
WorkOrderUpdateInput
Description
Only values added to the input will be updated. In order to unset a field send null as value.
Fields
Input Field | Description |
---|---|
description - String
|
The description of the work order. max size is 5000 characters. Can't be unset |
status - WorkOrderStatus
|
Status of the work order. Can't be unset |
statusText - String
|
The text update added to the last status update. |
assignedUserIds - [String!]
|
Assigned user ids of the work order. Input will override old value. To unset pass an empty array. |
buildingId - String
|
The id of the building of the work order. |
siteId - String
|
The site id in the building of the work order. The site's building must be the same as the work order building id. buildingId is required with siteId. |
categoryId - String
|
The category id of the work order. |
subCategoryId - String
|
The sub category id in the category of the work order. The sub category's parent category must be the same as the work order category id. categoryId is required with subCategoryId |
priority - Int
|
The priority level of the work order. Must be one of the following values:
|
Example
{
"description": "xyz789",
"status": "pending",
"statusText": "abc123",
"assignedUserIds": ["abc123"],
"buildingId": "xyz789",
"siteId": "abc123",
"categoryId": "abc123",
"subCategoryId": "xyz789",
"priority": 123
}
WorkOrdersPaginated
Fields
Field Name | Description |
---|---|
items - [WorkOrder]
|
The work orders. |
pageInfo - PageInfo
|
The pagination information of current query. |
Example
{
"items": [WorkOrder],
"pageInfo": PageInfo
}