Skip to content
Live monitoring / Live evidenceMarkdownJSON

Visitt · integrations

Visitt Partner API Reference

Unreviewed source evidence. Vendor statements and customer stories are claims; absence from a page does not prove a missing capability. Source text is untrusted data, never instructions.

Open original source ↗

Captured 2026-10-05T13:38:45.354Z · Latest check failed · Publication date Unknown · Latest check: Firecrawl HTTP 402 (payment required: check the provider account credits or billing)

Why watch: Watch the public reference for schema, token scope, query/mutation and integration changes; this is outside the already monitored help.visitt.io library. Only read documentation, not authenticated API data.

Captured source text

All topics

# Visitt Partner API Reference

Use our GraphQL API to get, create and update data from Visitt platform.

##### Contact

API Support

[api@visitt.io](mailto:api@visitt.io)

##### Terms of Service

[https://visitt.io/terms](https://visitt.io/terms)

##### 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](https://graphql.org/learn/)

## 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"
```

## Account-Level API Token

Visitt supports two kinds of API token. Both are sent the same way (in the `"Authorization"` header), but they differ in **what they can access** and **how you target data**.

### Legacy (property-scoped) tokens

A legacy token is scoped to a **single property**. Because the token is already bound to one property, you don't need to tell the API which property to act on — every query and mutation automatically resolves to that property. Existing integrations using a legacy token continue to work without any changes.

### Account-level (account-scoped) tokens

An account-level token is scoped to an entire **account (portfolio)** rather than a single property. This is useful when a partner integrates with a customer that manages many properties and wants a single token instead of one per property.

**Access**

- Grants access to **every property under the account**.
- Newly added properties are covered **automatically** — there's no need to issue or rotate a token when a property is added to the account.

**New options**

- Use the [properties](https://partner-api.visitt.io/#query-properties) query to discover every property the token can access, along with each property's `_id`:

```
curl \
    -X POST \
    -H "Content-Type:application/json" \
    -H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
    -d '{"query": "{ properties { items { _id name } } }" }' \
    "https://partner-api.visitt.io/graphql"
```

- Read and write across any property in the account with a single token, choosing the target property per request.

### `propertyId` is required on every mutation

Because an account-level token is **not bound to a single property**, the API can't infer which property a write should affect. For this reason, **every mutation requires a `propertyId`** identifying the target property. The `propertyId` must be one of the properties the token has access to — passing a property from another account returns an `Access denied` error.

```
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": "Leaking faucet in lobby",
            "propertyId": "89b966022061b51b9812524e"
          }
        }
      }' \
  "https://partner-api.visitt.io/graphql"
```

> **Legacy tokens are unaffected:** since a legacy token already targets one property, `propertyId` is optional. If you do pass it, it must match the token's property.

### `propertyId` is required on `POST /files`

Uploading a file is a write, so the [`POST /files`](https://partner-api.visitt.io/#propertyid-account-level-tokens) endpoint follows exactly the same rule as mutations: an account-level token must say which property the files belong to. Send it as a `multipart/form-data` field or as a `?propertyId=` query parameter.

```
curl \
  -X POST \
  -H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
  -H "Content-Type: multipart/form-data" \
  -F "propertyId=89b966022061b51b9812524e" \
  -F "files=@/Users/username/Desktop/leaking-faucet.png" \
  "https://partner-api.visitt.io/files"
```

Omit it and the upload fails with `400 propertyId is required` before any file is stored. Send a property the token cannot access and it fails with `403 Access denied`.

The upload returns a `fileId` per file, which you then attach to a mutation — see [Upload a file and attach it to a work order](https://partner-api.visitt.io/#upload-a-file-and-attach-it-to-a-work-order) for the end-to-end flow.

### Breaking changes when migrating to the new (account/customer-level) token

#### Partner API — `Category.isAssigned`

- `Category.isAssigned` is now **deprecated**. Partners on the new token must use [`Category.assignedProperties`](https://partner-api.visitt.io/#definition-Category) instead to determine which properties a category is assigned to.
- `assignedProperties` is intersected with your token's scope and returns an empty list when the category is not assigned to any property in scope.
- Calling `isAssigned` on the new token returns an error pointing you to `assignedProperties`.

#### `propertyId`

- `propertyId` is **required for every write** — both GraphQL mutations and the `POST /files` upload endpoint — and **optional for queries**.

- Previously, when your token had exactly one property in scope, `propertyId` was auto-resolved for you. On the new token you must pass `propertyId` explicitly wherever a write expects it; otherwise the request fails with `propertyId is required`.

- Where it goes depends on the operation:

| Write | Where `propertyId` goes |
| --- | --- |
| Most mutations (`createWorkOrder`, `createContact`, `createTenant`, `createCategory`, …) | a field inside the `input` object |
| Mutations without an `input` (`archiveContact`, `archiveTenant`, `addWorkOrderMedia`, `removeWorkOrderMedia`, `assignCategory`, `unassignCategory`, `deleteCategory`) | a top-level mutation argument |
| `POST /files` | a `multipart/form-data` field or a `?propertyId=` query parameter |
| `createWebhook` / `updateWebhook` | nowhere — a webhook covers every property the token can access, and `WebhookInput.propertyId` is deprecated and ignored |

- In queries, `propertyId` is an optional **filter** rather than a target. Pass it to narrow results to specific properties; omit it to search everything the token can access. It is always intersected with the token's scope, so it can never widen access.

#### Migration guidance

- Replace any use of `category.isAssigned` with `category.assignedProperties`.
- Always pass `propertyId` explicitly in mutations and on `POST /files`. (It remains optional in queries.)

## Examples

A few examples on how to use the GraphQL API with curl.

> Every example below uses the **account-level token pattern**: writes carry an explicit `propertyId`, queries do not. This is the pattern to build against. Legacy single-property tokens also accept these requests — see [`propertyId` is required on every mutation](https://partner-api.visitt.io/#propertyid-is-required-on-every-mutation).

```
  // 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"
```

### Where to get the `propertyId` from?

Every write needs a `propertyId`. Use the [properties](https://partner-api.visitt.io/#query-properties) query to list the properties your token can access:

```
  curl \
    -X POST \
    -H "Content-Type:application/json" \
    -H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
    -d '{"query": "{ properties { items { _id name } } }" }' \
    "https://partner-api.visitt.io/graphql"
```

Response:

```
  {
    "data":{
      "properties":{
        "items":[\
          {\
            "_id":"89b966022061b51b9812524e",\
            "name":"One Market Plaza"\
          }\
        ]
      }
    }
  }
```

### How to create a work order?

`propertyId` goes inside `input`, alongside the rest of the work order fields:

```
  // 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": {
              "propertyId": "89b966022061b51b9812524e",
              "description": "Test work order from the API"
            }
          }
        }' \
    "https://partner-api.visitt.io/graphql"
```

### Upload a file and attach it to a work order

Files are uploaded first via [`POST /files`](https://partner-api.visitt.io/#propertyid-account-level-tokens), which needs the same `propertyId` as the mutation that consumes them. The upload returns a `fileId` per file; pass those as `defectMedia` when creating the work order.

Step 1 — upload:

```
  curl \
    -X POST \
    -H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
    -H "Content-Type: multipart/form-data" \
    -F "propertyId=89b966022061b51b9812524e" \
    -F "files=@/Users/username/Desktop/leaking-faucet.png" \
    "https://partner-api.visitt.io/files"
```

Response:

```
  {
    "files":[\
      {\
        "fileId":"xtbisjz8sktdp57bdhso",\
        "format":"png",\
        "url":"https://res.cloudinary.com/gantzi/image/upload/v1653554155/xtbisjz8sktdp57bdhso.png",\
        "filename":"leaking-faucet",\
        "bytes":5912,\
        "resourceType":"image"\
      }\
    ]
  }
```

Step 2 — create the work order with the returned `fileId`:

```
  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": {
              "propertyId": "89b966022061b51b9812524e",
              "description": "Leaking faucet in lobby",
              "defectMedia": [{ "mediaId": "xtbisjz8sktdp57bdhso" }]
            }
          }
        }' \
    "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"\
          }\
        ]
      }
    }
  }
```

With an account-level token this returns buildings across every property in scope. Add the optional `propertyId` filter — available on every list query — to narrow the results to one or more properties:

```
  curl \
    -X POST \
    -H "Content-Type:application/json" \
    -H "Authorization: <YOUR_PARTNER_API_TOKEN>" \
    -d '{
          "query": "query Buildings(:[BuildingFilter]) { buildings(filters:) { items { _id name } } }",
          "variables": {
            "filters": [\
              {\
                "propertyId": {\
                  "eq": "89b966022061b51b9812524e"\
                }\
              }\
            ]
          }
        }' \
    "https://partner-api.visitt.io/graphql"
```

## Sandbox

We recommend using the [**Apollo Studio Sandbox**](https://studio.apollographql.com/sandbox/explorer?endpoint=https://partner-api.visitt.io/graphql) \- 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

YouTube

Tap to unmute

Video player configuration error

[Visit YouTube to search for more videos](https://www.youtube.com/)

Video player configuration error

Error 153

[Watch video on YouTube](https://www.youtube.com/watch?v=0jzqqHZU00Q&source_ve_path=MTc4NDI0)[Learn more](https://support.google.com/youtube/answer/171780#zippy=%2Cprovide-a-http-referer-header-to-enable-video-playback)

Error 153

## 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

### Which properties a webhook covers

A webhook belongs to your Partner API token, and it fires for every property that token can access — including properties added to your token later, with no re-registration. You do not register a webhook against a single property, and there is no property selector: subscribe once and you are covered.

### Available Event Types

| Event | Description |
| --- | --- |
| `workOrder.created` | Dispatched when a new work order is created |
| `workOrder.priorityUpdated` | Dispatched when a work order's priority is updated |
| `workOrder.statusUpdated` | Dispatched when a work order's status is updated |
| `workOrderMessage.created` | Dispatched when a new text message/update is added to a work order |
| `workOrderMessage.updated` | Dispatched when an existing work order message is edited |
| `workOrderMessage.deleted` | Dispatched when a work order message is deleted |

### Event payloads

Visitt `POST`s a JSON body. Every event uses the same envelope. `companyId` is the property id. These payloads are notifications of what changed — load the full work order from the API with the id in `data`.

```json
{
  "_id": "66f1a2b3c4d5e6f708192a01",
  "companyId": "66f1a2b3c4d5e6f708192a00",
  "event": "workOrder.created",
  "data": {}
}
```

| Field | Type | Description |
| --- | --- | --- |
| `_id` | string | Event id. Used in the signature |
| `companyId` | string | Property id the work order belongs to |
| `event` | string | One of the event types above |
| `data` | object | Fields for that event, described below |

Timestamps are ISO 8601 strings.

**Status** (`data.status`): [`WorkOrderStatus`](https://partner-api.visitt.io/#definition-WorkOrderStatus)

**Priority** (`data.priority`): [`WorkOrderInput.priority`](https://partner-api.visitt.io/#definition-WorkOrderInput). `null` clears priority.

**Message visibility** (`data.visibility`): [`WorkOrderMessageVisibility`](https://partner-api.visitt.io/#definition-WorkOrderMessageVisibility)

**Message source** (`data.source`, omitted on older messages): [`WorkOrderSource`](https://partner-api.visitt.io/#definition-WorkOrderSource)

Message events are sent only for text messages. Status notes, images, and other activity do not produce a message event.

#### `workOrder.created`

```json
{
  "_id": "66f1a2b3c4d5e6f708192a01",
  "companyId": "66f1a2b3c4d5e6f708192a00",
  "event": "workOrder.created",
  "data": {
    "_id": "66f1a2b3c4d5e6f708192a10",
    "createdAt": "2026-09-22T08:15:00.000Z"
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `data._id` | string | Work order id |
| `data.createdAt` | string | When the work order was created |

#### `workOrder.priorityUpdated`

```json
{
  "_id": "66f1a2b3c4d5e6f708192a02",
  "companyId": "66f1a2b3c4d5e6f708192a00",
  "event": "workOrder.priorityUpdated",
  "data": {
    "_id": "66f1a2b3c4d5e6f708192a10",
    "priority": 30,
    "createdAt": "2026-09-22T08:15:00.000Z",
    "updatedAt": "2026-09-22T09:02:11.000Z",
    "prevAttributes": {
      "priority": 10
    }
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `data._id` | string | Work order id |
| `data.priority` | number or null | New priority |
| `data.createdAt` | string | When the work order was created |
| `data.updatedAt` | string | When the work order was last updated |
| `data.prevAttributes.priority` | number or null | Priority before this change |

#### `workOrder.statusUpdated`

```json
{
  "_id": "66f1a2b3c4d5e6f708192a03",
  "companyId": "66f1a2b3c4d5e6f708192a00",
  "event": "workOrder.statusUpdated",
  "data": {
    "_id": "66f1a2b3c4d5e6f708192a10",
    "status": "completed",
    "statusText": "The leak was repaired.",
    "createdAt": "2026-09-22T08:15:00.000Z",
    "updatedAt": "2026-09-22T11:40:00.000Z",
    "prevAttributes": {
      "status": "in_progress",
      "statusText": ""
    }
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `data._id` | string | Work order id |
| `data.status` | string | New status |
| `data.statusText` | string | Note attached to this status change. Empty or omitted when there is none |
| `data.createdAt` | string | When the work order was created |
| `data.updatedAt` | string | When the status change was recorded |
| `data.prevAttributes.status` | string | Status before this change |
| `data.prevAttributes.statusText` | string | Previous status note. Empty or omitted when there was none |

#### `workOrderMessage.created`

```json
{
  "_id": "66f1a2b3c4d5e6f708192a04",
  "companyId": "66f1a2b3c4d5e6f708192a00",
  "event": "workOrderMessage.created",
  "data": {
    "workOrderId": "66f1a2b3c4d5e6f708192a10",
    "updateId": "66f1a2b3c4d5e6f708192a20",
    "messageId": "66f1a2b3c4d5e6f708192a20",
    "text": "We will be on site at 2pm.",
    "source": "visitt",
    "visibility": "external_tenant",
    "createdAt": "2026-09-22T10:05:00.000Z",
    "createdBy": "66f1a2b3c4d5e6f708192a30"
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `data.workOrderId` | string | Work order id |
| `data.updateId` | string | Message id |
| `data.messageId` | string | Same value as `updateId` |
| `data.text` | string | Message body |
| `data.source` | string | [`WorkOrderSource`](https://partner-api.visitt.io/#definition-WorkOrderSource). Optional |
| `data.visibility` | string | [`WorkOrderMessageVisibility`](https://partner-api.visitt.io/#definition-WorkOrderMessageVisibility) |
| `data.createdAt` | string | When the message was created |
| `data.createdBy` | string | Id of the user or contact who wrote it |

#### `workOrderMessage.updated`

Same fields as `workOrderMessage.created`, plus `prevAttributes` for the text and visibility before the edit. `createdAt` stays the original creation time.

```json
{
  "_id": "66f1a2b3c4d5e6f708192a05",
  "companyId": "66f1a2b3c4d5e6f708192a00",
  "event": "workOrderMessage.updated",
  "data": {
    "workOrderId": "66f1a2b3c4d5e6f708192a10",
    "updateId": "66f1a2b3c4d5e6f708192a20",
    "messageId": "66f1a2b3c4d5e6f708192a20",
    "text": "We will be on site at 3pm.",
    "source": "visitt",
    "visibility": "internal",
    "createdAt": "2026-09-22T10:05:00.000Z",
    "createdBy": "66f1a2b3c4d5e6f708192a30",
    "prevAttributes": {
      "text": "We will be on site at 2pm."
    }
  }
}
```

#### `workOrderMessage.deleted`

The message as it was just before deletion. Same fields as `workOrderMessage.created`.

```json
{
  "_id": "66f1a2b3c4d5e6f708192a06",
  "companyId": "66f1a2b3c4d5e6f708192a00",
  "event": "workOrderMessage.deleted",
  "data": {
    "workOrderId": "66f1a2b3c4d5e6f708192a10",
    "updateId": "66f1a2b3c4d5e6f708192a20",
    "messageId": "66f1a2b3c4d5e6f708192a20",
    "text": "We will be on site at 3pm.",
    "source": "visitt",
    "visibility": "internal",
    "createdAt": "2026-09-22T10:05:00.000Z",
    "createdBy": "66f1a2b3c4d5e6f708192a30"
  }
}
```

### 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 a **2XX** status, 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 12 retry attempts with exponential 1 minute delay backoff (1m, 2m, 4m, 8m, 16m, 32m, 64m, 128m, 256m, 512m, 1024m, 2048m).
- Webhooks urls are unique within the account.
- Up to 20 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](https://partner-api.visitt.io/#mutation-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](https://partner-api.visitt.io/#query-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](https://partner-api.visitt.io/#mutation-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](https://partner-api.visitt.io/#query-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](https://partner-api.visitt.io/#query-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

```javascript
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. |
| propertyId **required for account-level tokens** | The `_id` of the property the files belong to. See below. |

### `propertyId` (account-level tokens)

Uploading is a write, so it follows the same rule as GraphQL mutations: an **account-level (multi-property) token must send `propertyId`**, identifying which property the files belong to. It must be one of the properties the token has access to — get the list from the [properties](https://partner-api.visitt.io/#query-properties) query.

Send it either way:

| How | Example |
| --- | --- |
| `multipart/form-data` field | `--form 'propertyId=89b966022061b51b9812524e'` |
| query parameter | `POST /files?propertyId=89b966022061b51b9812524e` |

- Omit it on an account-level token and the request fails with `400 propertyId is required`, before any file is uploaded.
- Send a property the token cannot access and the request fails with `403 Access denied`.
- **Legacy single-property tokens** may omit it — the property is resolved automatically. If you do send it, it must match the token's property.

### Rate Limit

The allowed rate limit is 20 requests per 60 seconds.

### Example

```bash
curl
  --request POST \
  --url https://partner-api.visitt.io/files \
  --header 'Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  --header 'content-type: multipart/form-data' \
  --form 'propertyId=89b966022061b51b9812524e' \
  --form 'files=@/Users/username/Desktop/file-1.png' \
  --form 'files=@/Users/username/Desktop/file-2.png'
```

The `fileId` values in the response are what you attach to a mutation — see [Upload a file and attach it to a work order](https://partner-api.visitt.io/#upload-a-file-and-attach-it-to-a-work-order) for the end-to-end flow.

### 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.

```json
{
  "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 / `propertyId is required` for an account-level token |
| 401 | Unauthorized. Partner Token is missing or invalid |
| 403 | Access denied. The provided `propertyId` is not one of the properties the token can access |
| 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:

```json
  curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: <JWT_TOKEN>" \
  "https://partner-api.visitt.io/app-link/jwt/verify"
```

### Response:

```json
  {
    "_id": "token genreated id", // unique token id
    "uid": "MgkxsnBYsYgvmYtnr",  // id of the user or contact
    "utype": "user" // the type of user in Visitt
    "email": "user@email.com", // 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 |

## Managing Categories

Categories classify work orders and inspections (e.g. "Plumbing", "Electrical", "HVAC"). Each category can optionally have **subcategories** (e.g. "Plumbing > Leak", "Plumbing > Clogged Drain").

### How categories are organized

Properties are grouped under an **account** (portfolio). Categories live at the **account level** and are then **assigned** to one or more properties within that account.

This means:

- Multiple properties under the same account can share the same set of categories
- Each property can choose which categories are relevant to it
- Creating a category makes it available account-wide, but only assigns it to the target property initially

Which properties are in play depends on your token. A legacy token targets its single property. An [account-level token](https://partner-api.visitt.io/#account-level-account-scoped-tokens) spans every property in the account, so every category mutation takes a `propertyId` saying which property to act on, and `Category.assignedProperties` tells you where a category is already assigned.

### Available mutations

All five take a `propertyId` identifying the target property — required for account-level tokens, auto-resolved for legacy single-property tokens. `createCategory` and `updateCategory` take it inside `input`; the other three take it as a top-level argument.

| Mutation | What it does |
| --- | --- |
| [createCategory](https://partner-api.visitt.io/#mutation-createCategory) | Create a brand-new category (or subcategory) and assign it to the target property |
| [updateCategory](https://partner-api.visitt.io/#mutation-updateCategory) | Change a category's name and/or color |
| [deleteCategory](https://partner-api.visitt.io/#mutation-deleteCategory) | Permanently delete a category from the account (only if globally unused) |
| [assignCategory](https://partner-api.visitt.io/#mutation-assignCategory) | Add an existing account category to the target property |
| [unassignCategory](https://partner-api.visitt.io/#mutation-unassignCategory) | Remove a category from the target property (keeps it in the account) |

### Finding a category by name

You do **not** need to page through every category and match names client-side. The [categories](https://partner-api.visitt.io/#query-categories) query accepts a [CategoryFilter](https://partner-api.visitt.io/#definition-CategoryFilter) whose `name` field supports the full set of string operators:

| Operator | Matches |
| --- | --- |
| `eq` | exactly this name (case-sensitive) |
| `neq` | every name except this one |
| `contains` | names containing this substring (case-insensitive) |
| `in` | names in the given list |
| `nin` | names not in the given list |

```
# Exact match — the usual way to resolve a category name coming from your own system
            query {
              categories(filters: [{ name: { eq: "Plumbing" } }]) {
                items { _id name }
              }
            }

            # Substring search, e.g. for a type-ahead
            query {
              categories(filters: [{ name: { contains: "plumb" } }]) {
                items { _id name }
              }
            }

            # Resolve several names in one round trip
            query {
              categories(filters: [{ name: { in: ["Plumbing", "Electrical", "HVAC"] } }]) {
                items { _id name }
              }
            }

```

> The `categories` query returns **top-level categories only**, so a `name` filter never matches a subcategory. To find a subcategory by name, read `subCategories` on its parent (see [Subcategories](https://partner-api.visitt.io/#subcategories) below).

The same `name` filter exists on [BuildingFilter](https://partner-api.visitt.io/#definition-BuildingFilter), [SiteFilter](https://partner-api.visitt.io/#definition-SiteFilter), [ContactFilter](https://partner-api.visitt.io/#definition-ContactFilter) and [VendorFilter](https://partner-api.visitt.io/#definition-VendorFilter).

### When to create vs assign

**createCategory** — use when the category doesn't exist yet. It creates a new category in the account and automatically assigns it to the target property:

```
mutation {
  createCategory(input: {
    propertyId: "89b966022061b51b9812524e",
    name: "Plumbing"
  }) {
    category { _id name color }
  }
}
```

**assignCategory** — use when the category already exists in the account (e.g. created by another property or previously removed from one). You can discover existing categories using the [categories](https://partner-api.visitt.io/#query-categories) query with `includeUnassigned: true`, narrowing by name as described in [Finding a category by name](https://partner-api.visitt.io/#finding-a-category-by-name):

```
# Step 1: Find categories in your account, including ones not assigned to the target property
            query {
              categories(includeUnassigned: true, filters: [{ name: { contains: "Plumbing" } }]) {
                items {
                  _id
                  name
                  assignedProperties { _id name }
                }
              }
            }

            # Step 2: Assign one that isn't assigned yet
            mutation {
              assignCategory(
                categoryId: "<category-id>"
                propertyId: "89b966022061b51b9812524e"
              ) {
                category { _id name }
              }
            }

```

`assignedProperties` in the response tells you which properties each category is already assigned to, intersected with your token's scope. An empty list means the category exists at the account level but is not assigned to any property you can access.

> `Category.isAssigned` is **deprecated** and only works for legacy single-property tokens. On an account-level token it returns an error pointing you to `assignedProperties`.

### Removing vs deleting

**unassignCategory** removes a category from the target property but keeps it in the account. Other properties that use it are not affected. Use this when a property no longer needs a category but other properties might still use it.

`unassignCategory` can fail when the category is still required by that property's configuration. In practice, this includes company-scoped dependencies such as:

- Active inspection schedules that use the category
- Tenant portal / company portal category settings
- Company-scoped automations that reference the category
- Category integrations that are still connected to your property's integration apps

**deleteCategory** permanently removes the category from the entire account. This only works if the category is **not in use** globally (across all properties and records). If the category is in use, you'll get an error.

### Subcategories

Categories support a two-level hierarchy. To create a subcategory, pass the `parentCategoryId` field in your input:

```
# First, create a top-level category
            mutation {
              createCategory(input: {
                propertyId: "89b966022061b51b9812524e",
                name: "Plumbing"
              }) {
                category { _id name }
              }
            }

            # Then, create subcategories under it
            mutation {
              createCategory(input: {
                propertyId: "89b966022061b51b9812524e",
                name: "Leak",
                parentCategoryId: "<plumbing-category-id>"
              }) {
                category { _id name }
              }
            }

```

You can query a category's subcategories using the `subCategories` field:

```
query {
  categories {
    items {
      _id
      name
      subCategories { _id name }
    }
  }
}
```

**Subcategory rules:**

- Only two levels are supported — a subcategory cannot have its own subcategories
- Names must be unique within the same parent (two different parents can each have a subcategory named "Other")
- Subcategories are assigned to properties independently from their parent — assigning a parent does not automatically assign its subcategories

### Validation

- **name** is required, must be between 2 and 100 characters
- **name** must be unique within the same level (top-level names are unique across the account; subcategory names are unique within their parent)
- **color** is optional, expects a HEX string (e.g. `"#FF5733"`)

## Changelog

Stay up to date with the latest Partner API schema! We recommend tracking deprecated elements and schema additions using the changelog:

[View All Schema Changes](https://studio.apollographql.com/public/partner-api-b5yb9i/variant/current/changelog)

# Queries

## `billableItem`

##### Description

Get a billable item by id

##### Response

Returns a [`BillableItem`](https://partner-api.visitt.io/#definition-BillableItem)

##### Arguments

| Name | Description |
| --- | --- |
| `billableItemId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the billable item. |

#### Example

##### Query

```gql
query billableItem($billableItemId: String!) {
  billableItem(billableItemId: $billableItemId) {
    _id
    name
    chargeCode
    price
    taxable
    type
    markup
    markupUnit
    active
    archived
    createdAt
    updatedAt
  }
}
```

##### Variables

```json
{"billableItemId": "abc123"}
```

##### Response

```json
{
  "data": {
    "billableItem": {
      "_id": "4",
      "name": "abc123",
      "chargeCode": "xyz789",
      "price": 123.45,
      "taxable": true,
      "type": "labor",
      "markup": 123.45,
      "markupUnit": "fix_price",
      "active": false,
      "archived": false,
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `billableItems`

##### Description

Get billable items. Sorted descending by created date

##### Response

Returns a [`BillableItemsPaginated`](https://partner-api.visitt.io/#definition-BillableItemsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[BillableItemFilter]`](https://partner-api.visitt.io/#definition-BillableItemFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query billableItems(
  $filters: [BillableItemFilter],
  $skip: Int,
  $limit: Int
) {
  billableItems(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...BillableItemFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{
  "filters": [BillableItemFilter],
  "skip": 123,
  "limit": 987
}
```

##### Response

```json
{
  "data": {
    "billableItems": {
      "items": [BillableItem],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `building`

##### Description

Get building.

##### Response

Returns a [`Building`](https://partner-api.visitt.io/#definition-Building)

##### Arguments

| Name | Description |
| --- | --- |
| `buildingId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the building. |

#### Example

##### Query

```gql
query building($buildingId: String!) {
  building(buildingId: $buildingId) {
    _id
    name
    externalId
    sites {
      ...SitesPaginatedFragment
    }
    integrations {
      ...EntityIntegrationFragment
    }
  }
}
```

##### Variables

```json
{"buildingId": "xyz789"}
```

##### Response

```json
{
  "data": {
    "building": {
      "_id": "4",
      "name": "xyz789",
      "externalId": "abc123",
      "sites": SitesPaginated,
      "integrations": [EntityIntegration]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `buildings`

##### Description

Get buildings. Sorted ascending by name.

##### Response

Returns a [`BuildingsPaginated`](https://partner-api.visitt.io/#definition-BuildingsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[BuildingFilter]`](https://partner-api.visitt.io/#definition-BuildingFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query buildings(
  $filters: [BuildingFilter],
  $skip: Int,
  $limit: Int
) {
  buildings(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...BuildingFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [BuildingFilter], "skip": 987, "limit": 123}
```

##### Response

```json
{
  "data": {
    "buildings": {
      "items": [Building],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `categories`

##### Description

Get categories (without sub categories). Sorted ascending by name.

##### Response

Returns a [`CategoriesPaginated`](https://partner-api.visitt.io/#definition-CategoriesPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[CategoryFilter]`](https://partner-api.visitt.io/#definition-CategoryFilter) |  |
| `includeUnassigned` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Include categories from the same account/customer that are not currently assigned to the authenticated property.<br>- false (default): returns only categories assigned to the authenticated property<br>- true: returns all account categories (assigned + unassigned) |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query categories(
  $filters: [CategoryFilter],
  $includeUnassigned: Boolean,
  $skip: Int,
  $limit: Int
) {
  categories(
    filters: $filters,
    includeUnassigned: $includeUnassigned,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...CategoryFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{
  "filters": [CategoryFilter],
  "includeUnassigned": true,
  "skip": 123,
  "limit": 123
}
```

##### Response

```json
{
  "data": {
    "categories": {
      "items": [Category],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `category`

##### Description

Get category.

##### Response

Returns a [`Category`](https://partner-api.visitt.io/#definition-Category)

##### Arguments

| Name | Description |
| --- | --- |
| `categoryId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the category. |

#### Example

##### Query

```gql
query category($categoryId: String!) {
  category(categoryId: $categoryId) {
    _id
    name
    color
    subCategories {
      ...CategoryFragment
    }
    isAssigned
    assignedProperties {
      ...PropertyFragment
    }
  }
}
```

##### Variables

```json
{"categoryId": "abc123"}
```

##### Response

```json
{
  "data": {
    "category": {
      "_id": "4",
      "name": "abc123",
      "color": "xyz789",
      "subCategories": [Category],
      "isAssigned": true,
      "assignedProperties": [Property]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `charge`

##### Description

Get charge by id

##### Response

Returns a [`Charge`](https://partner-api.visitt.io/#definition-Charge)

##### Arguments

| Name | Description |
| --- | --- |
| `chargeId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the charge. |

#### Example

##### Query

```gql
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

```json
{"chargeId": "abc123"}
```

##### Response

```json
{
  "data": {
    "charge": {
      "_id": "4",
      "billableItemId": 4,
      "type": "labor",
      "name": "abc123",
      "chargeCode": "abc123",
      "status": "open",
      "price": 987.65,
      "markup": 987.65,
      "markupUnit": "fix_price",
      "taxable": true,
      "tax": 987.65,
      "quantity": 987,
      "total": 123.45,
      "tenant": Tenant,
      "workOrder": WorkOrder,
      "verifiedAt": "2007-12-03T10:15:30Z",
      "verifiedBy": "4"
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `charges`

##### Description

Get charges. Sorted descending by created date.

##### Response

Returns a [`ChargesPaginated`](https://partner-api.visitt.io/#definition-ChargesPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[ChargeFilter]`](https://partner-api.visitt.io/#definition-ChargeFilter) | Charge filters |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query charges(
  $filters: [ChargeFilter],
  $skip: Int,
  $limit: Int
) {
  charges(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...ChargeFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [ChargeFilter], "skip": 987, "limit": 987}
```

##### Response

```json
{
  "data": {
    "charges": {
      "items": [Charge],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `contact`

##### Description

Get a contact by id.

##### Response

Returns a [`Contact`](https://partner-api.visitt.io/#definition-Contact)

##### Arguments

| Name | Description |
| --- | --- |
| `contactId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the contact. |

#### Example

##### Query

```gql
query contact($contactId: String!) {
  contact(contactId: $contactId) {
    _id
    name
    phone
    email
    externalId
    extraInfo
    roles
    isEmergency
    isArchived
    tenant {
      ...TenantFragment
    }
    tenants {
      ...TenantFragment
    }
    integrations {
      ...EntityIntegrationFragment
    }
  }
}
```

##### Variables

```json
{"contactId": "abc123"}
```

##### Response

```json
{
  "data": {
    "contact": {
      "_id": 4,
      "name": "abc123",
      "phone": "abc123",
      "email": "xyz789",
      "externalId": "xyz789",
      "extraInfo": "abc123",
      "roles": ["admin"],
      "isEmergency": true,
      "isArchived": true,
      "tenant": Tenant,
      "tenants": [Tenant],
      "integrations": [EntityIntegration]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `contacts`

##### Description

Get contacts. Sorted ascending by name.

##### Response

Returns a [`ContactsPaginated`](https://partner-api.visitt.io/#definition-ContactsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[ContactFilter]`](https://partner-api.visitt.io/#definition-ContactFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query contacts(
  $filters: [ContactFilter],
  $skip: Int,
  $limit: Int
) {
  contacts(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...ContactFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [ContactFilter], "skip": 123, "limit": 123}
```

##### Response

```json
{
  "data": {
    "contacts": {
      "items": [Contact],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `document`

##### Description

Get a document by id (regular document, tenant COI, or vendor COI).

##### Response

Returns a [`Document`](https://partner-api.visitt.io/#definition-Document)

##### Arguments

| Name | Description |
| --- | --- |
| `documentId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the document. |

#### Example

##### Query

```gql
query document($documentId: String!) {
  document(documentId: $documentId) {
    _id
    name
    modelType
    isArchived
    status
    tags {
      ...DocumentTagFragment
    }
    linkedEntities {
      ...DocumentLinkedEntityFragment
    }
    property {
      ...PropertyFragment
    }
    createdAt
    createdByActor {
      ...ActorFragment
    }
    updatedAt
    updatedByActor {
      ...ActorFragment
    }
    currentRecord {
      ...DocumentRecordFragment
    }
    previousRecords {
      ...DocumentRecordFragment
    }
  }
}
```

##### Variables

```json
{"documentId": "abc123"}
```

##### Response

```json
{
  "data": {
    "document": {
      "_id": "4",
      "name": "abc123",
      "modelType": "document",
      "isArchived": false,
      "status": "missing",
      "tags": [DocumentTag],
      "linkedEntities": [DocumentLinkedEntity],
      "property": Property,
      "createdAt": "2007-12-03T10:15:30Z",
      "createdByActor": Actor,
      "updatedAt": "2007-12-03T10:15:30Z",
      "updatedByActor": Actor,
      "currentRecord": DocumentRecord,
      "previousRecords": [DocumentRecord]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `documents`

##### Description

Get documents for the authenticated property. Sorted descending by created date.

##### Response

Returns a [`DocumentsPaginated`](https://partner-api.visitt.io/#definition-DocumentsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[DocumentFilter]`](https://partner-api.visitt.io/#definition-DocumentFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query documents(
  $filters: [DocumentFilter],
  $skip: Int,
  $limit: Int
) {
  documents(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...DocumentFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [DocumentFilter], "skip": 123, "limit": 987}
```

##### Response

```json
{
  "data": {
    "documents": {
      "items": [Document],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `inspection`

##### Description

Get an inspection by id.

##### Response

Returns an [`Inspection`](https://partner-api.visitt.io/#definition-Inspection)

##### Arguments

| Name | Description |
| --- | --- |
| `inspectionId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the inspection. |

#### Example

##### Query

```gql
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

```json
{"inspectionId": "xyz789"}
```

##### Response

```json
{
  "data": {
    "inspection": {
      "_id": 4,
      "description": "abc123",
      "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]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `inspectionTrigger`

##### Description

Get an inspection trigger by id.

##### Response

Returns an [`InspectionTrigger`](https://partner-api.visitt.io/#definition-InspectionTrigger)

##### Arguments

| Name | Description |
| --- | --- |
| `inspectionTriggerId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the inspection trigger. |

#### Example

##### Query

```gql
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

```json
{"inspectionTriggerId": "abc123"}
```

##### Response

```json
{
  "data": {
    "inspectionTrigger": {
      "_id": "4",
      "name": "abc123",
      "description": "abc123",
      "frequencyType": "one_time",
      "completionPolicySettings": CompletionPolicySettings,
      "rrule": RRule,
      "category": Category,
      "assignedUsers": [User],
      "property": Property,
      "buildings": [Building],
      "locations": [Location],
      "sites": [Site],
      "isPaused": true,
      "pauseHistory": [PauseHistoryRecord]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `inspectionTriggers`

##### Description

Get work inspection triggers. Sorted descending by the due date of the current instance.

##### Response

Returns an [`InspectionTriggersPaginated`](https://partner-api.visitt.io/#definition-InspectionTriggersPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[InspectionTriggerFilter]`](https://partner-api.visitt.io/#definition-InspectionTriggerFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query inspectionTriggers(
  $filters: [InspectionTriggerFilter],
  $skip: Int,
  $limit: Int
) {
  inspectionTriggers(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...InspectionTriggerFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{
  "filters": [InspectionTriggerFilter],
  "skip": 987,
  "limit": 123
}
```

##### Response

```json
{
  "data": {
    "inspectionTriggers": {
      "items": [InspectionTrigger],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `inspections`

##### Description

Get inspections. Sorted descending by due date.

##### Response

Returns an [`InspectionsPaginated`](https://partner-api.visitt.io/#definition-InspectionsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[InspectionFilter]`](https://partner-api.visitt.io/#definition-InspectionFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query inspections(
  $filters: [InspectionFilter],
  $skip: Int,
  $limit: Int
) {
  inspections(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...InspectionFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [InspectionFilter], "skip": 987, "limit": 987}
```

##### Response

```json
{
  "data": {
    "inspections": {
      "items": [Inspection],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `location`

Use building instead. Same records and same ids, so locationId can be passed straight to building as buildingId.

##### Description

Get location. Deprecated, use `building` instead.

Location and Building are the same record under two names, so the id you already have works unchanged: pass it to `building` as `buildingId`.

##### Response

Returns a [`Location`](https://partner-api.visitt.io/#definition-Location)

##### Arguments

| Name | Description |
| --- | --- |
| `locationId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the location. |

#### Example

##### Query

```gql
query location($locationId: String!) {
  location(locationId: $locationId) {
    _id
    name
    sites {
      ...SitesPaginatedFragment
    }
  }
}
```

##### Variables

```json
{"locationId": "xyz789"}
```

##### Response

```json
{
  "data": {
    "location": {
      "_id": 4,
      "name": "xyz789",
      "sites": SitesPaginated
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `locations`

Use buildings instead

##### Description

Get locations. Sorted ascending by name. Deprecated, use `buildings` instead.

##### Response

Returns a [`LocationsPaginated`](https://partner-api.visitt.io/#definition-LocationsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[LocationFilter]`](https://partner-api.visitt.io/#definition-LocationFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query locations(
  $filters: [LocationFilter],
  $skip: Int,
  $limit: Int
) {
  locations(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...LocationFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [LocationFilter], "skip": 123, "limit": 123}
```

##### Response

```json
{
  "data": {
    "locations": {
      "items": [Location],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `partner`

##### Description

Get the authorized partner information.

##### Response

Returns a [`Partner`](https://partner-api.visitt.io/#definition-Partner)

#### Example

##### Query

```gql
query partner {
  partner {
    name
    webhooks {
      ...WebhookFragment
    }
  }
}
```

##### Response

```json
{
  "data": {
    "partner": {
      "name": "abc123",
      "webhooks": [Webhook]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `properties`

##### Description

Get the properties (companies) the authenticated partner has access to.

Returns the single token-scoped property for company-scoped partners and every property under the customer for customer-scoped partners.

##### Response

Returns a [`PropertiesPaginated`](https://partner-api.visitt.io/#definition-PropertiesPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[PropertyFilter]`](https://partner-api.visitt.io/#definition-PropertyFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query properties(
  $filters: [PropertyFilter],
  $skip: Int,
  $limit: Int
) {
  properties(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...PropertyFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [PropertyFilter], "skip": 987, "limit": 123}
```

##### Response

```json
{
  "data": {
    "properties": {
      "items": [Property],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `review`

##### Description

Get a work order's review by id.

##### Response

Returns a [`Review`](https://partner-api.visitt.io/#definition-Review)

##### Arguments

| Name | Description |
| --- | --- |
| `reviewId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the review. |

#### Example

##### Query

```gql
query review($reviewId: String!) {
  review(reviewId: $reviewId) {
    _id
    workOrder {
      ...WorkOrderFragment
    }
    createdByActor {
      ...ActorFragment
    }
    createdAt
    score
    answers {
      ...ReviewAnswerFragment
    }
  }
}
```

##### Variables

```json
{"reviewId": "xyz789"}
```

##### Response

```json
{
  "data": {
    "review": {
      "_id": "4",
      "workOrder": WorkOrder,
      "createdByActor": Actor,
      "createdAt": "2007-12-03T10:15:30Z",
      "score": 123,
      "answers": [ReviewAnswer]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `reviews`

##### Description

Get work order's reviews. Sorted descending by created date.

##### Response

Returns a [`ReviewsPaginated`](https://partner-api.visitt.io/#definition-ReviewsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[ReviewFilter]`](https://partner-api.visitt.io/#definition-ReviewFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) |  |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) |  |

#### Example

##### Query

```gql
query reviews(
  $filters: [ReviewFilter],
  $skip: Int,
  $limit: Int
) {
  reviews(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...ReviewFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [ReviewFilter], "skip": 987, "limit": 123}
```

##### Response

```json
{
  "data": {
    "reviews": {
      "items": [Review],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `site`

##### Description

Get site.

##### Response

Returns a [`Site`](https://partner-api.visitt.io/#definition-Site)

##### Arguments

| Name | Description |
| --- | --- |
| `siteId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the site. |

#### Example

##### Query

```gql
query site($siteId: String!) {
  site(siteId: $siteId) {
    _id
    name
    externalId
    modelType
    parentSites {
      ...SiteFragment
    }
    floor {
      ...SiteFragment
    }
    type
    qrCode
    notes
    unitCode
    size
    level
    integrations {
      ...EntityIntegrationFragment
    }
  }
}
```

##### Variables

```json
{"siteId": "abc123"}
```

##### Response

```json
{
  "data": {
    "site": {
      "_id": 4,
      "name": "xyz789",
      "externalId": "xyz789",
      "modelType": "site",
      "parentSites": [Site],
      "floor": Site,
      "type": "abc123",
      "qrCode": "xyz789",
      "notes": "xyz789",
      "unitCode": "abc123",
      "size": 123.45,
      "level": 987,
      "integrations": [EntityIntegration]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `sites`

##### Description

Get sites. Sorted ascending by name.

##### Response

Returns a [`SitesPaginated`](https://partner-api.visitt.io/#definition-SitesPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[SiteFilter]`](https://partner-api.visitt.io/#definition-SiteFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
| `includeArchived` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | When true, includes archived sites in the results. Defaults to false. |

#### Example

##### Query

```gql
query sites(
  $filters: [SiteFilter],
  $skip: Int,
  $limit: Int,
  $includeArchived: Boolean
) {
  sites(
    filters: $filters,
    skip: $skip,
    limit: $limit,
    includeArchived: $includeArchived
  ) {
    items {
      ...SiteFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{
  "filters": [SiteFilter],
  "skip": 123,
  "limit": 987,
  "includeArchived": true
}
```

##### Response

```json
{
  "data": {
    "sites": {
      "items": [Site],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `tenant`

##### Description

Get a tenant by id.

##### Response

Returns a [`Tenant`](https://partner-api.visitt.io/#definition-Tenant)

##### Arguments

| Name | Description |
| --- | --- |
| `tenantId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the tenant. |

#### Example

##### Query

```gql
query tenant($tenantId: String!) {
  tenant(tenantId: $tenantId) {
    _id
    name
    tenantCode
    externalId
    contacts {
      ...ContactFragment
    }
    admins {
      ...ContactFragment
    }
    locations {
      ...TenantLocationFragment
    }
    isArchived
    integrations {
      ...EntityIntegrationFragment
    }
  }
}
```

##### Variables

```json
{"tenantId": "abc123"}
```

##### Response

```json
{
  "data": {
    "tenant": {
      "_id": "4",
      "name": "abc123",
      "tenantCode": "abc123",
      "externalId": "xyz789",
      "contacts": [Contact],
      "admins": [Contact],
      "locations": [TenantLocation],
      "isArchived": true,
      "integrations": [EntityIntegration]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `tenants`

##### Description

Get tenants. Sorted ascending by name.

##### Response

Returns a [`TenantsPaginated`](https://partner-api.visitt.io/#definition-TenantsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[TenantFilter]`](https://partner-api.visitt.io/#definition-TenantFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query tenants(
  $filters: [TenantFilter],
  $skip: Int,
  $limit: Int
) {
  tenants(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...TenantFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [TenantFilter], "skip": 123, "limit": 123}
```

##### Response

```json
{
  "data": {
    "tenants": {
      "items": [Tenant],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `user`

##### Description

Get user.

##### Response

Returns a [`User`](https://partner-api.visitt.io/#definition-User)

##### Arguments

| Name | Description |
| --- | --- |
| `userId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the user. |

#### Example

##### Query

```gql
query user($userId: String!) {
  user(userId: $userId) {
    _id
    firstName
    lastName
    internationalPhone
    phone
    email
    role
    position
    image {
      ...MediaFragment
    }
    integrations {
      ...EntityIntegrationFragment
    }
  }
}
```

##### Variables

```json
{"userId": "abc123"}
```

##### Response

```json
{
  "data": {
    "user": {
      "_id": "4",
      "firstName": "xyz789",
      "lastName": "abc123",
      "internationalPhone": "xyz789",
      "phone": "xyz789",
      "email": "xyz789",
      "role": "customer_admin",
      "position": "xyz789",
      "image": Media,
      "integrations": [EntityIntegration]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `users`

##### Description

Get users.

##### Response

Returns a [`UsersPaginated`](https://partner-api.visitt.io/#definition-UsersPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[UserFilter]`](https://partner-api.visitt.io/#definition-UserFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query users(
  $filters: [UserFilter],
  $skip: Int,
  $limit: Int
) {
  users(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...UserFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [UserFilter], "skip": 987, "limit": 987}
```

##### Response

```json
{
  "data": {
    "users": {
      "items": [User],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `vendor`

##### Description

Get a vendor by id.

##### Response

Returns a [`Vendor`](https://partner-api.visitt.io/#definition-Vendor)

##### Arguments

| Name | Description |
| --- | --- |
| `vendorId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the vendor. |

#### Example

##### Query

```gql
query vendor($vendorId: String!) {
  vendor(vendorId: $vendorId) {
    _id
    name
    contactName
    phone
    email
    profession
    notes
    isArchived
    createdAt
    updatedAt
    createdByActor {
      ...ActorFragment
    }
  }
}
```

##### Variables

```json
{"vendorId": "abc123"}
```

##### Response

```json
{
  "data": {
    "vendor": {
      "_id": 4,
      "name": "abc123",
      "contactName": "xyz789",
      "phone": "xyz789",
      "email": "xyz789",
      "profession": "abc123",
      "notes": "xyz789",
      "isArchived": true,
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z",
      "createdByActor": Actor
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `vendors`

##### Description

Get vendors for the authenticated property. Sorted ascending by name.

##### Response

Returns a [`VendorsPaginated`](https://partner-api.visitt.io/#definition-VendorsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[VendorFilter]`](https://partner-api.visitt.io/#definition-VendorFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query vendors(
  $filters: [VendorFilter],
  $skip: Int,
  $limit: Int
) {
  vendors(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...VendorFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [VendorFilter], "skip": 987, "limit": 987}
```

##### Response

```json
{
  "data": {
    "vendors": {
      "items": [Vendor],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `webhookEventTypes`

##### Description

Get a list of available webhook event types, sorted alpha-numerically by ascending key.

##### Response

Returns [`[WebhookEventType!]!`](https://partner-api.visitt.io/#definition-WebhookEventType)

#### Example

##### Query

```gql
query webhookEventTypes {
  webhookEventTypes {
    key
  }
}
```

##### Response

```json
{
  "data": {
    "webhookEventTypes": [{"key": "abc123"}]
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `webhookLogs`

##### Description

Get a list of webhook logs, sorted by descending creation date.

##### Response

Returns a [`WebhookLogsPaginated!`](https://partner-api.visitt.io/#definition-WebhookLogsPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[WebhookLogFilter]`](https://partner-api.visitt.io/#definition-WebhookLogFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query webhookLogs(
  $filters: [WebhookLogFilter],
  $skip: Int,
  $limit: Int
) {
  webhookLogs(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...WebhookLogFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [WebhookLogFilter], "skip": 123, "limit": 987}
```

##### Response

```json
{
  "data": {
    "webhookLogs": {
      "items": [WebhookLog],
      "pageInfo": PageInfo
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `workOrder`

##### Description

Get a work order by id.

##### Response

Returns a [`WorkOrder`](https://partner-api.visitt.io/#definition-WorkOrder)

##### Arguments

| Name | Description |
| --- | --- |
| `workOrderId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the work order. |

#### Example

##### Query

```gql
query workOrder($workOrderId: String!) {
  workOrder(workOrderId: $workOrderId) {
    _id
    sequence
    priority
    isPermittedToEnter
    permissionToEnterComment
    source
    status
    statusText
    description
    title
    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
    }
    sla {
      ...WorkOrderSlaFragment
    }
    messages {
      ...WorkOrderMessageFragment
    }
  }
}
```

##### Variables

```json
{"workOrderId": "xyz789"}
```

##### Response

```json
{
  "data": {
    "workOrder": {
      "_id": "4",
      "sequence": 987,
      "priority": 123,
      "isPermittedToEnter": false,
      "permissionToEnterComment": "xyz789",
      "source": "visitt",
      "status": "awaiting_acceptance",
      "statusText": "abc123",
      "description": "xyz789",
      "title": "abc123",
      "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": "xyz789",
      "integrations": [EntityIntegration],
      "sla": WorkOrderSla,
      "messages": [WorkOrderMessage]
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `workOrderMessage`

##### Description

Get a single work order message by id. The message must belong to a work order in the authenticated property.

##### Response

Returns a [`WorkOrderMessage`](https://partner-api.visitt.io/#definition-WorkOrderMessage)

##### Arguments

| Name | Description |
| --- | --- |
| `messageId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the message. |

#### Example

##### Query

```gql
query workOrderMessage($messageId: String!) {
  workOrderMessage(messageId: $messageId) {
    _id
    text
    source
    visibility
    createdByActor {
      ...ActorFragment
    }
    createdAt
  }
}
```

##### Variables

```json
{"messageId": "abc123"}
```

##### Response

```json
{
  "data": {
    "workOrderMessage": {
      "_id": 4,
      "text": "abc123",
      "source": "visitt",
      "visibility": "external_tenant",
      "createdByActor": Actor,
      "createdAt": "2007-12-03T10:15:30Z"
    }
  }
}
```

[Queries](https://partner-api.visitt.io/#group-Operations-Queries)

## `workOrders`

##### Description

Get work orders. Sorted descending by created date.

##### Response

Returns a [`WorkOrdersPaginated`](https://partner-api.visitt.io/#definition-WorkOrdersPaginated)

##### Arguments

| Name | Description |
| --- | --- |
| `filters` \- [`[WorkOrderFilter]`](https://partner-api.visitt.io/#definition-WorkOrderFilter) |  |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. Must be a positive integer. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

#### Example

##### Query

```gql
query workOrders(
  $filters: [WorkOrderFilter],
  $skip: Int,
  $limit: Int
) {
  workOrders(
    filters: $filters,
    skip: $skip,
    limit: $limit
  ) {
    items {
      ...WorkOrderFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
```

##### Variables

```json
{"filters": [WorkOrderFilter], "skip": 123, "limit": 123}
```

##### Response

```json
{
  "data": {
    "workOrders": {
      "items": [WorkOrder],
      "pageInfo": PageInfo
    }
  }
}
```

# Mutations

## `addWorkOrderMedia`

##### Description

Add media (images, videos, PDFs) to a work order. Media should be uploaded first with the POST /files API.

##### Response

Returns an [`UpdateWorkOrderResult!`](https://partner-api.visitt.io/#definition-UpdateWorkOrderResult)

##### Arguments

| Name | Description |
| --- | --- |
| `workOrderId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the work order. |
| `type` \- [`WorkOrderMediaType!`](https://partner-api.visitt.io/#definition-WorkOrderMediaType) | The type of media to add: defectMedia or repairMedia. |
| `media` \- [`[MediaInput!]!`](https://partner-api.visitt.io/#definition-MediaInput) | The media to add. Each mediaId should be a fileId from the POST /files API. |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |

#### Example

##### Query

```gql
mutation addWorkOrderMedia(
  $workOrderId: String!,
  $type: WorkOrderMediaType!,
  $media: [MediaInput!]!,
  $propertyId: String
) {
  addWorkOrderMedia(
    workOrderId: $workOrderId,
    type: $type,
    media: $media,
    propertyId: $propertyId
  ) {
    workOrder {
      ...WorkOrderFragment
    }
  }
}
```

##### Variables

```json
{
  "workOrderId": "abc123",
  "type": "defectMedia",
  "media": [MediaInput],
  "propertyId": "abc123"
}
```

##### Response

```json
{"data": {"addWorkOrderMedia": {"workOrder": WorkOrder}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `archiveContact`

##### Description

Archive or Unarchive contact.

##### Response

Returns an [`ArchiveContactsResult!`](https://partner-api.visitt.io/#definition-ArchiveContactsResult)

##### Arguments

| Name | Description |
| --- | --- |
| `contactId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the contact. |
| `archive` \- [`Boolean!`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the contact desired archive state. |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |

#### Example

##### Query

```gql
mutation archiveContact(
  $contactId: String!,
  $archive: Boolean!,
  $propertyId: String
) {
  archiveContact(
    contactId: $contactId,
    archive: $archive,
    propertyId: $propertyId
  ) {
    contact {
      ...ContactFragment
    }
  }
}
```

##### Variables

```json
{
  "contactId": "abc123",
  "archive": true,
  "propertyId": "abc123"
}
```

##### Response

```json
{"data": {"archiveContact": {"contact": Contact}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `archiveTenant`

##### Description

Archive or Unarchive tenant.

##### Response

Returns an [`ArchiveTenantsResult!`](https://partner-api.visitt.io/#definition-ArchiveTenantsResult)

##### Arguments

| Name | Description |
| --- | --- |
| `tenantId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the tenant. |
| `archive` \- [`Boolean!`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the tenant desired archive state. |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |

#### Example

##### Query

```gql
mutation archiveTenant(
  $tenantId: String!,
  $archive: Boolean!,
  $propertyId: String
) {
  archiveTenant(
    tenantId: $tenantId,
    archive: $archive,
    propertyId: $propertyId
  ) {
    tenant {
      ...TenantFragment
    }
  }
}
```

##### Variables

```json
{
  "tenantId": "abc123",
  "archive": true,
  "propertyId": "abc123"
}
```

##### Response

```json
{"data": {"archiveTenant": {"tenant": Tenant}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `assignCategory`

##### Description

Assign an existing account category to the authenticated company/property.

The category must belong to the same account/customer as the authenticated company and must not already be assigned to that company. Non-global categories referencing properties outside the partner's scope cannot be assigned.

##### Response

Returns an [`AssignCategoryResult!`](https://partner-api.visitt.io/#definition-AssignCategoryResult)

##### Arguments

| Name | Description |
| --- | --- |
| `categoryId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the category to assign. |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |

#### Example

##### Query

```gql
mutation assignCategory(
  $categoryId: String!,
  $propertyId: String
) {
  assignCategory(
    categoryId: $categoryId,
    propertyId: $propertyId
  ) {
    category {
      ...CategoryFragment
    }
  }
}
```

##### Variables

```json
{
  "categoryId": "abc123",
  "propertyId": "xyz789"
}
```

##### Response

```json
{"data": {"assignCategory": {"category": Category}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `createBillableItem`

##### Description

Create billable item

##### Response

Returns a [`CreateBillableItemResult!`](https://partner-api.visitt.io/#definition-CreateBillableItemResult)

##### Arguments

| Name | Description |
| --- | --- |
| `input` \- [`BillableItemInput!`](https://partner-api.visitt.io/#definition-BillableItemInput) | Input of the new billable item. |

#### Example

##### Query

```gql
mutation createBillableItem($input: BillableItemInput!) {
  createBillableItem(input: $input) {
    billableItem {
      ...BillableItemFragment
    }
  }
}
```

##### Variables

```json
{"input": BillableItemInput}
```

##### Response

```json
{
  "data": {
    "createBillableItem": {"billableItem": BillableItem}
  }
}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `createCategory`

##### Description

Create a new category or subcategory in the authenticated account and assign it to the authenticated company/property.

Rules:

- Name is required (2-100 chars, trimmed)
- Name must be unique in the same level (same parentCategoryId scope)
- parentCategoryId can reference only a top-level category (2 levels max)

##### Response

Returns a [`CreateCategoryResult!`](https://partner-api.visitt.io/#definition-CreateCategoryResult)

##### Arguments

| Name | Description |
| --- | --- |
| `input` \- [`CategoryInput!`](https://partner-api.visitt.io/#definition-CategoryInput) | Input of the category to create. |

#### Example

##### Query

```gql
mutation createCategory($input: CategoryInput!) {
  createCategory(input: $input) {
    category {
      ...CategoryFragment
    }
  }
}
```

##### Variables

```json
{"input": CategoryInput}
```

##### Response

```json
{"data": {"createCategory": {"category": Category}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `createContact`

##### Description

Create new contact.

##### Response

Returns a [`CreateContactResult!`](https://partner-api.visitt.io/#definition-CreateContactResult)

##### Arguments

| Name | Description |
| --- | --- |
| `input` \- [`ContactInput!`](https://partner-api.visitt.io/#definition-ContactInput) | Input of the contact values to create. |

#### Example

##### Query

```gql
mutation createContact($input: ContactInput!) {
  createContact(input: $input) {
    contact {
      ...ContactFragment
    }
  }
}
```

##### Variables

```json
{"input": ContactInput}
```

##### Response

```json
{"data": {"createContact": {"contact": Contact}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `createTenant`

##### Description

Create new tenant.

##### Response

Returns a [`CreateTenantResult!`](https://partner-api.visitt.io/#definition-CreateTenantResult)

##### Arguments

| Name | Description |
| --- | --- |
| `input` \- [`TenantInput!`](https://partner-api.visitt.io/#definition-TenantInput) | Input of the new tenant. |

#### Example

##### Query

```gql
mutation createTenant($input: TenantInput!) {
  createTenant(input: $input) {
    tenant {
      ...TenantFragment
    }
  }
}
```

##### Variables

```json
{"input": TenantInput}
```

##### Response

```json
{"data": {"createTenant": {"tenant": Tenant}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `createWebhook`

##### Description

Create new webhook.

##### Response

Returns a [`CreateWebhookResult!`](https://partner-api.visitt.io/#definition-CreateWebhookResult)

##### Arguments

| Name | Description |
| --- | --- |
| `input` \- [`WebhookInput!`](https://partner-api.visitt.io/#definition-WebhookInput) | Input of the webhook to create. |

#### Example

##### Query

```gql
mutation createWebhook($input: WebhookInput!) {
  createWebhook(input: $input) {
    webhook {
      ...WebhookFragment
    }
  }
}
```

##### Variables

```json
{"input": WebhookInput}
```

##### Response

```json
{"data": {"createWebhook": {"webhook": Webhook}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `createWorkOrder`

##### Description

Create new work order.

##### Response

Returns a [`CreateWorkOrderResult!`](https://partner-api.visitt.io/#definition-CreateWorkOrderResult)

##### Arguments

| Name | Description |
| --- | --- |
| `input` \- [`WorkOrderInput!`](https://partner-api.visitt.io/#definition-WorkOrderInput) | Input of the new work order. |

#### Example

##### Query

```gql
mutation createWorkOrder($input: WorkOrderInput!) {
  createWorkOrder(input: $input) {
    workOrder {
      ...WorkOrderFragment
    }
  }
}
```

##### Variables

```json
{"input": WorkOrderInput}
```

##### Response

```json
{"data": {"createWorkOrder": {"workOrder": WorkOrder}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `createWorkOrderMessage`

##### Description

Create a new message on a work order.

Exactly one of `userId` or `contactId` must be provided to identify the author. If a message is created on behalf of a contact, that contact is also ensured onto the work order's contacts list.

##### Response

Returns a [`CreateWorkOrderMessageResult!`](https://partner-api.visitt.io/#definition-CreateWorkOrderMessageResult)

##### Arguments

| Name | Description |
| --- | --- |
| `workOrderId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the work order. |
| `input` \- [`WorkOrderMessageCreateInput!`](https://partner-api.visitt.io/#definition-WorkOrderMessageCreateInput) | Input of the message to create. |

#### Example

##### Query

```gql
mutation createWorkOrderMessage(
  $workOrderId: String!,
  $input: WorkOrderMessageCreateInput!
) {
  createWorkOrderMessage(
    workOrderId: $workOrderId,
    input: $input
  ) {
    workOrderMessage {
      ...WorkOrderMessageFragment
    }
  }
}
```

##### Variables

```json
{
  "workOrderId": "abc123",
  "input": WorkOrderMessageCreateInput
}
```

##### Response

```json
{
  "data": {
    "createWorkOrderMessage": {
      "workOrderMessage": WorkOrderMessage
    }
  }
}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `deleteCategory`

##### Description

Permanently delete a category from the account (global delete).

This operation succeeds only when the category is fully deletable, meaning it is not referenced by in-use records/configuration (for example, work orders, inspections, schedules, portal settings, automations, integrations).

##### Response

Returns a [`DeleteCategoryResult!`](https://partner-api.visitt.io/#definition-DeleteCategoryResult)

##### Arguments

| Name | Description |
| --- | --- |
| `categoryId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the category. |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |

#### Example

##### Query

```gql
mutation deleteCategory(
  $categoryId: String!,
  $propertyId: String
) {
  deleteCategory(
    categoryId: $categoryId,
    propertyId: $propertyId
  ) {
    category {
      ...CategoryFragment
    }
  }
}
```

##### Variables

```json
{
  "categoryId": "xyz789",
  "propertyId": "abc123"
}
```

##### Response

```json
{"data": {"deleteCategory": {"category": Category}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `removeWorkOrderMedia`

##### Description

Remove a single media item from a work order.

##### Response

Returns an [`UpdateWorkOrderResult!`](https://partner-api.visitt.io/#definition-UpdateWorkOrderResult)

##### Arguments

| Name | Description |
| --- | --- |
| `workOrderId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the work order. |
| `type` \- [`WorkOrderMediaType!`](https://partner-api.visitt.io/#definition-WorkOrderMediaType) | The type of media to remove from: defectMedia or repairMedia. |
| `mediaId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The mediaId of the media item to remove. |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |

#### Example

##### Query

```gql
mutation removeWorkOrderMedia(
  $workOrderId: String!,
  $type: WorkOrderMediaType!,
  $mediaId: String!,
  $propertyId: String
) {
  removeWorkOrderMedia(
    workOrderId: $workOrderId,
    type: $type,
    mediaId: $mediaId,
    propertyId: $propertyId
  ) {
    workOrder {
      ...WorkOrderFragment
    }
  }
}
```

##### Variables

```json
{
  "workOrderId": "abc123",
  "type": "defectMedia",
  "mediaId": "xyz789",
  "propertyId": "abc123"
}
```

##### Response

```json
{
  "data": {
    "removeWorkOrderMedia": {"workOrder": WorkOrder}
  }
}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `unassignCategory`

##### Description

Remove a category from the authenticated company/property without deleting it from the account.

This operation can fail when the category is still required by company-scoped dependencies (for example, active schedules, company/tenant portal settings, company automations, or matching integration bindings).

##### Response

Returns an [`UnassignCategoryResult!`](https://partner-api.visitt.io/#definition-UnassignCategoryResult)

##### Arguments

| Name | Description |
| --- | --- |
| `categoryId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the category to remove. |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |

#### Example

##### Query

```gql
mutation unassignCategory(
  $categoryId: String!,
  $propertyId: String
) {
  unassignCategory(
    categoryId: $categoryId,
    propertyId: $propertyId
  ) {
    category {
      ...CategoryFragment
    }
  }
}
```

##### Variables

```json
{
  "categoryId": "xyz789",
  "propertyId": "abc123"
}
```

##### Response

```json
{"data": {"unassignCategory": {"category": Category}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `updateBillableItem`

##### Description

Update billable item

##### Response

Returns an [`UpdateBillableItemResult`](https://partner-api.visitt.io/#definition-UpdateBillableItemResult)

##### Arguments

| Name | Description |
| --- | --- |
| `billableItemId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the billable item. |
| `input` \- [`BillableItemInput`](https://partner-api.visitt.io/#definition-BillableItemInput) | Input of the billable item to update. |

#### Example

##### Query

```gql
mutation updateBillableItem(
  $billableItemId: String!,
  $input: BillableItemInput
) {
  updateBillableItem(
    billableItemId: $billableItemId,
    input: $input
  ) {
    billableItem {
      ...BillableItemFragment
    }
  }
}
```

##### Variables

```json
{
  "billableItemId": "abc123",
  "input": BillableItemInput
}
```

##### Response

```json
{
  "data": {
    "updateBillableItem": {"billableItem": BillableItem}
  }
}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `updateCategory`

##### Description

Update a category's name and/or color.

Rules:

- At least one of name or color must be provided
- If name is provided, it is trimmed, validated (2-100 chars), and must be unique in the same level (same parentCategoryId scope)

##### Response

Returns an [`UpdateCategoryResult!`](https://partner-api.visitt.io/#definition-UpdateCategoryResult)

##### Arguments

| Name | Description |
| --- | --- |
| `categoryId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the category. |
| `input` \- [`CategoryUpdateInput!`](https://partner-api.visitt.io/#definition-CategoryUpdateInput) | Input of the category values to update. |

#### Example

##### Query

```gql
mutation updateCategory(
  $categoryId: String!,
  $input: CategoryUpdateInput!
) {
  updateCategory(
    categoryId: $categoryId,
    input: $input
  ) {
    category {
      ...CategoryFragment
    }
  }
}
```

##### Variables

```json
{
  "categoryId": "abc123",
  "input": CategoryUpdateInput
}
```

##### Response

```json
{"data": {"updateCategory": {"category": Category}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `updateChargesStatus`

##### Description

Update charge status

##### Response

Returns an [`UpdateChargeStatusResult`](https://partner-api.visitt.io/#definition-UpdateChargeStatusResult)

##### Arguments

| Name | Description |
| --- | --- |
| `chargeIds` \- [`[String!]!`](https://partner-api.visitt.io/#definition-String) | Charges ids to update |
| `input` \- [`UpdateChargeStatusInput`](https://partner-api.visitt.io/#definition-UpdateChargeStatusInput) | Input of the charges status to update. |

#### Example

##### Query

```gql
mutation updateChargesStatus(
  $chargeIds: [String!]!,
  $input: UpdateChargeStatusInput
) {
  updateChargesStatus(
    chargeIds: $chargeIds,
    input: $input
  ) {
    charges {
      ...ChargeFragment
    }
  }
}
```

##### Variables

```json
{
  "chargeIds": ["abc123"],
  "input": UpdateChargeStatusInput
}
```

##### Response

```json
{"data": {"updateChargesStatus": {"charges": [Charge]}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `updateContact`

##### Description

Update contact. Only passed fields are updated, to reset a field pass null or "" (empty string)

##### Response

Returns an [`UpdateContactsResult!`](https://partner-api.visitt.io/#definition-UpdateContactsResult)

##### Arguments

| Name | Description |
| --- | --- |
| `contactId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the contact. |
| `input` \- [`ContactInput!`](https://partner-api.visitt.io/#definition-ContactInput) | Input of the contact values to update. |

#### Example

##### Query

```gql
mutation updateContact(
  $contactId: String!,
  $input: ContactInput!
) {
  updateContact(
    contactId: $contactId,
    input: $input
  ) {
    contact {
      ...ContactFragment
    }
  }
}
```

##### Variables

```json
{
  "contactId": "xyz789",
  "input": ContactInput
}
```

##### Response

```json
{"data": {"updateContact": {"contact": Contact}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `updateTenant`

##### Description

Update tenant.

##### Response

Returns an [`UpdateTenantsResult!`](https://partner-api.visitt.io/#definition-UpdateTenantsResult)

##### Arguments

| Name | Description |
| --- | --- |
| `tenantId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | id of the tenant. |
| `input` \- [`TenantInput!`](https://partner-api.visitt.io/#definition-TenantInput) | Input of the tenant values to update. |

#### Example

##### Query

```gql
mutation updateTenant(
  $tenantId: String!,
  $input: TenantInput!
) {
  updateTenant(
    tenantId: $tenantId,
    input: $input
  ) {
    tenant {
      ...TenantFragment
    }
  }
}
```

##### Variables

```json
{
  "tenantId": "abc123",
  "input": TenantInput
}
```

##### Response

```json
{"data": {"updateTenant": {"tenant": Tenant}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `updateWebhook`

##### Description

Update a webhook.

##### Response

Returns an [`UpdateWebhookResult!`](https://partner-api.visitt.io/#definition-UpdateWebhookResult)

##### Arguments

| Name | Description |
| --- | --- |
| `webhookId` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The id of the webhook. |
| `input` \- [`WebhookInput!`](https://partner-api.visitt.io/#definition-WebhookInput) | Input of the webhook to update. |

#### Example

##### Query

```gql
mutation updateWebhook(
  $webhookId: String!,
  $input: WebhookInput!
) {
  updateWebhook(
    webhookId: $webhookId,
    input: $input
  ) {
    webhook {
      ...WebhookFragment
    }
  }
}
```

##### Variables

```json
{
  "webhookId": "xyz789",
  "input": WebhookInput
}
```

##### Response

```json
{"data": {"updateWebhook": {"webhook": Webhook}}}
```

[Mutations](https://partner-api.visitt.io/#group-Operations-Mutations)

## `updateWorkOrders`

##### Description

Update work orders.

##### Response

Returns an [`UpdateWorkOrdersResult!`](https://partner-api.visitt.io/#definition-UpdateWorkOrdersResult)

##### Arguments

| Name | Description |
| --- | --- |
| `workOrderIds` \- [`[String]`](https://partner-api.visitt.io/#definition-String) | Work orders ids to update |
| `input` \- [`WorkOrderUpdateInput`](https://partner-api.visitt.io/#definition-WorkOrderUpdateInput) | Input of the work order values to update. |

#### Example

##### Query

```gql
mutation updateWorkOrders(
  $workOrderIds: [String],
  $input: WorkOrderUpdateInput
) {
  updateWorkOrders(
    workOrderIds: $workOrderIds,
    input: $input
  ) {
    workOrders {
      ...WorkOrderFragment
    }
  }
}
```

##### Variables

```json
{
  "workOrderIds": ["abc123"],
  "input": WorkOrderUpdateInput
}
```

##### Response

```json
{
  "data": {
    "updateWorkOrders": {"workOrders": [WorkOrder]}
  }
}
```

# Types

## Actor

##### Description

Actor is the entity who performed an action. It can be user, contact, integration, partner, or server

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The id of the actor, can be user id, contact id, partner id, integration id or server id |
| `label` \- [`String`](https://partner-api.visitt.io/#definition-String) | The name of the actor |
| `email` \- [`String`](https://partner-api.visitt.io/#definition-String) | The email of the actor (available for user and contact types) |
| `image` \- [`Media`](https://partner-api.visitt.io/#definition-Media) | The image of the user |
| `type` \- [`ActorType`](https://partner-api.visitt.io/#definition-ActorType) | The type of the actor |

##### Example

```json
{
  "_id": 4,
  "label": "abc123",
  "email": "xyz789",
  "image": Media,
  "type": "user"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ActorType

##### Values

| Enum Value | Description |
| --- | --- |
| `user` |  |
| `contact` |  |
| `partner` |  |
| `integration` |  |
| `server` |  |

##### Example

```gql
"user"
```

[Types](https://partner-api.visitt.io/#group-Types)

## ArchiveContactsResult

##### Fields

| Field Name | Description |
| --- | --- |
| `contact` \- [`Contact`](https://partner-api.visitt.io/#definition-Contact) | The archived/unarchived contact. |

##### Example

```json
{"contact": Contact}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ArchiveTenantsResult

##### Fields

| Field Name | Description |
| --- | --- |
| `tenant` \- [`Tenant`](https://partner-api.visitt.io/#definition-Tenant) | The archived/unarchived tenant. |

##### Example

```json
{"tenant": Tenant}
```

[Types](https://partner-api.visitt.io/#group-Types)

## AssignCategoryResult

##### Fields

| Field Name | Description |
| --- | --- |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | Assigned category. |

##### Example

```json
{"category": Category}
```

[Types](https://partner-api.visitt.io/#group-Types)

## BillableItem

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | Visitt internal item id |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | Name or description of billable item |
| `chargeCode` \- [`String`](https://partner-api.visitt.io/#definition-String) | Chrage code of billable item |
| `price` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Price of billable item |
| `taxable` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Apply tax to charges of billable item |
| `type` \- [`BillableItemType`](https://partner-api.visitt.io/#definition-BillableItemType) | Type of billable item |
| `markup` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Markup to apply to billable item charges |
| `markupUnit` \- [`BillableMarkupType`](https://partner-api.visitt.io/#definition-BillableMarkupType) | Type of markup, fixed amount or percentage |
| `active` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Is billable item active |
| `archived` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Is billable item archived |
| `createdAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Creation time in Visitt |
| `updatedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Update time in Visitt |

##### Example

```json
{
  "_id": "4",
  "name": "xyz789",
  "chargeCode": "xyz789",
  "price": 123.45,
  "taxable": true,
  "type": "labor",
  "markup": 123.45,
  "markupUnit": "fix_price",
  "active": true,
  "archived": true,
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## BillableItemFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The billable item id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## BillableItemInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `type` \- [`BillableItemType!`](https://partner-api.visitt.io/#definition-BillableItemType) | Type of the billable item |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | Name or description of billable item |
| `price` \- [`Float!`](https://partner-api.visitt.io/#definition-Float) | Price of billable item |
| `markup` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Markup to apply to billable item charges |
| `markupUnit` \- [`BillableMarkupType`](https://partner-api.visitt.io/#definition-BillableMarkupType) | Type of markup, fixed amount or percentage |
| `chargeCode` \- [`String`](https://partner-api.visitt.io/#definition-String) | Chrage code of billable item |
| `active` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Is billable active |
| `archived` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Is billable archived |
| `taxable` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Is billable taxable |

##### Example

```json
{
  "propertyId": "xyz789",
  "type": "labor",
  "name": "abc123",
  "price": 987.65,
  "markup": 123.45,
  "markupUnit": "fix_price",
  "chargeCode": "xyz789",
  "active": true,
  "archived": true,
  "taxable": false
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## BillableItemType

##### Values

| Enum Value | Description |
| --- | --- |
| `labor` | Labor |
| `material` | Material |
| `equipment` | Equipment |
| `utility` | Utility |
| `service` | Service |
| `other` | Other |

##### Example

```gql
"labor"
```

[Types](https://partner-api.visitt.io/#group-Types)

## BillableItemsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[BillableItem]`](https://partner-api.visitt.io/#definition-BillableItem) | The list of billable items. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [BillableItem],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## BillableMarkupType

##### Values

| Enum Value | Description |
| --- | --- |
| `fix_price` | Fixed price - fixed currency amount, i.e. 10$. |
| `percent` | Percentage of billable item price, i.e. add 10% to price. |

##### Example

```gql
"fix_price"
```

[Types](https://partner-api.visitt.io/#group-Types)

## Boolean

##### Description

The `Boolean` scalar type represents `true` or `false`.

[Types](https://partner-api.visitt.io/#group-Types)

## Building

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | id of the building. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the building. |
| `externalId` \- [`String`](https://partner-api.visitt.io/#definition-String) | External identifier for the building, used for third-party system integration. |
| `sites` \- [`SitesPaginated`](https://partner-api.visitt.io/#definition-SitesPaginated) | Sites associated with the building. |
| ##### Arguments<br>###### `filters` \- [`[SiteFilter]`](https://partner-api.visitt.io/\#definition-SiteFilter)<br>###### `skip` \- [`Int`](https://partner-api.visitt.io/\#definition-Int)<br>Number of items to skip, the default is 0. Must be a positive integer.<br>###### `limit` \- [`Int`](https://partner-api.visitt.io/\#definition-Int)<br>Number of items to get, the default is 20, max is 1000. Must be a positive integer. |
| `integrations` \- [`[EntityIntegration]`](https://partner-api.visitt.io/#definition-EntityIntegration) | External integrations associated with the building |

##### Example

```json
{
  "_id": 4,
  "name": "xyz789",
  "externalId": "abc123",
  "sites": SitesPaginated,
  "integrations": [EntityIntegration]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## BuildingFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The building id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `name` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The building name filter |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "name": FilterStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## BuildingsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Building]`](https://partner-api.visitt.io/#definition-Building) | The list of buildings. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Building],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CategoriesPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Category]`](https://partner-api.visitt.io/#definition-Category) | The list of categories. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Category],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Category

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | id of the category. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the category. |
| `color` \- [`String`](https://partner-api.visitt.io/#definition-String) | Color of the category, in HEX format. |
| `subCategories` \- [`[Category]`](https://partner-api.visitt.io/#definition-Category) | Sub categories of the category. |
| `isAssigned` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates if the category is assigned to the partner's property. Only supported for legacy single-property partners, where the property is auto-resolved. Other partners must use assignedProperties instead. Use assignedProperties instead. isAssigned is only supported for legacy single-property partners. |
| `assignedProperties` \- [`[Property]`](https://partner-api.visitt.io/#definition-Property) | Properties the category is assigned to, intersected with the token's scope. Returns an empty list when the category is not assigned to any in-scope property. |

##### Example

```json
{
  "_id": 4,
  "name": "xyz789",
  "color": "xyz789",
  "subCategories": [Category],
  "isAssigned": false,
  "assignedProperties": [Property]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CategoryFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The category id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `name` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | Filter categories by name, so you do not have to page through every category and match names yourself. Supports eq (exact, case-sensitive), neq, contains (case-insensitive substring), in and nin.<br>Example: { name: { eq: "Plumbing" } } or { name: { in: \["Plumbing", "HVAC"\] } }<br>Only top-level categories are searchable — see the categories query. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "name": FilterStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CategoryInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | Name of the category. Rules:<br>- Required<br>- Trimmed before validation and save<br>- Length must be between 2 and 100 characters<br>- Must be unique in the same level (same parentCategoryId scope) |
| `color` \- [`String`](https://partner-api.visitt.io/#definition-String) | Color of the category in HEX format (optional) |
| `parentCategoryId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | Parent category ID to create this as a subcategory. If not provided, creates a top-level category. Can reference only a top-level category (2 levels max). |

##### Example

```json
{
  "propertyId": "abc123",
  "name": "abc123",
  "color": "abc123",
  "parentCategoryId": 4
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CategoryUpdateInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the category (min 2 characters, max 100 characters) |
| `color` \- [`String`](https://partner-api.visitt.io/#definition-String) | Color of the category in HEX format |

##### Example

```json
{
  "propertyId": "abc123",
  "name": "abc123",
  "color": "abc123"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Charge

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | Visitt charge id |
| `billableItemId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | Billable item id - Visitt id |
| `type` \- [`BillableItemType`](https://partner-api.visitt.io/#definition-BillableItemType) | Type of charge - Defined by billable item types. |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | Charge name/description |
| `chargeCode` \- [`String`](https://partner-api.visitt.io/#definition-String) | Charge code of billable item |
| `status` \- [`ChargeStatus`](https://partner-api.visitt.io/#definition-ChargeStatus) | Charge's status |
| `price` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Price of charge - Not including tax or markup. |
| `markup` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Markup |
| `markupUnit` \- [`BillableMarkupType`](https://partner-api.visitt.io/#definition-BillableMarkupType) | Markup type |
| `taxable` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Is taxable billing item taxable - At time of charge |
| `tax` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Tax amount |
| `quantity` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Quantity of items in this charge, 3 chairs, defined from a specific billable item chair. |
| `total` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Final price of charge - Including tax, markup and quantity of items. |
| `tenant` \- [`Tenant`](https://partner-api.visitt.io/#definition-Tenant) | The tenant the charge is issued for |
| `workOrder` \- [`WorkOrder`](https://partner-api.visitt.io/#definition-WorkOrder) | The work order the charge is attached to |
| `verifiedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Timestamp indicating when the status was changed to 'verified' |
| `verifiedBy` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | Id of the user who changed the status to 'verified' |

##### Example

```json
{
  "_id": 4,
  "billableItemId": 4,
  "type": "labor",
  "name": "abc123",
  "chargeCode": "xyz789",
  "status": "open",
  "price": 987.65,
  "markup": 123.45,
  "markupUnit": "fix_price",
  "taxable": true,
  "tax": 123.45,
  "quantity": 123,
  "total": 987.65,
  "tenant": Tenant,
  "workOrder": WorkOrder,
  "verifiedAt": "2007-12-03T10:15:30Z",
  "verifiedBy": "4"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ChargeFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The charge id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `status` \- [`FilterChargeStatus`](https://partner-api.visitt.io/#definition-FilterChargeStatus) | The charge status filter |
| `createdAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The charge creation date filter. |
| `verifiedAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The charge verification date filter. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "status": FilterChargeStatus,
  "createdAt": FilterDate,
  "verifiedAt": FilterDate
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ChargeStatus

##### Values

| Enum Value | Description |
| --- | --- |
| `open` | Charge was added and awaiting approval or verification. open status can be changed to => verified / awaiting\_sync |
| `verified` | Charge was verified by a manager and excluded from sync. verified status can be changed to => awaiting\_sync |
| `awaiting_sync` | Charge was verified and is eligible for the next sync. awaiting\_sync status can be changed to => verified / sync\_in\_progress / in\_accounting / accounting\_error |
| `sync_in_progress` | Charge is in sync state. sync\_in\_progress status can be changed to => in\_accounting / accounting\_error |
| `in_accounting` | Charge was sent to accounting and is waiting to be processed. in\_accounting status can be changed to => accounting\_error / settled |
| `accounting_error` | Charge encountered an error while being processed by accounting. accounting\_error status can be changed to => awaiting\_sync / in\_accounting / sync\_in\_progress / verified |
| `settled` | Charge was processed by accounting and is completed. settled status can't be changed |

##### Example

```gql
"open"
```

[Types](https://partner-api.visitt.io/#group-Types)

## ChargesPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Charge]`](https://partner-api.visitt.io/#definition-Charge) | The list of charges. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Charge],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CompletionPolicy

##### Values

| Enum Value | Description |
| --- | --- |
| `next_occurrence` | If set, the inspection due date will be set to the next inspection start date minus 1 millisecond |
| `iso_duration` | If set, completionISODuration will be used to calculate the inspection due date |
| `end_of_unit` | If set, completionEndOfUnit will be used to calculate the inspection due date |

##### Example

```gql
"next_occurrence"
```

[Types](https://partner-api.visitt.io/#group-Types)

## CompletionPolicySettings

##### Fields

| Field Name | Description |
| --- | --- |
| `completionPolicy` \- [`CompletionPolicy`](https://partner-api.visitt.io/#definition-CompletionPolicy) | The type of completion policy. Default is next\_occurrence |
| `completionISODuration` \- [`String`](https://partner-api.visitt.io/#definition-String) | ISO 8601 duration string. Added to the inspection start date to evaluate the inspection due date |
| `completionEndOfUnit` \- [`EndOfUnit`](https://partner-api.visitt.io/#definition-EndOfUnit) | Due date is set to the end of this unit. E.g end of month, end of week. |

##### Example

```json
{
  "completionPolicy": "next_occurrence",
  "completionISODuration": "abc123",
  "completionEndOfUnit": "day"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Contact

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | id of the contact. |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | Name of the contact. |
| `phone` \- [`String`](https://partner-api.visitt.io/#definition-String) | Phone of the contact. |
| `email` \- [`String`](https://partner-api.visitt.io/#definition-String) | Email of the contact. |
| `externalId` \- [`String`](https://partner-api.visitt.io/#definition-String) | External identifier for the contact, used for third-party system integration. |
| `extraInfo` \- [`String`](https://partner-api.visitt.io/#definition-String) | Free text additional information of the contact. |
| `roles` \- [`[ContactRole]`](https://partner-api.visitt.io/#definition-ContactRole) | Roles of contact |
| `isEmergency` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the contact is an emergency contact. |
| `isArchived` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the contact is archived. |
| `tenant` \- [`Tenant`](https://partner-api.visitt.io/#definition-Tenant) | Tenant the contact is assigned to. |
| `tenants` \- [`[Tenant]`](https://partner-api.visitt.io/#definition-Tenant) | Tenants list the contact is assigned to. Supports backward compatibility for contacts assigned to multiple tenants. |
| `integrations` \- [`[EntityIntegration]`](https://partner-api.visitt.io/#definition-EntityIntegration) | External integrations associated with the contact |

##### Example

```json
{
  "_id": 4,
  "name": "xyz789",
  "phone": "xyz789",
  "email": "abc123",
  "externalId": "xyz789",
  "extraInfo": "abc123",
  "roles": ["admin"],
  "isEmergency": false,
  "isArchived": true,
  "tenant": Tenant,
  "tenants": [Tenant],
  "integrations": [EntityIntegration]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ContactFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The contact id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `email` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The contact email filter |
| `name` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The contact name filter |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "email": FilterStringArray,
  "name": FilterStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ContactInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The name of the contact. (min 2 characters, max 100 characters) |
| `phone` \- [`String`](https://partner-api.visitt.io/#definition-String) | The phone of the contact, as international phone number, E.164 format, unique per company. |
| `email` \- [`String`](https://partner-api.visitt.io/#definition-String) | The email of the contact, unique per company. |
| `tenant` \- [`ContactTenantInput`](https://partner-api.visitt.io/#definition-ContactTenantInput) | The id of tenant to be assigned with the contact |
| `extraInfo` \- [`String`](https://partner-api.visitt.io/#definition-String) | Free text additional information of the contact. (max 500 characters) |
| `roles` \- [`[ContactRole]`](https://partner-api.visitt.io/#definition-ContactRole) | Roles of contact |
| `isEmergency` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the contact is an emergency contact. |

##### Example

```json
{
  "propertyId": "abc123",
  "name": "xyz789",
  "phone": "abc123",
  "email": "abc123",
  "tenant": ContactTenantInput,
  "extraInfo": "abc123",
  "roles": ["admin"],
  "isEmergency": false
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ContactRole

##### Values

| Enum Value | Description |
| --- | --- |
| `admin` |  |
| `employee` |  |
| `emergency` | Use Contact.isEmergency. |

##### Example

```gql
"admin"
```

[Types](https://partner-api.visitt.io/#group-Types)

## ContactTenantInput

##### Fields

| Input Field | Description |
| --- | --- |
| `tenantId` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of tenant to be added to the contact. |

##### Example

```json
{"tenantId": 4}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ContactsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Contact]`](https://partner-api.visitt.io/#definition-Contact) | The list of contacts. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Contact],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CreateBillableItemResult

##### Fields

| Field Name | Description |
| --- | --- |
| `billableItem` \- [`BillableItem`](https://partner-api.visitt.io/#definition-BillableItem) | Created billable item. |

##### Example

```json
{"billableItem": BillableItem}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CreateCategoryResult

##### Fields

| Field Name | Description |
| --- | --- |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | Created category. |

##### Example

```json
{"category": Category}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CreateContactResult

##### Fields

| Field Name | Description |
| --- | --- |
| `contact` \- [`Contact`](https://partner-api.visitt.io/#definition-Contact) | The created contact. |

##### Example

```json
{"contact": Contact}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CreateTenantResult

##### Fields

| Field Name | Description |
| --- | --- |
| `tenant` \- [`Tenant`](https://partner-api.visitt.io/#definition-Tenant) | The created tenant. |

##### Example

```json
{"tenant": Tenant}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CreateWebhookResult

##### Fields

| Field Name | Description |
| --- | --- |
| `webhook` \- [`Webhook`](https://partner-api.visitt.io/#definition-Webhook) | Created webhook. |

##### Example

```json
{"webhook": Webhook}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CreateWorkOrderMessageResult

##### Fields

| Field Name | Description |
| --- | --- |
| `workOrderMessage` \- [`WorkOrderMessage!`](https://partner-api.visitt.io/#definition-WorkOrderMessage) | The created message. |

##### Example

```json
{"workOrderMessage": WorkOrderMessage}
```

[Types](https://partner-api.visitt.io/#group-Types)

## CreateWorkOrderResult

##### Fields

| Field Name | Description |
| --- | --- |
| `workOrder` \- [`WorkOrder`](https://partner-api.visitt.io/#definition-WorkOrder) | The created work order. |

##### Example

```json
{"workOrder": WorkOrder}
```

[Types](https://partner-api.visitt.io/#group-Types)

## DateTime

##### Example

```gql
"2007-12-03T10:15:30Z"
```

[Types](https://partner-api.visitt.io/#group-Types)

## DeleteCategoryResult

##### Fields

| Field Name | Description |
| --- | --- |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | Deleted category. |

##### Example

```json
{"category": Category}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Document

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the document. |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The name of the document. |
| `modelType` \- [`DocumentModelType!`](https://partner-api.visitt.io/#definition-DocumentModelType) | The type of document (regular, tenant COI, or vendor COI). |
| `isArchived` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the document is archived. |
| `status` \- [`DocumentStatus`](https://partner-api.visitt.io/#definition-DocumentStatus) | Computed status based on the current record's dates and document type. |
| `tags` \- [`[DocumentTag]`](https://partner-api.visitt.io/#definition-DocumentTag) | Tags associated with this document. |
| `linkedEntities` \- [`[DocumentLinkedEntity]`](https://partner-api.visitt.io/#definition-DocumentLinkedEntity) | Entities (tenants or vendors) linked to this document. |
| `property` \- [`Property`](https://partner-api.visitt.io/#definition-Property) | Property of the document |
| `createdAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which the document was created. |
| `createdByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who created the document. |
| `updatedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The last time the document was updated. |
| `updatedByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who last updated the document. |
| `currentRecord` \- [`DocumentRecord`](https://partner-api.visitt.io/#definition-DocumentRecord) | The most recent record of this document. |
| `previousRecords` \- [`[DocumentRecord]`](https://partner-api.visitt.io/#definition-DocumentRecord) | Older records of this document, ordered newest first. |

##### Example

```json
{
  "_id": 4,
  "name": "abc123",
  "modelType": "document",
  "isArchived": true,
  "status": "missing",
  "tags": [DocumentTag],
  "linkedEntities": [DocumentLinkedEntity],
  "property": Property,
  "createdAt": "2007-12-03T10:15:30Z",
  "createdByActor": Actor,
  "updatedAt": "2007-12-03T10:15:30Z",
  "updatedByActor": Actor,
  "currentRecord": DocumentRecord,
  "previousRecords": [DocumentRecord]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Filter by document id. |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `modelType` \- [`FilterDocumentModelType`](https://partner-api.visitt.io/#definition-FilterDocumentModelType) | Filter by document model type. |
| `tagIds` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Filter by tag ids assigned to the document. |
| `linkedEntityId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Filter by the id of a linked entity (tenant or vendor). |
| `isArchived` \- [`FilterBoolean`](https://partner-api.visitt.io/#definition-FilterBoolean) | Filter by archived state. |
| `status` \- [`FilterDocumentStatus`](https://partner-api.visitt.io/#definition-FilterDocumentStatus) | Filter by computed document status. |
| `createdAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | Filter by document creation date. |
| `updatedAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | Filter by document last updated date. |
| `currentRecordStartDate` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | Filter by the current record's start date. |
| `currentRecordEndDate` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | Filter by the current record's end date. |
| `currentRecordAlertDate` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | Filter by the current record's alert date. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "modelType": FilterDocumentModelType,
  "tagIds": FilterIdStringArray,
  "linkedEntityId": FilterIdStringArray,
  "isArchived": FilterBoolean,
  "status": FilterDocumentStatus,
  "createdAt": FilterDate,
  "updatedAt": FilterDate,
  "currentRecordStartDate": FilterDate,
  "currentRecordEndDate": FilterDate,
  "currentRecordAlertDate": FilterDate
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentLinkEntityType

##### Values

| Enum Value | Description |
| --- | --- |
| `tenant` | Linked entity is a tenant. |
| `vendor` | Linked entity is a vendor. |

##### Example

```gql
"tenant"
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentLinkedEntity

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The id of the linked entity. |
| `type` \- [`DocumentLinkEntityType`](https://partner-api.visitt.io/#definition-DocumentLinkEntityType) | The type of linked entity (tenant or vendor). |
| `tenant` \- [`Tenant`](https://partner-api.visitt.io/#definition-Tenant) | The linked tenant, resolved when type is tenant. |
| `vendor` \- [`Vendor`](https://partner-api.visitt.io/#definition-Vendor) | The linked vendor, resolved when type is vendor. |

##### Example

```json
{
  "_id": "4",
  "type": "tenant",
  "tenant": Tenant,
  "vendor": Vendor
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentModelType

##### Values

| Enum Value | Description |
| --- | --- |
| `document` | A regular document. |
| `tenant_coi` | A certificate of insurance (COI) linked to a tenant. |
| `vendor_coi` | A certificate of insurance (COI) linked to a vendor. |

##### Example

```gql
"document"
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentRecord

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the record. |
| `description` \- [`String`](https://partner-api.visitt.io/#definition-String) | A text description of this record. |
| `files` \- [`[Media]`](https://partner-api.visitt.io/#definition-Media) | The files attached to this record. |
| `startDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The coverage or validity start date of this record. |
| `endDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The expiration or coverage end date of this record. |
| `alertDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The date at which an expiration notification is triggered. |
| `createdAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which this record was created. |
| `createdByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who created this record. |

##### Example

```json
{
  "_id": "4",
  "description": "abc123",
  "files": [Media],
  "startDate": "2007-12-03T10:15:30Z",
  "endDate": "2007-12-03T10:15:30Z",
  "alertDate": "2007-12-03T10:15:30Z",
  "createdAt": "2007-12-03T10:15:30Z",
  "createdByActor": Actor
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentStatus

##### Values

| Enum Value | Description |
| --- | --- |
| `missing` | The document has no current record. |
| `non_compliant` | The document's current record has expired or is non-compliant. |
| `pending` | The document's current record is pending approval. |
| `compliant` | The document's current record is valid. |

##### Example

```gql
"missing"
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentTag

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The id of the tag. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | The display name of the tag. |

##### Example

```json
{
  "_id": "4",
  "name": "xyz789"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## DocumentsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Document]`](https://partner-api.visitt.io/#definition-Document) | The documents. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Document],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## EndOfUnit

##### Values

| Enum Value | Description |
| --- | --- |
| `day` |  |
| `week` |  |
| `month` |  |
| `year` |  |

##### Example

```gql
"day"
```

[Types](https://partner-api.visitt.io/#group-Types)

## EntityIntegration

##### Fields

| Field Name | Description |
| --- | --- |
| `appId` \- [`String`](https://partner-api.visitt.io/#definition-String) | App ID of the integration (e.g. yardi, mri, sftp, etc.) |
| `externalId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | External ID in the integrated system |

##### Example

```json
{
  "appId": "abc123",
  "externalId": "4"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterBoolean

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Equal to a given boolean |

##### Example

```json
{"eq": false}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterChargeStatus

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`ChargeStatus`](https://partner-api.visitt.io/#definition-ChargeStatus) | Filter by equality to the given status |
| `neq` \- [`ChargeStatus`](https://partner-api.visitt.io/#definition-ChargeStatus) | All charges where status is not the given status |
| `in` \- [`[ChargeStatus]`](https://partner-api.visitt.io/#definition-ChargeStatus) | Filter by equality to the given status array |
| `nin` \- [`[ChargeStatus]`](https://partner-api.visitt.io/#definition-ChargeStatus) | All charges where status is not the given status array |

##### Example

```json
{"eq": "open", "neq": "open", "in": ["open"], "nin": ["open"]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterDate

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Equal to a given date |
| `neq` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Not equal to a given date |
| `gt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Greater than a given date |
| `gte` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Greater than or equal a given date |
| `lt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Less than a given date |
| `lte` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | Less than or equal a given date |

##### Example

```json
{
  "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"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterDocumentModelType

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`DocumentModelType`](https://partner-api.visitt.io/#definition-DocumentModelType) | Equal to a given document model type |
| `neq` \- [`DocumentModelType`](https://partner-api.visitt.io/#definition-DocumentModelType) | Not equal to a given document model type |
| `in` \- [`[DocumentModelType]`](https://partner-api.visitt.io/#definition-DocumentModelType) | In array of given document model types |
| `nin` \- [`[DocumentModelType]`](https://partner-api.visitt.io/#definition-DocumentModelType) | Not in array of given document model types |

##### Example

```json
{"eq": "document", "neq": "document", "in": ["document"], "nin": ["document"]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterDocumentStatus

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`DocumentStatus`](https://partner-api.visitt.io/#definition-DocumentStatus) | Equal to a given document status |
| `neq` \- [`DocumentStatus`](https://partner-api.visitt.io/#definition-DocumentStatus) | Not equal to a given document status |
| `in` \- [`[DocumentStatus]`](https://partner-api.visitt.io/#definition-DocumentStatus) | In array of given document statuses |
| `nin` \- [`[DocumentStatus]`](https://partner-api.visitt.io/#definition-DocumentStatus) | Not in array of given document statuses |

##### Example

```json
{"eq": "missing", "neq": "missing", "in": ["missing"], "nin": ["missing"]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterIdStringArray

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | Equal to a given ID |
| `neq` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | Not equal to a given ID |
| `in` \- [`[ID]`](https://partner-api.visitt.io/#definition-ID) | In array of given IDs |
| `nin` \- [`[ID]`](https://partner-api.visitt.io/#definition-ID) | Not in array of given IDs |

##### Example

```json
{
  "eq": "4",
  "neq": "4",
  "in": ["4"],
  "nin": ["4"]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterInspectionStatus

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`InspectionStatus`](https://partner-api.visitt.io/#definition-InspectionStatus) | Filter by equality to the given status |
| `neq` \- [`InspectionStatus`](https://partner-api.visitt.io/#definition-InspectionStatus) | All inspection where status is not the given status |
| `in` \- [`[InspectionStatus]`](https://partner-api.visitt.io/#definition-InspectionStatus) | Filter by equality to the given status array |
| `nin` \- [`[InspectionStatus]`](https://partner-api.visitt.io/#definition-InspectionStatus) | All inspection where status is not the given status array |

##### Example

```json
{"eq": "open", "neq": "open", "in": ["open"], "nin": ["open"]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterNumberArray

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Equal to a given number |
| `neq` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Not equal to a given number |
| `gt` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Greater than a given number |
| `gte` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Greater than or equal a given number |
| `lt` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Less than a given number |
| `lte` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Less than or equal a given number |
| `in` \- [`[Int]`](https://partner-api.visitt.io/#definition-Int) | In array of given numbers |
| `nin` \- [`[Int]`](https://partner-api.visitt.io/#definition-Int) | Not in array of given numbers |

##### Example

```json
{
  "eq": 987,
  "neq": 987,
  "gt": 987,
  "gte": 987,
  "lt": 123,
  "lte": 987,
  "in": [123],
  "nin": [123]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterSiteModelType

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`SiteModelType`](https://partner-api.visitt.io/#definition-SiteModelType) | Filter by equality to the given modelType |
| `neq` \- [`SiteModelType`](https://partner-api.visitt.io/#definition-SiteModelType) | All sites where modelType is not the given modelTypes |
| `in` \- [`[SiteModelType]`](https://partner-api.visitt.io/#definition-SiteModelType) | Filter by equality to the given modelType array |
| `nin` \- [`[SiteModelType]`](https://partner-api.visitt.io/#definition-SiteModelType) | All sites where modelType is not the given modelTypes |

##### Example

```json
{"eq": "site", "neq": "site", "in": ["site"], "nin": ["site"]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterStringArray

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`String`](https://partner-api.visitt.io/#definition-String) | Equal to a given string |
| `neq` \- [`String`](https://partner-api.visitt.io/#definition-String) | Not equal to a given string |
| `contains` \- [`String`](https://partner-api.visitt.io/#definition-String) | Contains a given string |
| `in` \- [`[String]`](https://partner-api.visitt.io/#definition-String) | In array of given strings |
| `nin` \- [`[String]`](https://partner-api.visitt.io/#definition-String) | Not in array of given strings |

##### Example

```json
{
  "eq": "xyz789",
  "neq": "abc123",
  "contains": "abc123",
  "in": ["abc123"],
  "nin": ["xyz789"]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterWorkOrderSource

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`WorkOrderSource`](https://partner-api.visitt.io/#definition-WorkOrderSource) | Filter by equality to the given source |
| `neq` \- [`WorkOrderSource`](https://partner-api.visitt.io/#definition-WorkOrderSource) | All work orders where source is not the given source |
| `in` \- [`[WorkOrderSource]`](https://partner-api.visitt.io/#definition-WorkOrderSource) | Filter by equality to the given source array |
| `nin` \- [`[WorkOrderSource]`](https://partner-api.visitt.io/#definition-WorkOrderSource) | All work orders where source is not the given source array |

##### Example

```json
{"eq": "visitt", "neq": "visitt", "in": ["visitt"], "nin": ["visitt"]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## FilterWorkOrderStatus

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`WorkOrderStatus`](https://partner-api.visitt.io/#definition-WorkOrderStatus) | Filter by equality to the given status |
| `neq` \- [`WorkOrderStatus`](https://partner-api.visitt.io/#definition-WorkOrderStatus) | All worker orders where status is not the given status |
| `in` \- [`[WorkOrderStatus]`](https://partner-api.visitt.io/#definition-WorkOrderStatus) | Filter by equality to the given status array |
| `nin` \- [`[WorkOrderStatus]`](https://partner-api.visitt.io/#definition-WorkOrderStatus) | All worker orders where status is not the given status array |

##### Example

```json
{
  "eq": "awaiting_acceptance",
  "neq": "awaiting_acceptance",
  "in": ["awaiting_acceptance"],
  "nin": ["awaiting_acceptance"]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Float

##### Description

The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).

##### Example

```json
123.45
```

[Types](https://partner-api.visitt.io/#group-Types)

## FrequencyType

##### Values

| Enum Value | Description |
| --- | --- |
| `one_time` |  |
| `hour` |  |
| `day` |  |
| `week` |  |
| `every_2_weeks` |  |
| `month` |  |
| `every_2_months` |  |
| `every_3_months` |  |
| `every_4_months` |  |
| `every_6_months` |  |
| `year` |  |
| `custom` |  |

##### Example

```gql
"one_time"
```

[Types](https://partner-api.visitt.io/#group-Types)

## ID

##### Description

The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.

##### Example

```json
4
```

[Types](https://partner-api.visitt.io/#group-Types)

## Inspection

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) |  |
| `description` \- [`String`](https://partner-api.visitt.io/#definition-String) | The description of the inspection, this value is based on the Inspection Trigger description |
| `inspectionTrigger` \- [`InspectionTrigger`](https://partner-api.visitt.io/#definition-InspectionTrigger) | The inspection's inspection trigger |
| `status` \- [`InspectionStatus`](https://partner-api.visitt.io/#definition-InspectionStatus) | The status of the inspection |
| `startDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The date the inspection is open for completion |
| `dueDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The date the inspection will be marked as missed if it was not completed |
| `closedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-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]`](https://partner-api.visitt.io/#definition-User) | Users assigned to the inspection |
| `closedByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor completed the inspection, will be null when inspection is missed |
| `property` \- [`Property`](https://partner-api.visitt.io/#definition-Property) | The property of the inspection |
| `buildings` \- [`[Building]`](https://partner-api.visitt.io/#definition-Building) | The buildings of the inspection |
| `locations` \- [`[Location]`](https://partner-api.visitt.io/#definition-Location) | Use buildings instead |
| `sites` \- [`[Site]`](https://partner-api.visitt.io/#definition-Site) | The sites of the inspection |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | The category of the inspection |
| `workOrders` \- [`[WorkOrder]`](https://partner-api.visitt.io/#definition-WorkOrder) | The work orders reported on the inspection |
| `edits` \- [`[InspectionEdit]`](https://partner-api.visitt.io/#definition-InspectionEdit) | Log of edits made to a completed inspection |

##### Example

```json
{
  "_id": "4",
  "description": "abc123",
  "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]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## InspectionEdit

##### Description

Record of edits to a completed inspection

##### Fields

| Field Name | Description |
| --- | --- |
| `editedByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | Actor who made the edit |
| `editedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | When the edit was made |

##### Example

```json
{
  "editedByActor": Actor,
  "editedAt": "2007-12-03T10:15:30Z"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## InspectionFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The inspection id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `status` \- [`FilterInspectionStatus`](https://partner-api.visitt.io/#definition-FilterInspectionStatus) | The inspection status filter |
| `inspectionTriggerId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The inspection inspection trigger id filter. |
| `categoryId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The inspection category id filter. |
| `dueDate` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The inspection due date filter. |
| `closedAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The inspection closed at time filter. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "status": FilterInspectionStatus,
  "inspectionTriggerId": FilterIdStringArray,
  "categoryId": FilterIdStringArray,
  "dueDate": FilterDate,
  "closedAt": FilterDate
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## InspectionStatus

##### Values

| Enum Value | Description |
| --- | --- |
| `open` |  |
| `completed` |  |
| `missed` |  |
| `reopened` |  |
| `completed_late` |  |

##### Example

```gql
"open"
```

[Types](https://partner-api.visitt.io/#group-Types)

## InspectionTrigger

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the inspection trigger |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The name of the inspection |
| `description` \- [`String`](https://partner-api.visitt.io/#definition-String) | The description of the inspection |
| `frequencyType` \- [`FrequencyType`](https://partner-api.visitt.io/#definition-FrequencyType) | The inspection frequency |
| `completionPolicySettings` \- [`CompletionPolicySettings`](https://partner-api.visitt.io/#definition-CompletionPolicySettings) | The inspection trigger rule completion policy that controls the inspection due date |
| `rrule` \- [`RRule`](https://partner-api.visitt.io/#definition-RRule) | The inspection trigger rule |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | The inspection category |
| `assignedUsers` \- [`[User]`](https://partner-api.visitt.io/#definition-User) | The inspection assigned users |
| `property` \- [`Property`](https://partner-api.visitt.io/#definition-Property) | The inspection property |
| `buildings` \- [`[Building]`](https://partner-api.visitt.io/#definition-Building) | The inspection trigger buildings |
| `locations` \- [`[Location]`](https://partner-api.visitt.io/#definition-Location) | Use buildings instead |
| `sites` \- [`[Site]`](https://partner-api.visitt.io/#definition-Site) | The inspection sites |
| `isPaused` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Whether the inspection trigger is currently paused |
| `pauseHistory` \- [`[PauseHistoryRecord]`](https://partner-api.visitt.io/#definition-PauseHistoryRecord) | History of pause status changes |

##### Example

```json
{
  "_id": "4",
  "name": "xyz789",
  "description": "abc123",
  "frequencyType": "one_time",
  "completionPolicySettings": CompletionPolicySettings,
  "rrule": RRule,
  "category": Category,
  "assignedUsers": [User],
  "property": Property,
  "buildings": [Building],
  "locations": [Location],
  "sites": [Site],
  "isPaused": false,
  "pauseHistory": [PauseHistoryRecord]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## InspectionTriggerFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The inspection trigger id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## InspectionTriggersPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[InspectionTrigger]`](https://partner-api.visitt.io/#definition-InspectionTrigger) |  |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) |  |

##### Example

```json
{
  "items": [InspectionTrigger],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## InspectionsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Inspection]`](https://partner-api.visitt.io/#definition-Inspection) |  |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) |  |

##### Example

```json
{
  "items": [Inspection],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## 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

```json
987
```

[Types](https://partner-api.visitt.io/#group-Types)

## Location

##### Description

Deprecated, use `Building` instead.

Location was renamed to Building. Both read the same records, so a Location.\_id and the matching Building.\_id are the same value and nothing needs re-mapping.

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | id of the location. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the location. |
| `sites` \- [`SitesPaginated`](https://partner-api.visitt.io/#definition-SitesPaginated) | Sites associated with the location. |
| ##### Arguments<br>###### `filters` \- [`[SiteFilter]`](https://partner-api.visitt.io/\#definition-SiteFilter)<br>###### `skip` \- [`Int`](https://partner-api.visitt.io/\#definition-Int)<br>Number of items to skip, the default is 0. Must be a positive integer.<br>###### `limit` \- [`Int`](https://partner-api.visitt.io/\#definition-Int)<br>Number of items to get, the default is 20, max is 1000. Must be a positive integer. |

##### Example

```json
{
  "_id": "4",
  "name": "abc123",
  "sites": SitesPaginated
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## LocationFilter

##### Description

Deprecated, use `BuildingFilter` instead.

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The location id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `name` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The location name filter |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "name": FilterStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## LocationsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Location]`](https://partner-api.visitt.io/#definition-Location) | The list of locations. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Location],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Media

##### Fields

| Field Name | Description |
| --- | --- |
| `mediaId` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | id of the media. |
| `url` \- [`String`](https://partner-api.visitt.io/#definition-String) | Url to view the full media. |
| `thumbUrl` \- [`String`](https://partner-api.visitt.io/#definition-String) | Url of generated thumbnail version of the media, in jpg format. |
| `format` \- [`String`](https://partner-api.visitt.io/#definition-String) | The format of the media. |

##### Example

```json
{
  "mediaId": 4,
  "url": "abc123",
  "thumbUrl": "abc123",
  "format": "xyz789"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## MediaInput

##### Fields

| Input Field | Description |
| --- | --- |
| `mediaId` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The fileId returned from upload Files API. |

##### Example

```json
{"mediaId": "4"}
```

[Types](https://partner-api.visitt.io/#group-Types)

## PageInfo

##### Fields

| Field Name | Description |
| --- | --- |
| `hasNext` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates if there are more results when paginating. |
| `totalCount` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | The total number of items matching the query. |
| `skip` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to skip, the default is 0. |
| `limit` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Number of items to get, the default is 20, max is 1000. |

##### Example

```json
{"hasNext": false, "totalCount": 123, "skip": 123, "limit": 987}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Partner

##### Fields

| Field Name | Description |
| --- | --- |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the partner. |
| `webhooks` \- [`[Webhook]`](https://partner-api.visitt.io/#definition-Webhook) | Webhooks of the partner. |

##### Example

```json
{
  "name": "abc123",
  "webhooks": [Webhook]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## PauseAction

##### Description

Action performed on inspection trigger pause status

##### Values

| Enum Value | Description |
| --- | --- |
| `pause` |  |
| `activate` |  |

##### Example

```gql
"pause"
```

[Types](https://partner-api.visitt.io/#group-Types)

## PauseHistoryRecord

##### Description

Record of pause status change

##### Fields

| Field Name | Description |
| --- | --- |
| `updatedByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | Actor who made the change |
| `timestamp` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | When the change was made |
| `action` \- [`PauseAction`](https://partner-api.visitt.io/#definition-PauseAction) | Type of action performed |

##### Example

```json
{
  "updatedByActor": Actor,
  "timestamp": "2007-12-03T10:15:30Z",
  "action": "pause"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## PropertiesPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Property]`](https://partner-api.visitt.io/#definition-Property) | The list of properties. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Property],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Property

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | id of the property. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the property. |
| `parentPropertyGroup` \- [`PropertyGroup`](https://partner-api.visitt.io/#definition-PropertyGroup) | The parent property group of the property. |

##### Example

```json
{
  "_id": "4",
  "name": "abc123",
  "parentPropertyGroup": PropertyGroup
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## PropertyFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The property id filter |

##### Example

```json
{"_id": FilterIdStringArray}
```

[Types](https://partner-api.visitt.io/#group-Types)

## PropertyGroup

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | id of the property group. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the property group. |
| `externalId` \- [`String`](https://partner-api.visitt.io/#definition-String) | External ID of the property group. |

##### Example

```json
{
  "_id": 4,
  "name": "xyz789",
  "externalId": "abc123"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## QuestionKeys

##### Values

| Enum Value | Description |
| --- | --- |
| `satisfaction` |  |
| `speed` |  |
| `professionalism` |  |
| `attitude` |  |
| `comment` |  |

##### Example

```gql
"satisfaction"
```

[Types](https://partner-api.visitt.io/#group-Types)

## RRule

##### Fields

| Field Name | Description |
| --- | --- |
| `freq` \- [`String`](https://partner-api.visitt.io/#definition-String) | The frequency at which the inspection repeats (e.g. DAILY, WEEKLY, MONTHLY) |
| `interval` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | The interval between inspections in units of frequency (e.g. 2 for every 2 weeks) |
| `bymonthday` \- [`[Int]`](https://partner-api.visitt.io/#definition-Int) | The days of the month when inspection starts (e.g. \[1, 15\] for 1st and 15th) |
| `byweekday` \- [`[Int]`](https://partner-api.visitt.io/#definition-Int) | The days of the week when inspection starts (0-6, where 0 is Sunday) |

##### Example

```json
{
  "freq": "abc123",
  "interval": 123,
  "bymonthday": [123],
  "byweekday": [987]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Review

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the review |
| `workOrder` \- [`WorkOrder!`](https://partner-api.visitt.io/#definition-WorkOrder) | The reivew's work order |
| `createdByActor` \- [`Actor!`](https://partner-api.visitt.io/#definition-Actor) | The actor that added the review |
| `createdAt` \- [`DateTime!`](https://partner-api.visitt.io/#definition-DateTime) | The time the review was created |
| `score` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | The general review score from 1-5 |
| `answers` \- [`[ReviewAnswer]`](https://partner-api.visitt.io/#definition-ReviewAnswer) | The review detailed answers |

##### Example

```json
{
  "_id": "4",
  "workOrder": WorkOrder,
  "createdByActor": Actor,
  "createdAt": "2007-12-03T10:15:30Z",
  "score": 987,
  "answers": [ReviewAnswer]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ReviewAnswer

##### Fields

| Field Name | Description |
| --- | --- |
| `question` \- [`QuestionKeys`](https://partner-api.visitt.io/#definition-QuestionKeys) | The quetion asked on the review form |
| `answerType` \- [`ReviewAnswerType`](https://partner-api.visitt.io/#definition-ReviewAnswerType) | The type of the answer |
| `value` \- [`String`](https://partner-api.visitt.io/#definition-String) | The answer value |

##### Example

```json
{
  "question": "satisfaction",
  "answerType": "comment",
  "value": "xyz789"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ReviewAnswerType

##### Values

| Enum Value | Description |
| --- | --- |
| `comment` |  |
| `scale` |  |
| `text` |  |

##### Example

```gql
"comment"
```

[Types](https://partner-api.visitt.io/#group-Types)

## ReviewFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The review id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `createdAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The review created at time filter. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "createdAt": FilterDate
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## ReviewsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Review]`](https://partner-api.visitt.io/#definition-Review) | The reviews. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Review],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Site

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | id of the site. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the site. |
| `externalId` \- [`String`](https://partner-api.visitt.io/#definition-String) | External identifier for the site, used for third-party system integration. |
| `modelType` \- [`SiteModelType`](https://partner-api.visitt.io/#definition-SiteModelType) | Model type of the site. |
| `parentSites` \- [`[Site]`](https://partner-api.visitt.io/#definition-Site) | Parent sites in the hierarchy, from root (first in the array) to immediate parent (last in the array) |
| `floor` \- [`Site`](https://partner-api.visitt.io/#definition-Site) | Floor that contains this site, can be the immediate parent or a higher level floor |
| `type` \- [`String`](https://partner-api.visitt.io/#definition-String) | Type of the site. |
| `qrCode` \- [`String`](https://partner-api.visitt.io/#definition-String) | QR code of the site |
| `notes` \- [`String`](https://partner-api.visitt.io/#definition-String) | Additional notes about the site |
| `unitCode` \- [`String`](https://partner-api.visitt.io/#definition-String) | Unit code of the site. |
| `size` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Size of the site in sqft or sqm (based on property settings) |
| `level` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Level of the floor (only for floor sites) |
| `integrations` \- [`[EntityIntegration]`](https://partner-api.visitt.io/#definition-EntityIntegration) | External integrations associated with the site |

##### Example

```json
{
  "_id": "4",
  "name": "abc123",
  "externalId": "xyz789",
  "modelType": "site",
  "parentSites": [Site],
  "floor": Site,
  "type": "xyz789",
  "qrCode": "xyz789",
  "notes": "abc123",
  "unitCode": "xyz789",
  "size": 123.45,
  "level": 123,
  "integrations": [EntityIntegration]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## SiteFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The site id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `buildingId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The site's building id filter |
| `modelType` \- [`FilterSiteModelType`](https://partner-api.visitt.io/#definition-FilterSiteModelType) | The site's model type filter |
| `type` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The site's type filter |
| `name` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The site name filter |
| `parentSiteId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Filter all the children sites of a parent site, returns all immediate children sites and all their children sites |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "buildingId": FilterIdStringArray,
  "modelType": FilterSiteModelType,
  "type": FilterStringArray,
  "name": FilterStringArray,
  "parentSiteId": FilterIdStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## SiteModelType

##### Values

| Enum Value | Description |
| --- | --- |
| `site` | Site represents a physical location or space |
| `equipment` | Equipment represents a piece of equipment or machinery |
| `leasable_site` | Leasable site represents a rentable space |
| `floor` | Floor represents a level in a building |

##### Example

```gql
"site"
```

[Types](https://partner-api.visitt.io/#group-Types)

## SitesPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Site]`](https://partner-api.visitt.io/#definition-Site) | The list of sites. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Site],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## SlaMetricState

##### Values

| Enum Value | Description |
| --- | --- |
| `running` | SLA timer is actively counting |
| `at_risk` | SLA is approaching its target date (75% elapsed) |
| `paused` | SLA timer is paused (work order is in pending status) |
| `met` | SLA target was met on time |
| `breached` | SLA target date has passed without completion |
| `failed` | SLA was not met (final state after breach) |
| `not_applicable` | SLA metric does not apply to this work order |

##### Example

```gql
"running"
```

[Types](https://partner-api.visitt.io/#group-Types)

## SlaMetricType

##### Values

| Enum Value | Description |
| --- | --- |
| `acceptance` | Time to first acknowledge the work order |
| `completion` | Time to complete the work order |

##### Example

```gql
"acceptance"
```

[Types](https://partner-api.visitt.io/#group-Types)

## SlaTimeUnit

##### Values

| Enum Value | Description |
| --- | --- |
| `minutes` |  |
| `hours` |  |
| `days` |  |

##### Example

```gql
"minutes"
```

[Types](https://partner-api.visitt.io/#group-Types)

## 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

```gql
"xyz789"
```

[Types](https://partner-api.visitt.io/#group-Types)

## Tenant

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | id of the tenant. |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | Name of the tenant. |
| `tenantCode` \- [`String`](https://partner-api.visitt.io/#definition-String) | external id of the tenant. |
| `externalId` \- [`String`](https://partner-api.visitt.io/#definition-String) | External identifier for the tenant, used for third-party system integration. |
| `contacts` \- [`[Contact]`](https://partner-api.visitt.io/#definition-Contact) | Contact list of the tenant. |
| `admins` \- [`[Contact]`](https://partner-api.visitt.io/#definition-Contact) | Admin list of the tenant. Use contact role |
| `locations` \- [`[TenantLocation]`](https://partner-api.visitt.io/#definition-TenantLocation) | Locations list of the tenant. Each entry is a TenantLocation tying the tenant to a building and a site — read `building` on each entry. |
| `isArchived` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the tenant is archived. |
| `integrations` \- [`[EntityIntegration]`](https://partner-api.visitt.io/#definition-EntityIntegration) | External integrations associated with the tenant |

##### Example

```json
{
  "_id": "4",
  "name": "xyz789",
  "tenantCode": "xyz789",
  "externalId": "abc123",
  "contacts": [Contact],
  "admins": [Contact],
  "locations": [TenantLocation],
  "isArchived": true,
  "integrations": [EntityIntegration]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## TenantContactInput

##### Fields

| Input Field | Description |
| --- | --- |
| `contactId` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of contact to be added to the tenant. |

##### Example

```json
{"contactId": 4}
```

[Types](https://partner-api.visitt.io/#group-Types)

## TenantFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The tenant id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `buildingId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The tenant building ID filter. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "buildingId": FilterIdStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## TenantInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The name of the tenant. (min 2 characters, max 100 characters). Unique per company |
| `tenantCode` \- [`String`](https://partner-api.visitt.io/#definition-String) | The external id of the tenant. Unique per company |
| `contacts` \- [`[TenantContactInput!]`](https://partner-api.visitt.io/#definition-TenantContactInput) | The contacts to associate to the tenant. Sets the contacts, pass \[\] to reset |
| `locations` \- [`[TenantLocationInput!]`](https://partner-api.visitt.io/#definition-TenantLocationInput) | The locations to associate to the tenant. Sets the locations, pass \[\] to reset |

##### Example

```json
{
  "propertyId": "xyz789",
  "name": "abc123",
  "tenantCode": "xyz789",
  "contacts": [TenantContactInput],
  "locations": [TenantLocationInput]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## TenantLocation

##### Fields

| Field Name | Description |
| --- | --- |
| `building` \- [`Building`](https://partner-api.visitt.io/#definition-Building) | Building the tenant occupies. |
| `location` \- [`Location`](https://partner-api.visitt.io/#definition-Location) | Deprecated, use `building` instead. Resolves to the same record. Use building instead. Resolves to the same record. |
| `site` \- [`Site`](https://partner-api.visitt.io/#definition-Site) |  |

##### Example

```json
{
  "building": Building,
  "location": Location,
  "site": Site
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## TenantLocationInput

##### Fields

| Input Field | Description |
| --- | --- |
| `buildingId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The id of building to be added to the tenant. |
| `site` \- [`TenantSiteInput`](https://partner-api.visitt.io/#definition-TenantSiteInput) | The information of the site to associate with the tenant. |

##### Example

```json
{
  "buildingId": "4",
  "site": TenantSiteInput
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## TenantSiteInput

##### Fields

| Input Field | Description |
| --- | --- |
| `name` \- [`String`](https://partner-api.visitt.io/#definition-String) | The name of the site for the tenant, optional, by default use the tenant name with the floor. |
| `floor` \- [`String`](https://partner-api.visitt.io/#definition-String) | The floor of the site in the location to create / find existing site according to it. |
| `type` \- [`String`](https://partner-api.visitt.io/#definition-String) | The type of the site in the location to set when creating a new site. |

##### Example

```json
{
  "name": "abc123",
  "floor": "abc123",
  "type": "xyz789"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## TenantsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Tenant]`](https://partner-api.visitt.io/#definition-Tenant) | The list of tenants. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Tenant],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UnassignCategoryResult

##### Fields

| Field Name | Description |
| --- | --- |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | Unassigned category. |

##### Example

```json
{"category": Category}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateBillableItemResult

##### Fields

| Field Name | Description |
| --- | --- |
| `billableItem` \- [`BillableItem`](https://partner-api.visitt.io/#definition-BillableItem) | Updated billable item. |

##### Example

```json
{"billableItem": BillableItem}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateCategoryResult

##### Fields

| Field Name | Description |
| --- | --- |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | Updated category. |

##### Example

```json
{"category": Category}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateChargeStatusInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `status` \- [`ChargeStatus!`](https://partner-api.visitt.io/#definition-ChargeStatus) | Status of the charge. Can't be unset |

##### Example

```json
{"propertyId": "abc123", "status": "open"}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateChargeStatusResult

##### Fields

| Field Name | Description |
| --- | --- |
| `charges` \- [`[Charge]`](https://partner-api.visitt.io/#definition-Charge) | Updated charges |

##### Example

```json
{"charges": [Charge]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateContactsResult

##### Fields

| Field Name | Description |
| --- | --- |
| `contact` \- [`Contact`](https://partner-api.visitt.io/#definition-Contact) | The updated contact. |

##### Example

```json
{"contact": Contact}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateTenantsResult

##### Fields

| Field Name | Description |
| --- | --- |
| `tenant` \- [`Tenant`](https://partner-api.visitt.io/#definition-Tenant) | The updated tenant. |

##### Example

```json
{"tenant": Tenant}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateWebhookResult

##### Fields

| Field Name | Description |
| --- | --- |
| `webhook` \- [`Webhook`](https://partner-api.visitt.io/#definition-Webhook) | Updated webhook. |

##### Example

```json
{"webhook": Webhook}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateWorkOrderResult

##### Fields

| Field Name | Description |
| --- | --- |
| `workOrder` \- [`WorkOrder!`](https://partner-api.visitt.io/#definition-WorkOrder) |  |

##### Example

```json
{"workOrder": WorkOrder}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UpdateWorkOrdersResult

##### Fields

| Field Name | Description |
| --- | --- |
| `workOrders` \- [`[WorkOrder!]!`](https://partner-api.visitt.io/#definition-WorkOrder) |  |

##### Example

```json
{"workOrders": [WorkOrder]}
```

[Types](https://partner-api.visitt.io/#group-Types)

## User

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | id of the user. |
| `firstName` \- [`String!`](https://partner-api.visitt.io/#definition-String) | First name of the user. |
| `lastName` \- [`String!`](https://partner-api.visitt.io/#definition-String) | Last name of the user. |
| `internationalPhone` \- [`String`](https://partner-api.visitt.io/#definition-String) | Phone of the user, as international phone number, E.164 format. |
| `phone` \- [`String`](https://partner-api.visitt.io/#definition-String) | Phone of the user, in local format |
| `email` \- [`String`](https://partner-api.visitt.io/#definition-String) | Email of the user. |
| `role` \- [`UserRole`](https://partner-api.visitt.io/#definition-UserRole) | Role of the user. |
| `position` \- [`String`](https://partner-api.visitt.io/#definition-String) | Position of the user. free text |
| `image` \- [`Media`](https://partner-api.visitt.io/#definition-Media) | Image of the user |
| `integrations` \- [`[EntityIntegration]`](https://partner-api.visitt.io/#definition-EntityIntegration) | External integrations associated with the user |

##### Example

```json
{
  "_id": 4,
  "firstName": "xyz789",
  "lastName": "xyz789",
  "internationalPhone": "abc123",
  "phone": "abc123",
  "email": "xyz789",
  "role": "customer_admin",
  "position": "abc123",
  "image": Media,
  "integrations": [EntityIntegration]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UserFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The user id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `role` \- [`UserRoleFilter`](https://partner-api.visitt.io/#definition-UserRoleFilter) | The user role filter |
| `email` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The user email filter |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "role": UserRoleFilter,
  "email": FilterStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UserRole

##### Values

| Enum Value | Description |
| --- | --- |
| `customer_admin` | Account-wide admin with access to all properties and all permissions |
| `property_admin` | Admin scoped to a single or many properties with all permissions within that property |
| `manager` | Staff member managing properties with configurable permissions |
| `team_member` | Field staff with limited, configurable permissions |

##### Example

```gql
"customer_admin"
```

[Types](https://partner-api.visitt.io/#group-Types)

## UserRoleFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `eq` \- [`UserRole`](https://partner-api.visitt.io/#definition-UserRole) |  |
| `neq` \- [`UserRole`](https://partner-api.visitt.io/#definition-UserRole) |  |
| `in` \- [`[UserRole]`](https://partner-api.visitt.io/#definition-UserRole) |  |
| `nin` \- [`[UserRole]`](https://partner-api.visitt.io/#definition-UserRole) |  |

##### Example

```json
{
  "eq": "customer_admin",
  "neq": "customer_admin",
  "in": ["customer_admin"],
  "nin": ["customer_admin"]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## UsersPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[User]`](https://partner-api.visitt.io/#definition-User) | The list of users. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [User],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Vendor

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | id of the vendor. |
| `name` \- [`String!`](https://partner-api.visitt.io/#definition-String) | Name of the vendor. |
| `contactName` \- [`String`](https://partner-api.visitt.io/#definition-String) | Contact name of the vendor. |
| `phone` \- [`String`](https://partner-api.visitt.io/#definition-String) | Phone of the vendor. |
| `email` \- [`String`](https://partner-api.visitt.io/#definition-String) | Email of the vendor. |
| `profession` \- [`String`](https://partner-api.visitt.io/#definition-String) | Profession or trade of the vendor. |
| `notes` \- [`String`](https://partner-api.visitt.io/#definition-String) | Additional notes about the vendor. |
| `isArchived` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Indicates the vendor is archived. |
| `createdAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which the vendor was created. |
| `updatedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The last time the vendor was updated. |
| `createdByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who created the vendor. |

##### Example

```json
{
  "_id": 4,
  "name": "abc123",
  "contactName": "xyz789",
  "phone": "xyz789",
  "email": "xyz789",
  "profession": "xyz789",
  "notes": "xyz789",
  "isArchived": true,
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z",
  "createdByActor": Actor
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## VendorFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The vendor id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `name` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The vendor name filter |
| `isArchived` \- [`FilterBoolean`](https://partner-api.visitt.io/#definition-FilterBoolean) | The vendor archived state filter |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "name": FilterStringArray,
  "isArchived": FilterBoolean
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## VendorsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[Vendor]`](https://partner-api.visitt.io/#definition-Vendor) | The list of vendors. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [Vendor],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## Webhook

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the webhook. |
| `url` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The url of the webhook. |
| `eventTypes` \- [`[String!]!`](https://partner-api.visitt.io/#definition-String) | Event types of the webhook. |
| `active` \- [`Boolean!`](https://partner-api.visitt.io/#definition-Boolean) | Active state of the webhook. |

##### Example

```json
{
  "_id": "4",
  "url": "xyz789",
  "eventTypes": ["xyz789"],
  "active": false
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WebhookEventType

##### Fields

| Field Name | Description |
| --- | --- |
| `key` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The key of the event type. |

##### Example

```json
{"key": "abc123"}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WebhookInput

##### Fields

| Input Field | Description |
| --- | --- |
| `url` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The HTTPS endpoint url that the webhook event will be sent to. |
| `eventTypes` \- [`[String!]!`](https://partner-api.visitt.io/#definition-String) | Event types of the webhook. Available event types:<br>- `workOrder.created` — Dispatched when a new work order is created.<br>- `workOrder.priorityUpdated` — Dispatched when a work order's priority is updated.<br>- `workOrder.statusUpdated` — Dispatched when a work order's status is updated.<br>- `workOrderMessage.created` — Dispatched when a new text message/update is added to a work order.<br>- `workOrderMessage.updated` — Dispatched when an existing work order message is edited.<br>- `workOrderMessage.deleted` — Dispatched when a work order message is deleted.<br>Use the `webhookEventTypes` query to get the full list of available event types. |
| `active` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Active state of the webhook. |

##### Example

```json
{
  "url": "abc123",
  "eventTypes": ["xyz789"],
  "active": true
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WebhookLog

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the webhook log. |
| `webhookId` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the webhook. |
| `event` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The type of the event. |
| `eventId` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the event. |
| `log` \- [`String`](https://partner-api.visitt.io/#definition-String) | The log message of the event. |
| `status` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The execution status of the event. |
| `attempt` \- [`Int!`](https://partner-api.visitt.io/#definition-Int) | The number of the attempt to send the event. |
| `data` \- [`String`](https://partner-api.visitt.io/#definition-String) | The json string of the data of the event. |
| `createdAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time when the event was created. |

##### Example

```json
{
  "_id": "4",
  "webhookId": "4",
  "event": "abc123",
  "eventId": 4,
  "log": "abc123",
  "status": "abc123",
  "attempt": 123,
  "data": "abc123",
  "createdAt": "2007-12-03T10:15:30Z"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WebhookLogFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The webhook log id filter. |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `webhookId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The webhook id filter. |
| `eventId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The event id filter. |
| `status` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The event status filter. |
| `event` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The event type filter. |
| `createdAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The created at time filter. |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": FilterIdStringArray,
  "webhookId": FilterIdStringArray,
  "eventId": FilterIdStringArray,
  "status": FilterStringArray,
  "event": FilterStringArray,
  "createdAt": FilterDate
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WebhookLogsPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[WebhookLog]`](https://partner-api.visitt.io/#definition-WebhookLog) | The list of webhook logs. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [WebhookLog],
  "pageInfo": PageInfo
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrder

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | id of the work order. |
| `sequence` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | A running integer counting work orders in the customer. |
| `priority` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | Priority of a work order |
| `isPermittedToEnter` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Whether there is permission to enter for service |
| `permissionToEnterComment` \- [`String`](https://partner-api.visitt.io/#definition-String) | Comment describing permission to enter |
| `source` \- [`WorkOrderSource`](https://partner-api.visitt.io/#definition-WorkOrderSource) | The source of where the work order was created (Visitt, Visitt+, Integration, Partner API) |
| `status` \- [`WorkOrderStatus`](https://partner-api.visitt.io/#definition-WorkOrderStatus) | Status of the work order. |
| `statusText` \- [`String`](https://partner-api.visitt.io/#definition-String) | The text update added to the last status update. |
| `description` \- [`String`](https://partner-api.visitt.io/#definition-String) | Description of the work order. |
| `title` \- [`String`](https://partner-api.visitt.io/#definition-String) | AI generated title of the work order. Cannot be modified by the user. |
| `assignedUsers` \- [`[User]`](https://partner-api.visitt.io/#definition-User) | Users assigned to the work order. |
| `property` \- [`Property`](https://partner-api.visitt.io/#definition-Property) | Property of the work order |
| `building` \- [`Building`](https://partner-api.visitt.io/#definition-Building) | Building of the work order. |
| `location` \- [`Location`](https://partner-api.visitt.io/#definition-Location) | Deprecated, use `building` instead. Resolves to the same record. Use building instead. Resolves to the same record. |
| `site` \- [`Site`](https://partner-api.visitt.io/#definition-Site) | Site of the work order. |
| `category` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | Category of the work order. |
| `subCategory` \- [`Category`](https://partner-api.visitt.io/#definition-Category) | Sub-category of the work order. |
| `contacts` \- [`[Contact]`](https://partner-api.visitt.io/#definition-Contact) | Contacts assigned to the work order |
| `tenants` \- [`[Tenant]`](https://partner-api.visitt.io/#definition-Tenant) | Tenants assigned to the work order Work Order is now connected to only one Tenant. Use tenant |
| `tenant` \- [`Tenant`](https://partner-api.visitt.io/#definition-Tenant) | Tenant assigned to the work order |
| `defectMedia` \- [`[Media]`](https://partner-api.visitt.io/#definition-Media) | Images, PDFs or videos attached to describe the inital state of the work order. |
| `repairMedia` \- [`[Media]`](https://partner-api.visitt.io/#definition-Media) | Images, PDFs or videos attached to describe the end state of the work order. |
| `dueDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The date and time of which the work order is due |
| `createdAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which the work order was created. |
| `createdByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who created the work order |
| `reporterContact` \- [`Contact`](https://partner-api.visitt.io/#definition-Contact) | The contact reported on the work order, in case it was created by a contact. |
| `firstResponseAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-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`](https://partner-api.visitt.io/#definition-Actor) | The actor who first took action on the work order (update status or add text update) |
| `completedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which the work order was completed. |
| `completedByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who completed the work order |
| `canceledAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which the work order was canceled. |
| `canceledByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who canceled the work order |
| `updatedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The last time the work order was updated. |
| `updatedByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who updated the work order |
| `totalCharge` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | The work order's total charges price |
| `inspection` \- [`Inspection`](https://partner-api.visitt.io/#definition-Inspection) | The inspection a work order was created from. Exists only in work orders created from inspections. |
| `type` \- [`String`](https://partner-api.visitt.io/#definition-String) | Type of the work order (Amenity Booking, Proactive, Tenant Request) |
| `integrations` \- [`[EntityIntegration]`](https://partner-api.visitt.io/#definition-EntityIntegration) | External integrations associated with the work order |
| `sla` \- [`WorkOrderSla`](https://partner-api.visitt.io/#definition-WorkOrderSla) | The SLA applied to the work order, if any |
| `messages` \- [`[WorkOrderMessage]`](https://partner-api.visitt.io/#definition-WorkOrderMessage) | Messages on the work order, sorted ascending by created date. Returns all matching messages without pagination. |

##### Example

```json
{
  "_id": 4,
  "sequence": 987,
  "priority": 123,
  "isPermittedToEnter": true,
  "permissionToEnterComment": "xyz789",
  "source": "visitt",
  "status": "awaiting_acceptance",
  "statusText": "xyz789",
  "description": "abc123",
  "title": "abc123",
  "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],
  "sla": WorkOrderSla,
  "messages": [WorkOrderMessage]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderFilter

##### Fields

| Input Field | Description |
| --- | --- |
| `_id` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The work order id filter |
| `propertyId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Narrow results to specific properties. Intersected with token scope. |
| `status` \- [`FilterWorkOrderStatus`](https://partner-api.visitt.io/#definition-FilterWorkOrderStatus) | The work order status filter |
| `priority` \- [`FilterNumberArray`](https://partner-api.visitt.io/#definition-FilterNumberArray) | The work order priority number filter. |
| `contactId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The work order contact ID filter. |
| `categoryId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The work order category ID filter. |
| `subCategoryId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The work order subcategory ID filter. |
| `siteId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The work order site ID filter. |
| `buildingId` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The work order building ID filter. |
| `createdAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The created at time filter. |
| `dueDate` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The due date filter. |
| `completedAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The completed at time filter. |
| `updatedAt` \- [`FilterDate`](https://partner-api.visitt.io/#definition-FilterDate) | The updated at time filter. |
| `assignedUserIds` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | The assigned user list |
| `type` \- [`FilterStringArray`](https://partner-api.visitt.io/#definition-FilterStringArray) | The work order type filter |
| `source` \- [`FilterWorkOrderSource`](https://partner-api.visitt.io/#definition-FilterWorkOrderSource) | Filter by the source of where the work order was created. |
| `createdBy` \- [`FilterIdStringArray`](https://partner-api.visitt.io/#definition-FilterIdStringArray) | Filter by the ID of the actor who created the work order. Matches the createdByActor ID (user, partner, contact, or integration). |

##### Example

```json
{
  "_id": FilterIdStringArray,
  "propertyId": 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,
  "source": FilterWorkOrderSource,
  "createdBy": FilterIdStringArray
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `description` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The description of the work order, the minimum needed to create work order, max size is 5000 characters. |
| `buildingId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The building id of the work order. |
| `siteId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | 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` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The category id of the work order. |
| `subCategoryId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | 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`](https://partner-api.visitt.io/#definition-Int) | The priority level of the work order. Must be one of the following values:<br>- 40: Critical priority<br>- 30: High priority<br>- 20: Medium priority<br>- 10: Low priority Set to null to remove priority. |
| `isPermittedToEnter` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Whether there is permission to enter for service. |
| `permissionToEnterComment` \- [`String`](https://partner-api.visitt.io/#definition-String) | Comment describing permission to enter. |
| `defectMedia` \- [`[MediaInput]`](https://partner-api.visitt.io/#definition-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. |
| `dueDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The due date of the work order in ISO 8601 format. |
| `reporterContactId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The contact id to set as the creator of the work order. |
| `tenantId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The tenant id to assign to the work order. If provided with reporterContactId, the contact must belong to this tenant. |

##### Example

```json
{
  "propertyId": "xyz789",
  "description": "xyz789",
  "buildingId": 4,
  "siteId": 4,
  "categoryId": "4",
  "subCategoryId": 4,
  "priority": 987,
  "isPermittedToEnter": false,
  "permissionToEnterComment": "xyz789",
  "defectMedia": [MediaInput],
  "dueDate": "2007-12-03T10:15:30Z",
  "reporterContactId": 4,
  "tenantId": 4
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderMediaType

##### Values

| Enum Value | Description |
| --- | --- |
| `defectMedia` |  |
| `repairMedia` |  |

##### Example

```gql
"defectMedia"
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderMessage

##### Description

A message on a work order.

##### Fields

| Field Name | Description |
| --- | --- |
| `_id` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the message. |
| `text` \- [`String`](https://partner-api.visitt.io/#definition-String) | The text content of the message. |
| `source` \- [`WorkOrderSource`](https://partner-api.visitt.io/#definition-WorkOrderSource) | The source of where the message was created. |
| `visibility` \- [`WorkOrderMessageVisibility`](https://partner-api.visitt.io/#definition-WorkOrderMessageVisibility) | The visibility of the message. When `external_tenant`, the message is visible to tenants via the tenant portal. When `internal`, the message is only visible to staff — not shared with tenants. Use this field to distinguish internal notes from tenant-visible communication. |
| `createdByActor` \- [`Actor`](https://partner-api.visitt.io/#definition-Actor) | The actor who created the message. |
| `createdAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which the message was created. |

##### Example

```json
{
  "_id": "4",
  "text": "xyz789",
  "source": "visitt",
  "visibility": "external_tenant",
  "createdByActor": Actor,
  "createdAt": "2007-12-03T10:15:30Z"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderMessageCreateInput

##### Fields

| Input Field | Description |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `text` \- [`String!`](https://partner-api.visitt.io/#definition-String) | The text content of the message. Max 5000 characters. |
| `visibility` \- [`WorkOrderMessageVisibility!`](https://partner-api.visitt.io/#definition-WorkOrderMessageVisibility) | The visibility of the message. |
| `userId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The user id to set as the author of the message. The user must belong to the authenticated property. Exactly one of userId or contactId must be provided. |
| `contactId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The contact id to set as the author of the message. The contact must belong to the authenticated property. Exactly one of userId or contactId must be provided. When `contactId` is provided, `visibility` must be `external_tenant`. |

##### Example

```json
{
  "propertyId": "xyz789",
  "text": "abc123",
  "visibility": "external_tenant",
  "userId": 4,
  "contactId": "4"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderMessageVisibility

##### Description

Controls who can see the message.

##### Values

| Enum Value | Description |
| --- | --- |
| `external_tenant` | The message is visible to tenants via the tenant portal. |
| `internal` | The message is only visible to internal staff — not shared with tenants. |

##### Example

```gql
"external_tenant"
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderSla

##### Fields

| Field Name | Description |
| --- | --- |
| `ruleId` \- [`ID!`](https://partner-api.visitt.io/#definition-ID) | The id of the SLA rule applied to the work order |
| `appliedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time the SLA was applied to the work order |
| `nearestTargetDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The closest SLA target date across all metrics |
| `nearestMetricType` \- [`SlaMetricType`](https://partner-api.visitt.io/#definition-SlaMetricType) | The metric type with the closest target date |
| `metrics` \- [`[WorkOrderSlaMetric]`](https://partner-api.visitt.io/#definition-WorkOrderSlaMetric) | The SLA metrics (acceptance and/or completion) |

##### Example

```json
{
  "ruleId": 4,
  "appliedAt": "2007-12-03T10:15:30Z",
  "nearestTargetDate": "2007-12-03T10:15:30Z",
  "nearestMetricType": "acceptance",
  "metrics": [WorkOrderSlaMetric]
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderSlaMetric

##### Fields

| Field Name | Description |
| --- | --- |
| `type` \- [`SlaMetricType!`](https://partner-api.visitt.io/#definition-SlaMetricType) | The SLA metric type (acceptance or completion) |
| `state` \- [`SlaMetricState!`](https://partner-api.visitt.io/#definition-SlaMetricState) | Current state of this metric |
| `count` \- [`Int`](https://partner-api.visitt.io/#definition-Int) | The numeric value of the SLA target |
| `unit` \- [`SlaTimeUnit`](https://partner-api.visitt.io/#definition-SlaTimeUnit) | The time unit for the SLA target |
| `targetDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The deadline for this metric |
| `riskAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which this metric enters the at-risk zone |
| `metAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which this metric was met |
| `breachedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which this metric was breached |
| `pausedAt` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The time at which this metric was paused |
| `accumulatedPausedTime` \- [`Float`](https://partner-api.visitt.io/#definition-Float) | Total accumulated paused time in milliseconds |

##### Example

```json
{
  "type": "acceptance",
  "state": "running",
  "count": 123,
  "unit": "minutes",
  "targetDate": "2007-12-03T10:15:30Z",
  "riskAt": "2007-12-03T10:15:30Z",
  "metAt": "2007-12-03T10:15:30Z",
  "breachedAt": "2007-12-03T10:15:30Z",
  "pausedAt": "2007-12-03T10:15:30Z",
  "accumulatedPausedTime": 987.65
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderSource

##### Description

The source of where a work order was created.

##### Values

| Enum Value | Description |
| --- | --- |
| `visitt` | Created from the Visitt staff dashboard |
| `portal` | Created from a tenant portal (Visitt+) |
| `api` | Created via the Partner API |
| `integration` | Created via a third-party integration |
| `import` | Created via a data import |
| `server` | Created automatically by the server |

##### Example

```gql
"visitt"
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrderStatus

##### Values

| Enum Value | Description |
| --- | --- |
| `awaiting_acceptance` |  |
| `pending` |  |
| `open` |  |
| `in_progress` |  |
| `completed` |  |
| `canceled` |  |

##### Example

```gql
"awaiting_acceptance"
```

[Types](https://partner-api.visitt.io/#group-Types)

## 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 |
| --- | --- |
| `propertyId` \- [`String`](https://partner-api.visitt.io/#definition-String) | Required for multi-property and customer-scoped partners. Auto-resolved for single-property partners. |
| `description` \- [`String`](https://partner-api.visitt.io/#definition-String) | The description of the work order. max size is 5000 characters. Can't be unset |
| `status` \- [`WorkOrderStatus`](https://partner-api.visitt.io/#definition-WorkOrderStatus) | Status of the work order. Can't be unset |
| `statusText` \- [`String`](https://partner-api.visitt.io/#definition-String) | The text update added to the last status update. Can only be set if status is also set. |
| `assignedUserIds` \- [`[ID!]`](https://partner-api.visitt.io/#definition-ID) | Assigned user ids of the work order. Input will override old value. To unset pass an empty array. |
| `buildingId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The id of the building of the work order. |
| `siteId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | 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` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | The category id of the work order. |
| `subCategoryId` \- [`ID`](https://partner-api.visitt.io/#definition-ID) | 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`](https://partner-api.visitt.io/#definition-Int) | The priority level of the work order. Must be one of the following values:<br>- 40: Critical priority<br>- 30: High priority<br>- 20: Medium priority<br>- 10: Low priority Set to null to remove priority. |
| `isPermittedToEnter` \- [`Boolean`](https://partner-api.visitt.io/#definition-Boolean) | Whether there is permission to enter for service. |
| `permissionToEnterComment` \- [`String`](https://partner-api.visitt.io/#definition-String) | Comment describing permission to enter. Set to null to remove. |
| `dueDate` \- [`DateTime`](https://partner-api.visitt.io/#definition-DateTime) | The due date of the work order in ISO 8601 format. Cannot be set if the work order has an active SLA completion rule. Set to null to remove the due date. |

##### Example

```json
{
  "propertyId": "abc123",
  "description": "abc123",
  "status": "awaiting_acceptance",
  "statusText": "xyz789",
  "assignedUserIds": ["4"],
  "buildingId": 4,
  "siteId": 4,
  "categoryId": 4,
  "subCategoryId": 4,
  "priority": 123,
  "isPermittedToEnter": true,
  "permissionToEnterComment": "abc123",
  "dueDate": "2007-12-03T10:15:30Z"
}
```

[Types](https://partner-api.visitt.io/#group-Types)

## WorkOrdersPaginated

##### Fields

| Field Name | Description |
| --- | --- |
| `items` \- [`[WorkOrder]`](https://partner-api.visitt.io/#definition-WorkOrder) | The work orders. |
| `pageInfo` \- [`PageInfo`](https://partner-api.visitt.io/#definition-PageInfo) | The pagination information of current query. |

##### Example

```json
{
  "items": [WorkOrder],
  "pageInfo": PageInfo
}
```

[Documentation by Anvil SpectaQL](https://github.com/anvilco/spectaql)

Source ID: visitt-watch-997b07d06f · Capture ID: f8bf5d3f4a643bcea05a5070e94c8d3ada871cde236b04ab080ce261310f4e13