{
  "openapi": "3.0.4",
  "info": {
    "title": "Public API",
    "description": "Gorelo Public API documentation.",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/alerts": {
      "post": {
        "tags": [
          "Alerts"
        ],
        "summary": "Posts an external alert against a client for the service provider.",
        "operationId": "post_v1_alerts",
        "requestBody": {
          "description": "Alert details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PostAlertRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAlertRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAlertRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PostAlertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "Lists alerts for the authenticated service provider.",
        "description": "`Title` and `Message` are computed summaries of the alert.\r\n            \n`DismissedOn`/`DismissedBy` are populated only while an alert is dismissed,\r\n            and record when and by whom it was dismissed.\r\n            ",
        "operationId": "get_v1_alerts",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Cursor from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Alerts per page, 1-200. Defaults to 50.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "`desc` (default, newest first) or `asc`. Sorted by `CreatedOn`.",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated status ids: New=1, Dismissed=2, Ticketed=3. Any other id is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TypeIds",
            "in": "query",
            "description": "Comma-separated type ids: Uptime=1, API=2, Script=3, External=4, Slide=5, Huntress=6,\r\nError Event Log=7, Disk Usage=8, Connectivity=9, Process=10, Service=11, Antivirus=12,\r\nRedfish=13, CPU=14, Memory=15, Ping=16, Windows Updates=17, Warranty Expiration=18,\r\nDomain Expiration=19, Contract Expiration=20. 7-17 are device-check alerts, identified by\r\ntheir check type rather than by how the alert was raised. 18-20 carry no device or check;\r\nContract and Domain carry a subject id, Warranty does not. 0 (N/A) matches an alert this scale cannot\r\nname. Any id outside 0-20 is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids. An alert type that carries no client id never matches this filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "DeviceIds",
            "in": "query",
            "description": "Deprecated alias of agentAssetIds. Still accepted; ignored when agentAssetIds is supplied.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "Keeps only alerts raised at or after this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "Keeps only alerts raised strictly before this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "AgentAssetIds",
            "in": "query",
            "description": "Comma-separated agent asset ids (guids).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CustomAssetIds",
            "in": "query",
            "description": "Comma-separated custom asset ids (guids). Matches the alerts about a custom asset: `Warranty Expiration` alerts, and `API` alerts posted with a `CustomAssetId`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UptimeIds",
            "in": "query",
            "description": "Comma-separated uptime ids (guids).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AlertListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/agents": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists agent (managed device) assets for the service provider using cursor pagination.\r\nResults are sorted by `createdOn` descending (newest first).",
        "description": "<b>Agents awaiting adoption</b> - installed but not yet assigned to a client in the app - are\r\n            included. They have `ClientId: null` and `LocationId: null`, and any status. A\r\n            `clientIds` filter leaves them out (they have no client to match), and a co-managed\r\n            technician, who sees only their own clients' agents, never sees them. Once adopted, the same\r\n            agent keeps its `Id` and carries the client and location it was given.",
        "operationId": "get_v1_assets_agents",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated device status ids to include: 1 Unreachable, 2 Online, 3 Offline, 4 Pending Delete, 6 Pending client inactive. Up to 100 ids; any other value is a 400. Deleted and client-inactivated devices are excluded either way.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids to include. Omit for every client.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the device name, display name and description. Up to 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only devices updated at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only devices updated strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only devices created at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only devices created strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAssetListItemResponseListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAssetListItemResponseListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAssetListItemResponseListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/custom": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists custom (non-agent) assets for the service provider using cursor pagination.\r\nResults are sorted by `createdOn` descending (newest first).",
        "operationId": "get_v1_assets_custom",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids to include. Omit for every client.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the asset name, description and serial number. Up to 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only assets updated at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only assets updated strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only assets created at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only assets created strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAssetResponseListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAssetResponseListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAssetResponseListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Creates a custom asset.",
        "description": "The asset is created at a location of the client it belongs to, with one of the service\r\nprovider's custom asset types as its hardware type. Its creation is recorded on the asset's\r\ntimeline, as it is when the asset is created in the app.",
        "operationId": "post_v1_assets_custom",
        "requestBody": {
          "description": "Custom asset details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomAssetCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomAssetCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomAssetCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomAssetCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCustomAssetResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCustomAssetResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCustomAssetResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/custom/{customAssetId}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets a single custom asset by id.",
        "description": "Returns the same fields as an item of `GET /v1/assets/custom`.",
        "operationId": "get_v1_assets_custom_customAssetId",
        "parameters": [
          {
            "name": "customAssetId",
            "in": "path",
            "description": "Custom asset identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAssetResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAssetResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAssetResponseBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Assets"
        ],
        "summary": "Updates a custom asset. Send only the fields you want to change.",
        "description": "An omitted field is left alone, and re-sending a value the asset already holds is a no-op\r\nrather than an error. Sending nothing at all is a 400.\r\n            \r\n`Description`, `ContactId`, `WarrantyEndDate`, `WarrantyStartDate`,\r\n`Manufacturer`, `Model`, `IpAddress` and `SerialNumber` are cleared by\r\nsending them as null. `WarrantyStartDate`, `Manufacturer` and `Model` are kept\r\nfor API callers only: the Gorelo app does not show them, and changing only those records\r\nnothing on the asset's timeline. `Name`, `LocationId` and\r\n`HardwareTypeId` cannot be cleared; null leaves them unchanged.\r\n            \r\nA new `ClientId` moves the asset to that client. The asset's location and contact\r\nmust belong to the new client, so send a `LocationId` of the new client, and a\r\n`ContactId` of it or null, unless the ones the asset holds already belong to it.\r\n            \r\nThe primary contact is also listed under the asset's related items: assigning a contact\r\nadds it there, and replacing or clearing it removes the previous one.",
        "operationId": "patch_v1_assets_custom_customAssetId",
        "parameters": [
          {
            "name": "customAssetId",
            "in": "path",
            "description": "Custom asset to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomAssetCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomAssetCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomAssetCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomAssetCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateCustomAssetResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateCustomAssetResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateCustomAssetResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Assets"
        ],
        "summary": "Deletes a custom asset.",
        "description": "The asset is deactivated rather than removed, the same soft-delete the app performs. Deleting\r\nan already-deleted custom asset succeeds, so a retried request is safe.",
        "operationId": "delete_v1_assets_custom_customAssetId",
        "parameters": [
          {
            "name": "customAssetId",
            "in": "path",
            "description": "Custom asset to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCustomAssetResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCustomAssetResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCustomAssetResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/agents/{agentAssetId}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets a single agent (managed device) asset by id.",
        "operationId": "get_v1_assets_agents_agentAssetId",
        "parameters": [
          {
            "name": "agentAssetId",
            "in": "path",
            "description": "Agent asset identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAssetResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAssetResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAssetResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Assets"
        ],
        "summary": "Deletes an agent (managed device) asset.",
        "description": "This is the same delete the app performs: the RMM agent is uninstalled from the host and the\r\ndevice is deactivated rather than removed, so its history on tickets and contacts survives.\r\nA device that is already deleted or already uninstalling succeeds without a second uninstall\r\ncommand, so a retried request is safe.",
        "operationId": "delete_v1_assets_agents_agentAssetId",
        "parameters": [
          {
            "name": "agentAssetId",
            "in": "path",
            "description": "Device to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAgentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAgentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAgentResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/agents/{agentAssetId}/patches": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists the patches installed on an agent.",
        "description": "The patches the agent reported in its last scan, newest install first, with the time of that\r\nscan. Windows and macOS agents. Not paginated. An agent that has never reported returns\r\n`LastScannedOn: null` and no items.",
        "operationId": "get_v1_assets_agents_agentAssetId_patches",
        "parameters": [
          {
            "name": "agentAssetId",
            "in": "path",
            "description": "Agent asset identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPatchListModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPatchListModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPatchListModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/agents/{agentAssetId}/patches/available": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists the Windows updates pending on an agent.",
        "description": "The updates the agent's last update scan found pending, with the agent's update status. Read\r\nfrom the last scan only: no new scan is started. Windows agents only - a macOS agent is a 400\r\non `DeviceId`. A Windows agent with no scan available returns `LastScannedOn: null`\r\nand no items. Not paginated.",
        "operationId": "get_v1_assets_agents_agentAssetId_patches_available",
        "parameters": [
          {
            "name": "agentAssetId",
            "in": "path",
            "description": "Agent asset identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAvailableUpdateListModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAvailableUpdateListModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAvailableUpdateListModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/agents/{agentAssetId}/apps": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists the applications installed on an agent.",
        "description": "The applications the agent reported in its last scan, sorted by name, with the time of that\r\nscan. Not paginated. An agent that has never reported returns `LastScannedOn: null` and\r\nno items.",
        "operationId": "get_v1_assets_agents_agentAssetId_apps",
        "parameters": [
          {
            "name": "agentAssetId",
            "in": "path",
            "description": "Agent asset identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAppListModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAppListModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAppListModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/agents/{agentAssetId}/hardware": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets an agent's processors, memory and disks.",
        "description": "Processors and disks from the agent's last scan, total memory and the hardware type from the\r\nagent's record. Sizes are in bytes.",
        "operationId": "get_v1_assets_agents_agentAssetId_hardware",
        "parameters": [
          {
            "name": "agentAssetId",
            "in": "path",
            "description": "Agent asset identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHardwareModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHardwareModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHardwareModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/agents/{agentAssetId}/tags": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists the tags on an agent.",
        "description": "Every tag on the agent, returned whole: not paginated. `New` first, then by name. An agent\r\nwith no tags returns an empty list.",
        "operationId": "get_v1_assets_agents_agentAssetId_tags",
        "parameters": [
          {
            "name": "agentAssetId",
            "in": "path",
            "description": "Agent asset identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTagModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTagModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTagModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scripts": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists the service provider's scripts using cursor pagination.",
        "description": "Active scripts only. Scripts form a tree through `ParentScriptId` - the web shows a script\r\nwith children as a folder - and every level is listed unless `parentScriptId` narrows it.\r\nThe list does not include a script's content; `GET /v1/scripts/{scriptId}` does.",
        "operationId": "get_v1_scripts",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1 to 200 (default 50). Any other value is a 400.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "`createdOn` (default) or `updatedOn`.",
            "schema": {
              "type": "string",
              "default": "createdOn"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "`desc` (default) or `asc`.",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "TypeIds",
            "in": "query",
            "description": "Comma-separated script types: 1 Powershell, 2 Command Line, 3 Bash. Any other value is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ParentScriptId",
            "in": "query",
            "description": "Only the scripts directly under this one.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "IsFavorite",
            "in": "query",
            "description": "`true` for favorites only, `false` for the rest.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the title. Up to 200 characters.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ScriptListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScriptListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScriptListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scripts/{scriptId}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets a script, with its content.",
        "description": "Returns the script's current version. An unknown or deleted script is a 404.",
        "operationId": "get_v1_scripts_scriptId",
        "parameters": [
          {
            "name": "scriptId",
            "in": "path",
            "description": "Script identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ScriptDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScriptDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScriptDetailModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/types": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists the asset types.",
        "description": "Every active asset type of the service provider, as `{ Id, Name }`: the defaults (Desktop,\r\nLaptop, Printer and so on) and the ones it added. `Id` is the `Type.Id` an agent asset\r\nor a custom asset carries, and the `HardwareTypeId``POST` and <c>PATCH\r\n/v1/assets/custom</c> accept. Not paginated.",
        "operationId": "get_v1_assets_types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CodeModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/custom/hardware-types": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists the hardware types a custom asset can be given. <b>Deprecated:</b> use `GET /v1/assets/types`.",
        "description": "An alias of `GET /v1/assets/types`, kept with its original shape: the same active asset\r\ntypes, with `CreatedOn` and `UpdatedOn` beside each `Id` and `Name`. Not paginated.",
        "operationId": "get_v1_assets_custom_hardware-types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/HardwareTypeListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardwareTypeListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardwareTypeListItemModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/uptime": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Lists uptime checks for the service provider using cursor pagination.\r\nResults are sorted by `createdOn` descending (newest first).",
        "operationId": "get_v1_uptime",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids to include. Omit for every client.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TypeIds",
            "in": "query",
            "description": "Comma-separated check type ids to include: 1 ICMP, 2 HTTP, 3 TCP.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TagIds",
            "in": "query",
            "description": "Comma-separated tag ids. A check is included if it carries any one of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the check description. Up to 200 characters.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UptimeResponseListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UptimeResponseListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UptimeResponseListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Creates an uptime check.",
        "description": "The check starts running as soon as it is created: it is scheduled in the monitoring region\r\nnamed by `RegionId`, the same way the app schedules one.\r\n            \r\n`Target` has to match `TypeId` - ICMP takes `Ip`, TCP takes `Ip` and\r\n`Port`, HTTP takes `Url` - and sending a field belonging to another type is\r\nrejected rather than ignored.",
        "operationId": "post_v1_uptime",
        "requestBody": {
          "description": "Uptime check details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUptimeCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUptimeCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUptimeCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUptimeCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateUptimeResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateUptimeResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateUptimeResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/uptime/{uptimeId}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets a single uptime check by id.",
        "operationId": "get_v1_uptime_uptimeId",
        "parameters": [
          {
            "name": "uptimeId",
            "in": "path",
            "description": "Uptime identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UptimeResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UptimeResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UptimeResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Assets"
        ],
        "summary": "Updates an uptime check. Send only the fields you want to change.",
        "description": "An omitted field is left alone, and re-sending a value the check already holds is a no-op\r\nrather than an error. Sending nothing at all is a 400.\r\n            \r\n`TagIds` replaces the check's tags outright; an empty array clears them. Changing\r\n`TypeId` requires a `Target` for the new type, because the two are stored\r\ntogether and the old target would not fit.\r\n            \r\n`MaintenanceMode` starts or ends a maintenance window for this check. Omit it to\r\nleave the current state alone; send `Enabled: true` with a start, a duration and a\r\nreason to begin one, or `Enabled: false` on its own to end it. A duration of zero\r\nmeans the window does not expire on its own.",
        "operationId": "patch_v1_uptime_uptimeId",
        "parameters": [
          {
            "name": "uptimeId",
            "in": "path",
            "description": "Uptime to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUptimeCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUptimeCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUptimeCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUptimeCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateUptimeResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateUptimeResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateUptimeResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Assets"
        ],
        "summary": "Deletes an uptime check.",
        "description": "This is the same delete the app performs: the check is deactivated rather than removed, its\r\nmonitoring schedule is cancelled in the region that runs it, and its cached status is cleared.\r\nDeleting an already-deleted check succeeds, so a retried request is safe.",
        "operationId": "delete_v1_uptime_uptimeId",
        "parameters": [
          {
            "name": "uptimeId",
            "in": "path",
            "description": "Uptime to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteUptimeResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteUptimeResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteUptimeResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments": {
      "post": {
        "tags": [
          "Attachments"
        ],
        "summary": "Uploads a file and returns a link to it.",
        "description": "Send it as `multipart/form-data` with the file part named `file`, plus\r\n`itemType` (`Ticket`, `Task`, `Project` or `Document`) and `itemId`.\r\n            \r\nThe record has to exist and be yours - an upload against an unknown id is a 404 rather\r\nthan an orphaned file nothing will ever reference.\r\n            \r\nThe returned url carries a time-limited access token. Pass the **name and url together**\r\nto a comment endpoint to attach the file; the token is stripped before storage and a\r\nfresh one issued on every read, so do not store the url yourself.\r\n            \r\nThe largest accepted upload is 44 MB, and 25 MB for a document. A document's files are\r\nattached by sending the name and url in `Attachments` on\r\n`PATCH /v1/documents/{documentId}`.",
        "operationId": "post_v1_attachments",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "itemType": {
                    "type": "string"
                  },
                  "itemId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                },
                "itemType": {
                  "style": "form"
                },
                "itemId": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CommentAttachmentModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentAttachmentModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentAttachmentModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invoices/{invoiceId}/pdf": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Downloads the rendered PDF for an invoice.",
        "description": "The only endpoint whose success response is not a `BaseResponse<T>` envelope: a\r\n200 is the PDF itself, `application/pdf`, as a file download named after the invoice's\r\ndisplay number (e.g. `INV-1042.pdf`). Errors still use the envelope.\r\n\n\r\nThe document is rendered on demand from the invoice's current data and template, so it\r\nreflects the invoice at request time rather than a stored copy. Each successful download is\r\nrecorded against the invoice as an export event.\r\n",
        "operationId": "get_v1_invoices_invoiceId_pdf",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "Invoice identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing-roles": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists the billing roles configured for the service provider. Use a role's Id as\r\nBillingRoleId when logging time against a ticket.",
        "operationId": "get_v1_billing-roles",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRoleModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRoleModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRoleModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/work-types": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists the work types configured for the service provider. Use a work type's Id as\r\nWorkTypeId when logging time against a ticket.",
        "operationId": "get_v1_work-types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WorkTypeModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkTypeModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkTypeModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/taxes": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists the tax rates configured for the service provider.",
        "description": "Read-only. Tax rates usually originate in the connected accounting system (Xero or\r\nQuickBooks) rather than being managed in Gorelo, so there is no create, update or delete\r\nhere.\r\n\n\r\nThis is the lookup for every tax reference the API emits: a product category's\r\n`TaxId` and a contract line item's `Tax.Id` are the same identifier as\r\n`Id` here, so a tax seen on any endpoint is resolved by finding it in this list.\r\n\n`Percentage` is the rate itself and `IsDefault` marks the rate applied when none\r\nis chosen. Only active rates are listed; a service provider with none configured gets an\r\nempty list rather than a 404.\r\n\n`SubTaxes` carries the component rates a tax is broken into, for accounting systems\r\nthat split one tax into parts - HST as GST plus PST, for example - and is an empty array\r\nfor the common case of a tax with no components. Where components exist they are what\r\ngets charged: the amount is the sum of each component's `Percentage`, and the\r\nparent's own `Percentage` is not applied on top of them. Only active components are\r\nlisted.\r\n",
        "operationId": "get_v1_taxes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TaxModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/time-entries": {
      "get": {
        "tags": [
          "Billing",
          "Tickets"
        ],
        "summary": "Lists logged time across every ticket and task, narrowed by any of the filters.",
        "description": "One flat collection rather than a list per ticket, because time is pulled across tickets for\r\nbilling sync, reporting and dashboards. Pass `ticketIds` to get a single ticket's time.\r\n\n\r\nEvery filter is optional and combining two narrows to the entries that satisfy both. Each id\r\nfilter is a comma-separated list and an entry matches if its id is any of them; a value that\r\nis not an id is rejected with 400. A well-formed value that matches nothing — a client id\r\nthat does not exist, a ticket with no logged time — is an empty page, not a 404. Timestamps\r\nare UTC; each `...Since` bound includes the instant it names and each `...Before`\r\nbound excludes it, so two windows sharing an edge tile instead of both returning the entry\r\non it.\r\n\n`ActualHours` is the duration actually logged. `AdjustedHours` is the duration after\r\nthe work type's minimum and increment rounding, and is null when no rounding applied — in\r\nthat case the billed duration is simply `ActualHours`.\r\n\n\r\nEach entry names what it was logged against: an entry hangs off either a ticket or a task, so\r\none of `Ticket` and `Task` carries the id, number and title, and the other is null.\r\n",
        "operationId": "get_v1_time-entries",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page. Only valid against the same filters that produced it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids; keeps only time entries billed to any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "LocationIds",
            "in": "query",
            "description": "Comma-separated client location ids; keeps only time entries whose ticket sits at any of them. Entries logged against a task have no location and are excluded.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TicketIds",
            "in": "query",
            "description": "Comma-separated ticket ids; keeps only time entries logged against any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TaskIds",
            "in": "query",
            "description": "Comma-separated task ids; keeps only time entries logged against any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserIds",
            "in": "query",
            "description": "Comma-separated user ids; keeps only time entries belonging to any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "InvoiceIds",
            "in": "query",
            "description": "Comma-separated invoice ids; keeps only time entries billed on any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only time entries whose work started at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "StartedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only time entries whose work started strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only time entries created at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only time entries created strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only time entries updated at or after it. An entry that has never been changed is excluded.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only time entries updated strictly before it. An entry that has never been changed is excluded.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Billing",
          "Tickets"
        ],
        "summary": "Logs time against a ticket.",
        "description": "StartedOn and EndedOn are single UTC instants and ActualHours is decimal hours. Supply any two\r\nof the three and the third is derived; sending all three is accepted only when ActualHours\r\nagrees with the span between the two instants.\r\n\n\r\nThe logged duration is rounded up by the work type's minimum and increment, so the billed\r\nduration can exceed the elapsed time between start and end. Supplying a ServiceLineId\r\nprices the entry against that contract and moves its hour allowance: a BlockHours contract\r\nhas the entry's hours drawn down, and a LimitedHours contract covers the entry up to its\r\nremaining allowance and bills only the overage beyond it.\r\n\n\r\nThe entry is billed to the ticket's client; the client is not sent in the request. A ticket\r\nwith no client is rejected with 409, as it is in the app, which blocks logging time on such a\r\nticket. Assign a client to the ticket and the same request succeeds.\r\n\n\r\nA client on credit hold cannot have time logged against it and is rejected with 409, as it is\r\nin the app, which disables Add Time for such a client. Clear the credit hold and the same\r\nrequest succeeds.\r\n\n\r\nA closed ticket is rejected with 409 for the same reason: the app disables Add Time once a\r\nticket is closed. Solved, Merged and Cancelled tickets still accept time. Reopen the ticket\r\nand the same request succeeds.\r\n",
        "operationId": "post_v1_time-entries",
        "requestBody": {
          "description": "Time entry to create, including the ticket to log it against.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTimeEntryCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTimeEntryCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTimeEntryCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTimeEntryCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTimeEntryResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTimeEntryResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTimeEntryResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/time-entries/{timeEntryId}": {
      "get": {
        "tags": [
          "Billing",
          "Tickets"
        ],
        "summary": "Gets a single time entry by id.",
        "description": "The same shape as one item of `GET /v1/time-entries`, so a caller can follow up a page\r\nwith a single read, or re-read an entry after changing it, without a second mapping. The entry\r\nis addressed by its id alone; the authenticated service provider is what scopes the lookup, so\r\nan entry belonging to another service provider is reported as not found, and so is a deleted\r\none - the list does not show it either.",
        "operationId": "get_v1_time-entries_timeEntryId",
        "parameters": [
          {
            "name": "timeEntryId",
            "in": "path",
            "description": "Time entry to read.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Billing",
          "Tickets"
        ],
        "summary": "Partially updates a time entry. Send only the fields you want to change.",
        "description": "Every field is optional and a field left out keeps its current value, so a body of `{}`\r\nis accepted and returns the entry unchanged. Re-supplying a value the entry already holds is a\r\nno-op: nothing is written, the entry's UpdatedOn does not move and no contract hours move.\r\nThe response is the updated entry, in the same shape `GET /v1/time-entries/{timeEntryId}` returns.\r\n\n\r\nStartedOn, EndedOn and ActualHours are merged with the entry's current values before the same\r\nany-two-of-three rule the create applies. Send two and the third is derived from those two;\r\nsend all three and they must agree. Send StartedOn or EndedOn alone and the other instant is\r\nkept, so the duration changes with it; send ActualHours alone and StartedOn is kept and\r\nEndedOn moves, so the duration is exactly what was sent.\r\n\n\r\nWhenever the duration, work type, billing role, billable status or service line changes, the\r\nentry is re-priced exactly as a new entry with the merged values would be: the work type's\r\nminimum and increment rounding, the role's rate and the contract's terms are applied afresh,\r\nand the hours the entry consumes from a BlockHours or LimitedHours contract are returned to\r\nthe old contract and drawn from the new. UserId, BillingRoleId, WorkTypeId, ServiceLineId\r\nand BillableStatusId are validated the same way the create validates them.\r\n\n\r\nThe ticket an entry is logged against cannot be changed, and neither can its attachments: a\r\nbody carrying `TicketId` or `Attachments` is rejected with 400, as any unknown field\r\nis. To move time to another ticket, delete the entry and log it against the other ticket.\r\n\n\r\nOnly a time entry that is still open can be changed. One that has been approved, completed or\r\ninvoiced is rejected with 409, as is one that is void. The ticket's own status does not matter:\r\ntime on a closed ticket that has not yet been billed can still be corrected here, exactly as the\r\nApprove & Invoice flow corrects it, so there is nothing to reopen first. Reverse the approval\r\nand the same request succeeds. Note that deleting such an entry is still refused while its\r\nticket is closed - correcting time and removing it are not the same act.\r\n",
        "operationId": "patch_v1_time-entries_timeEntryId",
        "parameters": [
          {
            "name": "timeEntryId",
            "in": "path",
            "description": "Time entry to update.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTimeEntryCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTimeEntryCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTimeEntryCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTimeEntryCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Billing",
          "Tickets"
        ],
        "summary": "Deletes a time entry.",
        "description": "The entry is addressed by its id alone; the authenticated service provider is what scopes the\r\nlookup, so an entry belonging to another service provider is reported as not found.\r\n\n\r\nOnly a time entry that is still open can be deleted. One that has been approved, completed or\r\ninvoiced is rejected with 409, as is one that is void — deleting a settled entry would return it to the\r\nopen pipeline while an invoice still bills the same hours. Reversing an approved or invoiced\r\nentry is a separate, explicit flow: delete the invoice item, then unapprove. An entry logged\r\nagainst a ticket that is closed is rejected with 409 as well, whatever its own billing state —\r\nreopen the ticket first.\r\n\n\r\nFor an entry that is still open, this behaves exactly as the app's delete does, which is a\r\ntwo-step: an entry waiting for approval is returned to unclosed and stays where it is, and\r\ndeleting it again deactivates it and reverts its billing ledger. The response's\r\n`outcome` says which happened — `Reopened` or `Deleted`. Deleting an entry that\r\nis already deleted is accepted and reports `Deleted` without touching the ledger again.\r\n",
        "operationId": "delete_v1_time-entries_timeEntryId",
        "parameters": [
          {
            "name": "timeEntryId",
            "in": "path",
            "description": "Time entry to delete.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTimeEntryResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTimeEntryResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTimeEntryResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/contracts": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists billing contracts, each with the service lines it is made of.",
        "description": "A contract is the agreement with a client; a service line is one set of labour terms and\r\nproducts inside it. Most contracts have a single service line. A service line's id is the\r\nsame identifier a time entry's `ServiceLineId` carries, so a contract's service lines\r\nare what a time entry can be billed against.\r\n\n\r\nService lines ride inside the contract rather than being fetched per contract, so a page of\r\ncontracts costs a fixed number of queries. Every filter is optional; the client filter is a\r\ncomma-separated list and a contract matches if its client is any of them. A well-formed value\r\nthat matches nothing - a client id that owns no contracts - is an empty page, not a 404.\r\nTimestamps are UTC; `StartDate` and `EndDate` are stored as dates, so they are\r\nalways midnight.\r\n\n`Status` is derived, because a contract has no stored status: 3 `Archived` when\r\nthe contract has been archived, 2 `Expired` when its end date is behind the service\r\nprovider's own today, and 1 `Active` otherwise. Deleted contracts are not listed at\r\nall. Archived contracts are left out unless `statusIds` names Archived; expired ones\r\nare listed by default, so a caller that wants only live contracts passes\r\n`statusIds=1`.\r\n\n`RecurringAmount` and `RecurringCost` cover the products billed on the contract's\r\nown recurring schedule, excluding one-off lines. Amount is before tax; cost is the unit cost\r\nrecorded against each product line multiplied by its quantity, so the difference between\r\nthem is the periodic margin. A contract's two figures are exactly the sum of its service\r\nlines'.\r\n\n`LaborTerms` says how a service line bills time - Unlimited Hours, Hourly, Block Hours,\r\nNo Labor Terms, or Limited Hours - and `LaborRates` says how an hour is priced for the\r\ntwo that bill hourly, and is null for the rest.\r\n",
        "operationId": "get_v1_contracts",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page. Only valid against the same filters that produced it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids; keeps only contracts billed to any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated status ids: 1 Active, 2 Expired, 3 Archived. Omitted returns Active and Expired (archived excluded). Any other id is a 400.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContractModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/contracts/{contractId}": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Everything about one contract, including each service line's actual products/labor.",
        "description": "Adds the resolved `Client`, the invoice schedule (`DaysBeforeInvoiceCreation`,\r\n`InvoiceDue`, `AutoApproveAndSend`), `Contacts`, and on each service line one\r\nfilled labor-terms-detail object (`UnlimitedHoursDetails`/`PerHourDetails`/\r\n`LimitedHoursDetails`/`BlockHoursDetails`, matching `LaborTerms`) plus\r\n`LineItems` — the actual products/labor billed on that line, empty when there's\r\nnothing billed yet. A non-existent id, or one belonging to another service provider, is a\r\n404.",
        "operationId": "get_v1_contracts_contractId",
        "parameters": [
          {
            "name": "contractId",
            "in": "path",
            "description": "Identifier of the contract.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContractDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractDetailModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Billing"
        ],
        "summary": "Deletes a contract.",
        "description": "Blocked with 409 if the contract has ever had an invoice generated from it — a contract\r\nwith real billing history can't be deleted by accident. Deleting a contract that's already\r\ndeleted is accepted as a no-op. A non-existent id, or one belonging to another service\r\nprovider, is a 404.",
        "operationId": "delete_v1_contracts_contractId",
        "parameters": [
          {
            "name": "contractId",
            "in": "path",
            "description": "Identifier of the contract.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteContractResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteContractResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteContractResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invoices": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists the service provider's invoices, filtered and sorted.",
        "description": "Every filter is optional and combining two narrows to invoices that satisfy both. Each id\r\nfilter is a comma-separated list and an invoice matches if its id is any of them; a value\r\nthat is not an id is rejected with 400. A well-formed value that matches nothing is an empty\r\npage, not a 404. Deleted invoices are never listed.\r\n\n`SubTotal` is the line-item total before discount and tax; `Total` is\r\n`SubTotal - TotalDiscount + TotalTax`. `AmountPaid` is computed live from recorded\r\npayments, and `AmountDue` is `Total - AmountPaid`, floored at 0.\r\n\n`InvoiceDate` and `DueDate` are calendar dates. `InvoiceDateSince`/`Before`\r\nand `DueDateSince`/`Before` bound them the same way every other date filter on this\r\nsurface does: the lower bound includes the day it names and the upper bound excludes it.\r\n\n`SortBy` is one of `createdOn` (default), `updatedOn`, `date` (InvoiceDate),\r\n`dueDate` or `totalAmount`; `SortOrder` is `asc` or `desc` (default).\r\n",
        "operationId": "get_v1_invoices",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page. Only valid against the same filters and sort that produced it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page. 1-200 (default 50); out of range is a 400, never clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids; keeps only invoices billed to any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated status ids: 1 Draft, 2 Submitted, 3 Paid, 4 Void, 5 Approved. Any other id is a 400. Omitted returns every status; deleted invoices are never listed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ContractIds",
            "in": "query",
            "description": "Comma-separated contract ids; keeps only invoices raised from any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Number",
            "in": "query",
            "description": "Exact match on the invoice's bare sequential number (the wire's `Number`, not `DisplayNumber`). A value that does not parse as a whole number is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "InvoiceDateSince",
            "in": "query",
            "description": "Keeps only invoices dated at or after this date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "InvoiceDateBefore",
            "in": "query",
            "description": "Keeps only invoices dated strictly before this date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "DueDateSince",
            "in": "query",
            "description": "Keeps only invoices due at or after this date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "DueDateBefore",
            "in": "query",
            "description": "Keeps only invoices due strictly before this date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "IsEmailSent",
            "in": "query",
            "description": "Keeps only invoices that have (true) or have not (false) been emailed to the client.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "Keeps only invoices created at or after this instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "Keeps only invoices created at or before this instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "Keeps only invoices last updated at or after this instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "Keeps only invoices last updated at or before this instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Free-text search against the invoice number, reference and name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort field: createdOn (default), updatedOn, date, dueDate or totalAmount.",
            "schema": {
              "type": "string",
              "default": "createdOn"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "Sort direction: asc or desc (default).",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Raises a manual invoice against a client, with line items.",
        "description": "<b>Required:</b>\r\n`ClientId`, and at least one line item with `ItemId` and\r\n            `Quantity`.\r\n            \n<b>Optional:</b>`StatusId` (defaults to Draft), `InvoiceDate` (defaults to\r\n            today), `DueDate` (defaults to `InvoiceDate`), `Reference`,\r\n            `RecipientEmails`. Per line: `UnitPrice`, `UnitCost`, `TaxId`,\r\n            `CoaCode`, `Description`, `BillableStatusId` and `DiscountPercent` each\r\n            fall back to the referenced item's own value when omitted.\r\n            \n`StatusId` is `1` (Draft) or `5` (Approved). Approving on create also pushes\r\n            the invoice to the connected accounting system. An Approved invoice whose total comes to\r\n            exactly `0` is created as Paid instead - check `Status` on the response rather\r\n            than assuming it matches what you sent.\r\n            \nThe response is just the created invoice's `Id` - the same shape Create Ticket\r\n            and Create Time Entry return.",
        "operationId": "post_v1_invoices",
        "requestBody": {
          "description": "The invoice to create.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInvoiceResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInvoiceResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInvoiceResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invoices/{invoiceId}": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Gets one invoice, with its attachments and line items.",
        "description": "Same fields as `GET /v1/invoices`, plus `Description`, `Attachments` and\r\n`LineItems`. An invoice that does not exist, or belongs to another service provider,\r\nis a 404 - the two are never distinguished.\r\n\n\r\nA bundle is one line: its quantity, price, cost, amount and tax are the bundle's, and\r\n`SubItems` lists the items inside it. Every other line has `SubItems: []`.\r\n\n\r\nEach attachment's `Url` is a temporary download link and expires - don't store it.\r\n",
        "operationId": "get_v1_invoices_invoiceId",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "Invoice identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDetailModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Billing"
        ],
        "summary": "Deletes or voids an invoice, depending on its current status.",
        "description": "Mirrors the app's own delete/void action on the invoice list - one endpoint, the outcome\r\ndepends on the invoice's current status:\r\n<list type=\"table\"><item><term>Draft</term><description>Deleted - the response's `StatusId` is 6\r\n(Deleted), and the invoice is gone from `GET /v1/invoices` entirely.</description></item><item><term>Approved</term><description>Voided instead - the response's `StatusId` is\r\n4 (Void), and the invoice stays visible on `GET /v1/invoices`.</description></item><item><term>Any other status</term><description>Refused with 409 - only a Draft or\r\nApproved invoice can be removed this way.</description></item></list>\n\r\nA delete or void also sends the status change to the connected accounting system, as the\r\napp's own delete/void does.\r\n\n\r\nDeleting an invoice that's already deleted, or already void, is treated as success. An\r\ninvoice that doesn't exist, or belongs to another service provider, is a 404 - the two are\r\nnever distinguished.\r\n",
        "operationId": "delete_v1_invoices_invoiceId",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "Invoice identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteInvoiceResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteInvoiceResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteInvoiceResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payments": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Records a payment received outside Gorelo against an approved invoice.",
        "description": "<b>Required:</b>\r\n`InvoiceId`, `PaymentDate` and `Reference`.\r\n            \n<b>Optional:</b>`Amount` - defaults to the invoice's whole amount due. It must be\r\n            greater than 0 and no more than what the invoice still owes, so an invoice cannot be\r\n            overpaid. `PaymentDate` is a calendar date and cannot be later than today in the\r\n            service provider's time zone.\r\n            \n\r\n            The invoice must be Approved. A payment that leaves nothing owing marks the invoice Paid;\r\n            otherwise its status is unchanged. The payment is added to the invoice's timeline and\r\n            appears in `Payments` on `GET /v1/invoices/{invoiceId}`.\r\n            \n\r\n            Refused with 409 while the service provider has Xero or QuickBooks Online connected - record\r\n            the payment there instead and it syncs to Gorelo. An invoice that doesn't exist, or belongs\r\n            to another service provider, is a 404.\r\n            \nThe response is just the recorded payment's `Id`.",
        "operationId": "post_v1_payments",
        "requestBody": {
          "description": "The payment to record.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePaymentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePaymentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePaymentResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payments/{paymentId}": {
      "delete": {
        "tags": [
          "Billing"
        ],
        "summary": "Deletes a payment that was recorded through the API.",
        "description": "Only a payment recorded through `POST /v1/payments` can be deleted; any other payment -\r\nrecorded in Gorelo or synced from an accounting system - is refused with 409. Also refused\r\nwith 409 while Xero or QuickBooks Online is connected.\r\n\n\r\nIf the payment had settled an invoice that now owes money again, the invoice goes back from\r\nPaid to Approved. A payment that doesn't exist, has already been deleted, or belongs to\r\nanother service provider is a 404.\r\n",
        "operationId": "delete_v1_payments_paymentId",
        "parameters": [
          {
            "name": "paymentId",
            "in": "path",
            "description": "Payment identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePaymentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePaymentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePaymentResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/items/categories": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists the categories products are organised under, each with its subcategories.",
        "description": "One level of nesting: a category holds subcategories, and a subcategory holds none.\r\n`Subcategories` is always present and is an empty array for a category that has none.\r\n\n`TaxId` is the tax rate assigned to the category, resolvable against\r\n`GET /v1/taxes`, and null when none is assigned. A subcategory does not report one.\r\n\n\r\nOnly categories are listed at the top level, and deleted rows are not listed at all.\r\nCategory ids and subcategory ids are issued independently, so the same number can name one\r\nof each - so a subcategory id is only meaningful alongside the category it is nested under.\r\n\n\r\nThe category surface is read-only: this list is the whole of it, and categories and\r\nsubcategories are created, changed and removed in the Gorelo app.\r\n",
        "operationId": "get_v1_items_categories",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCategoryModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCategoryModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCategoryModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/items": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists the service provider's item catalog: products and bundles.",
        "description": "All filters are optional and combine with AND.\r\n\n\r\nOne resource for both kinds of item — `Type` says which. A bundle is a product made\r\nof other products; an invoice line references either kind through one `ItemId`. Labor\r\nitems are internal to contract pricing, are not creatable in the app, and are never\r\nreturned here.\r\n\n`Status` reflects whether the item is archived: 1 Active, 2 Archived. Archived items\r\nare left out unless `statusIds` names Archived.\r\n\n`CategoryId`, `SubcategoryId`, `ClientId` and `LocationId` are bare\r\nids — resolve a category/subcategory against `GET /v1/items/categories`.\r\n",
        "operationId": "get_v1_items",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page. Only valid against the same filters that produced it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page. Rejected with a 400 outside 1-200 (default 50).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "TypeIds",
            "in": "query",
            "description": "Comma-separated item type ids (1 Product, 2 Bundle).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CategoryIds",
            "in": "query",
            "description": "Comma-separated category ids.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SubcategoryIds",
            "in": "query",
            "description": "Comma-separated subcategory ids.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Skus",
            "in": "query",
            "description": "Comma-separated SKUs, matched exactly.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Vendors",
            "in": "query",
            "description": "Comma-separated vendor names, matched exactly.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PartNumbers",
            "in": "query",
            "description": "Comma-separated manufacturer part numbers, matched exactly.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated status ids: 1 Active, 2 Archived. Omitted returns Active only (archived excluded). Any other id is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Free-text keyword matched against Name and Description. Max 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "Only items created on or after this UTC instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "Only items created on or before this UTC instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "Only items last changed on or after this UTC instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "Only items last changed on or before this UTC instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ItemListModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemListModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemListModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Creates a product or a bundle in the item catalog.",
        "description": "<b>Required:</b>\r\n`TypeId` (`1` Product or `2` Bundle) and `Name`.\r\n            \n<b>Product only:</b>`Sku`, `PartNumber`, `Manufacturer`, `UnitCost`.\r\n            \n<b>Bundle only:</b>`SubItems` (required for a bundle, at least one),\r\n            `ShowSubItemsOnInvoice`, `ShowSubItemDescriptionsOnInvoice`. A bundle's\r\n            `UnitCost` is calculated from its sub-items and can't be sent directly.\r\n            \n<b>Optional for either type:</b>`Number`, `Description`, `CategoryId`,\r\n            `SubcategoryId`, `ClientId`, `LocationId`, `Vendor`, `UnitPrice`,\r\n            `TaxId`, `ExternalProductId`.\r\n            \n\r\n            Sending a Product-only field on a Bundle, or a Bundle-only field on a Product, is a 400.\r\n            A `SubItems` entry can't itself be a bundle — bundles can't nest.\r\n            ",
        "operationId": "post_v1_items",
        "requestBody": {
          "description": "The item to create.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateItemCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateItemCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateItemCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateItemCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateItemResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateItemResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateItemResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/items/{itemId}": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "A single catalog item — a product or a bundle.",
        "description": "Adds `SubItems` over the list shape: the bundle's component products, each with the\r\nquantity and the cost/price it carried when added. Present only for a bundle; null for a\r\nproduct. A non-existent id, or one belonging to another service provider, is a 404.",
        "operationId": "get_v1_items_itemId",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Identifier of the item.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDetailModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Billing"
        ],
        "summary": "Partially updates an item. Send only the fields you want to change.",
        "description": "<b>All fields are optional</b> — a field left out keeps its current value, so a body of\r\n            `{}` is accepted and is a no-op. The response is just the item's `Id`, the same\r\n            shape as `POST /v1/items` and `DELETE /v1/items/{itemId}` - fetch\r\n            `GET /v1/items/{itemId}` separately to see the updated item.\r\n            \n`TypeId` can never be changed — present in the body at all, including as\r\n            `null`, is a 400. Which fields are accepted depends on the item's current type, the\r\n            same Product/Bundle split as on create (see `POST /v1/items`).\r\n            \n\r\n            Clearing conventions, per field: `Name`, `Number`, `UnitPrice`,\r\n            `UnitCost` and `StatusId` are not clearable — a supplied blank/invalid value is\r\n            a 400, and `null` or omitting the field leaves it unchanged.\r\n            `Description`, `Sku`, `PartNumber`, `Manufacturer`, `Vendor` and\r\n            `ExternalProductId` are free text — an empty string clears the field, `null` or\r\n            omitting it leaves it unchanged. `CategoryId`, `SubcategoryId`, `ClientId`,\r\n            `LocationId` and `TaxId` clear via `0`; `null` or omitting the field\r\n            leaves it unchanged. `SubItems` is bundle-only: an empty array clears the bundle down\r\n            to no sub-items, `null` or omitting it leaves the current sub-items unchanged, and a\r\n            non-empty array fully replaces them and recomputes `UnitCost`.\r\n            \nRe-supplying a value the item already holds is a no-op.",
        "operationId": "patch_v1_items_itemId",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateItemResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateItemResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateItemResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Billing"
        ],
        "summary": "Deletes an item.",
        "description": "Blocked with 409 if the item is a sub-item of any bundle, or is billed on any contract —\r\nevery blocker that applies is listed in the one response. Remove it from the\r\nbundle(s)/contract(s) first, and the identical request then succeeds. An archived item\r\ncan be deleted.\r\nDeleting a bundle does not delete its own sub-items. Being referenced on an existing\r\ninvoice does not block delete — an invoice line keeps its own frozen name, description and\r\nmoney, independent of the item row.",
        "operationId": "delete_v1_items_itemId",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteItemResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteItemResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteItemResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Lists clients for the service provider using cursor pagination.\r\nResults are sorted by client id ascending (oldest first).",
        "operationId": "get_v1_clients",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated client status ids to include: 1 Active, 3 Credit hold, 4 Archived. Default excludes Archived; when supplied, only the listed statuses are returned. Any other value is a 400. Up to 100 values. Deleted clients are never listed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the client name, alternate name, billing name and web domains. Up to 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GroupIds",
            "in": "query",
            "description": "Comma-separated group ids (from GET /v1/organization/groups); keeps clients subscribed to any of them. Up to 100 values.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only clients updated at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only clients updated strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only clients created at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only clients created strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ClientListItemResponseListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientListItemResponseListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientListItemResponseListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Creates a client (and its default location) for the service provider.",
        "operationId": "post_v1_clients",
        "requestBody": {
          "description": "Client details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClientCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClientCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClientCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClientCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/{clientId}": {
      "patch": {
        "tags": [
          "Clients"
        ],
        "summary": "Updates an existing client. Only supplied (non-null) fields are changed.",
        "operationId": "patch_v1_clients_clientId",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client to update.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Client fields to update.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClientCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClientCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClientCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClientCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Gets a single client by id.",
        "description": "A deleted client is not found (404), the same as an id that does not exist. An Archived client is returned.",
        "operationId": "get_v1_clients_clientId",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Clients"
        ],
        "summary": "Deletes a client.",
        "description": "The client is marked inactive, not removed, so its history stays intact while it disappears\r\nfrom every list. A client that still has records attached to it cannot be deleted: assets,\r\nopen tickets, active contacts, contracts, products, bundles or active web domains all block\r\nit, and the 409 message names what is blocking and how many. The app warns about these and\r\ndeletes anyway; this endpoint refuses so nothing is lost to a request that cannot be undone.\r\nDeleting an already-deleted client succeeds, so a retried request is safe.",
        "operationId": "delete_v1_clients_clientId",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client to delete.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteClientResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteClientResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteClientResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clients/{clientId}/locations": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Lists the locations for a given client.",
        "operationId": "get_v1_clients_clientId_locations",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ClientLocationResponseListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientLocationResponseListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientLocationResponseListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/contacts/{contactId}": {
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Deletes a contact.",
        "description": "The contact is marked inactive, not removed, so its history on tickets and conversations\r\nstays intact while it disappears from every list. A contact still attached to an unclosed\r\nticket, as its primary contact or in its secondary contacts, cannot be deleted, and the 409\r\nmessage says how many tickets are holding it. The app detaches the contact from those\r\ntickets itself; this endpoint will not edit a caller's tickets as a side effect, so it\r\nrefuses and leaves the reassignment to the caller. Deleting an already-deleted contact\r\nsucceeds, so a retried request is safe.",
        "operationId": "delete_v1_contacts_contactId",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "description": "Contact to delete.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteContactResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteContactResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteContactResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Gets a single contact by id.",
        "operationId": "get_v1_contacts_contactId",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "description": "Contact identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Updates an existing contact.",
        "operationId": "patch_v1_contacts_contactId",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "description": "Contact to update.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Contact fields to update.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Lists contacts for the service provider using cursor pagination, optionally filtered by client.\r\nResults are sorted by contact id ascending (oldest first).",
        "operationId": "get_v1_contacts",
        "parameters": [
          {
            "name": "ClientId",
            "in": "query",
            "description": "Deprecated single-client filter, superseded by clientIds. Still accepted;\r\nignored when clientIds is supplied.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids to include. Omit for every client.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated contact status ids to include: 1 Active, 3 Temporary, 4 Archived. Default excludes Archived; when supplied, only the listed statuses are returned. Any other value is a 400. Up to 100 values. Deleted contacts are never listed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the contact email addresses, first name and last name. Up to 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only contacts updated at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only contacts updated strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only contacts created at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only contacts created strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Creates a contact under a client, or a temporary contact when no client is given.",
        "description": "With a ClientId the contact belongs to that client. Without one it is created as a temporary\r\ncontact (IsTemporaryContact true) with no client and no location - the kind of contact an\r\nemail from an unknown requester creates - and it can be used as the contact or a cc contact\r\non a ticket that has no client. A LocationId needs a ClientId.\r\n            \r\nIf another contact, active or temporary, already has the primary email address, nothing is\r\ncreated and the response is a 409 whose message carries that contact's id: use it rather\r\nthan retrying. This endpoint never updates an existing contact.",
        "operationId": "post_v1_contacts",
        "requestBody": {
          "description": "Contact details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deletions": {
      "get": {
        "tags": [
          "Deletions"
        ],
        "summary": "Lists records that have been deleted, so a copy kept in sync through this API can remove\r\nthem. Results are sorted by `DeletedOn` ascending, then type id, then id, using cursor\r\npagination.",
        "description": "Each record appears once, with its latest deletion; this is not a history. A record\r\nrestored in the Gorelo app leaves this feed and appears in its normal list again.\r\n`DeletedOn` is the deleted record's last update, so it can move later if the deleted\r\nrecord is edited.\r\n            \r\nA contact is listed here when it was deleted, and also when its client was deleted, since\r\n`GET /v1/contacts` stops listing a deleted client's contacts. Such a contact's\r\n`DeletedOn` is the later of the contact's and the client's last update. In the same\r\nway, a task is listed when it was deleted and also when its project was deleted, with the\r\nlater of the task's and the project's last update.\r\n            \r\nAn invoice is listed when it was deleted. A voided invoice is not deleted: it is still\r\nreturned by `GET /v1/invoices`.\r\n            \r\nA record with no recorded last update has no deletion time and is not listed.\r\n            \r\nEach type needs read access on its own scope: clients `Clients`, contacts\r\n`Contacts`, contracts, items and invoices `Billing`, tickets `Tickets`,\r\ncustom assets `Assets`, projects and tasks `Project`. Asking for a type the key\r\ncannot read is a 403 with code `070208` on `TypeIds`.",
        "operationId": "get_v1_deletions",
        "parameters": [
          {
            "name": "TypeIds",
            "in": "query",
            "description": "Required. Comma-separated record types to include: 1 Client, 2 Contact, 3 Contract, 4 Ticket, 5 Item, 6 Invoice, 7 Custom asset, 8 Project, 9 Task, 10 Agent asset. Up to 10 values; any other value is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Since",
            "in": "query",
            "description": "ISO-8601 UTC timestamp; keeps only deletions at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionResponseListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionResponseListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionResponseListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists the service provider's documents.",
        "description": "Active documents only, unless statusIds names Archived. Archiving a\r\ndocument archives every document below it. To pick up only what changed since a previous\r\nsync, pass updatedSince: a new document counts as updated when it was\r\ncreated, so it is included.",
        "operationId": "get_v1_documents",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated status ids: 1 Active, 2 Archived. Omitted returns Active only (archived excluded). Any other id is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids. Returns only those clients' documents, never internal ones.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IsInternal",
            "in": "query",
            "description": "`true` for internal documents only, `false` for client documents only.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ParentDocumentId",
            "in": "query",
            "description": "Only the documents nested directly under this document.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "IsStarred",
            "in": "query",
            "description": "Keeps only starred (`true`) or unstarred (`false`) documents.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsPublishedToPortal",
            "in": "query",
            "description": "Keeps only documents published (`true`) or not published (`false`) to the client portal.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsPublicLinkEnabled",
            "in": "query",
            "description": "Keeps only documents whose public link is on (`true`) or off (`false`).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the title. Max 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "Keeps only documents updated at or after this UTC instant (ISO 8601). A document never edited since it was created counts as updated at its creation time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "Keeps only documents updated strictly before this UTC instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "Keeps only documents created at or after this UTC instant. Restoring a version resets a document's created time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "Keeps only documents created strictly before this UTC instant.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort field: `createdOn` (default), `updatedOn` or `documentOrder` (the order the app shows siblings in; use it with parentDocumentId).",
            "schema": {
              "type": "string",
              "default": "createdOn"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "Sort direction: `asc` or `desc` (default).",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Creates a document.",
        "description": "The document goes last among the documents that share its parent. Under a parent it takes\r\nthe parent's client; the parent has to exist and not be archived.\r\n            \r\n`Body` must not embed images as `data:` URLs: upload each image with\r\n`POST /v1/attachments` and use the url it returns. Links in the body to other\r\ndocuments, devices, custom assets, contacts, passwords and structured documents are added\r\nto the document's related items, as the app adds them.\r\n            \r\nAttach files after creating, with `PATCH /v1/documents/{documentId}`.",
        "operationId": "post_v1_documents",
        "requestBody": {
          "description": "The document.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Gets a single document.",
        "description": "The body is the current version's. `Children` are the documents nested directly under\r\nthis one. Version history is its own endpoint, `GET /v1/documents/{documentId}/versions`.",
        "operationId": "get_v1_documents_documentId",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Documents"
        ],
        "summary": "Updates a document.",
        "description": "Send only what changes. A changed `Title` or `Body` is saved as a new version.\r\n            \r\n`StatusId` 2 archives the document and every document below it, at any depth; 1\r\nrestores an archived document to the top level, and the documents below it stay archived.\r\n`Move` puts the document under another parent, or at the top level of a client (or\r\ninternal), last among its new siblings, and gives everything nested under it the same client.\r\n            \r\n`Attachments` replaces the whole list: upload each file with `POST /v1/attachments`\r\nand send every name and url, including the ones to keep. An empty array removes them all.",
        "operationId": "patch_v1_documents_documentId",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}/duplicate": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Duplicates a document.",
        "description": "The duplicate has the current body and attachments, the same client and parent, and goes\r\nlast among its siblings. Children, related items and history are not duplicated, and the\r\nstar, portal and public link start off. Attachment files and images in the body are\r\ncopied, so the duplicate never shares a file with the original. An archived document\r\ncannot be duplicated (409). The request body may be omitted entirely.",
        "operationId": "post_v1_documents_documentId_duplicate",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document to duplicate.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Optional title for the duplicate.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateDocumentCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateDocumentCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateDocumentCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateDocumentCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}/pdf": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Downloads a document as a PDF.",
        "description": "A 200 is the PDF itself, `application/pdf`, named after the title; errors still use\r\nthe envelope. Rendered from the current version at request time: the title as a heading,\r\nthen the body.",
        "operationId": "get_v1_documents_documentId_pdf",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}/versions": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists a document's versions, newest first.",
        "description": "Every saved version, the current one included (`IsCurrent`). Restoring a version\r\nresets its `EditedOn` to the time of the restore, so it moves to the top.",
        "operationId": "get_v1_documents_documentId_versions",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}/versions/{versionId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Gets one version of a document, with its body and attachments.",
        "operationId": "get_v1_documents_documentId_versions_versionId",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "description": "Version identifier; it must be one of this document's.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionDetailModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}/versions/{versionId}/restore": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Makes an earlier version the current one.",
        "description": "No body. Restoring the version that is already current changes nothing.",
        "operationId": "post_v1_documents_documentId_versions_versionId_restore",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "description": "Version to restore; it must be one of this document's.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetailModelBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}/related-items": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists the records a document is related to.",
        "description": "Not paginated: a document's related items are returned whole. `ItemType` is\r\n1 Document, 2 Custom asset, 3 Contact, 4 Agent asset, 5 Structured document or 6 Password.",
        "operationId": "get_v1_documents_documentId_related-items",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRelatedItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRelatedItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRelatedItemModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Relates a document to other records.",
        "description": "Up to 100 records per call. Each has to exist in your account, except structured documents\r\nand passwords, which are linked as given. A record already related is skipped.",
        "operationId": "post_v1_documents_documentId_related-items",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The records to relate.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocumentRelatedItemsCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocumentRelatedItemsCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocumentRelatedItemsCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddDocumentRelatedItemsCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRelatedItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRelatedItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRelatedItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{documentId}/related-items/{relatedItemId}": {
      "delete": {
        "tags": [
          "Documents"
        ],
        "summary": "Removes one related item from a document.",
        "description": "Removes the link only; neither record is deleted.",
        "operationId": "delete_v1_documents_documentId_related-items_relatedItemId",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "Document identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "relatedItemId",
            "in": "path",
            "description": "The related item's `Id`, from the related items list.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveDocumentRelatedItemResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveDocumentRelatedItemResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveDocumentRelatedItemResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/forms": {
      "get": {
        "tags": [
          "Forms"
        ],
        "summary": "Lists the service provider's forms, most recently updated first.",
        "description": "Ordered by when the form was last updated; no other sort is available. Active forms only, unless statusIds says otherwise. An archived form is\r\none deleted in the app - it is recoverable there, and readable here by id.\r\n`ResponseCount` counts submitted responses; pending links and drafts are not counted.",
        "operationId": "get_v1_forms",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "Sort direction by last update: `asc` or `desc` (default).",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated form status ids: 1 Active, 2 Archived. Omitted returns Active only (archived excluded). Any other id is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GroupIds",
            "in": "query",
            "description": "Comma-separated technician group ids; matches forms assigned to any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TagIds",
            "in": "query",
            "description": "Comma-separated ticket tag ids; matches forms that apply any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids; matches forms restricted to any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AllowInPortal",
            "in": "query",
            "description": "Keeps only forms offered (`true`) or not offered (`false`) in the client portal.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the form title, case-insensitively.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FormListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/forms/{formId}/responses": {
      "get": {
        "tags": [
          "Forms"
        ],
        "summary": "Lists a form's submitted responses, newest first.",
        "description": "Cursor-paginated. Each response carries one answer per field that takes an answer, keyed\r\nby the field's `Id` from the form detail; which of `TextValue`,\r\n`NumberValue` and `OptionValues` is set follows the field's `Type`. Links\r\nthat were issued but never submitted are not responses and are not listed.",
        "operationId": "get_v1_forms_formId_responses",
        "parameters": [
          {
            "name": "formId",
            "in": "path",
            "description": "Form whose responses to list.",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,50}$",
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FormResponseListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormResponseListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormResponseListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/forms/{formId}/submission-links": {
      "post": {
        "tags": [
          "Forms"
        ],
        "summary": "Issues a link through which the form can be submitted.",
        "description": "The link opens the form in the Gorelo form web app without a login; one submission made\r\nthrough it is filed against the form - and against the ticket or task named in the body,\r\nif one is. Send at most one of `TicketId` and `TaskId`; both is a 400. Each must\r\nbe an active record of the authenticated service provider, or the response is a 400 naming\r\nthe field. An unused link expires at `ExpiresOn`, seven days after it is issued. An\r\narchived form takes no submissions and is a 404, as is a form that does not exist or\r\nbelongs to another service provider.",
        "operationId": "post_v1_forms_formId_submission-links",
        "parameters": [
          {
            "name": "formId",
            "in": "path",
            "description": "Form the link is for.",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,50}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The ticket or task the submission is for, optionally. An empty body is accepted as `{}`.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubmissionLinkCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubmissionLinkCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubmissionLinkCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubmissionLinkCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSubmissionLinkResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSubmissionLinkResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSubmissionLinkResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/users": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "Lists users (technicians) for the service provider using cursor pagination.\r\nResults are sorted by user id ascending (oldest first).",
        "operationId": "get_v1_organization_users",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated status ids: Pending=1, Active=2, Disabled=3. Omit for Pending and Active -\r\ndisabled users are listed only when 3 is named. Any other id is a 400.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/api-keys": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "Lists the service provider's API keys using cursor pagination, newest first.",
        "description": "Requires the `Organization:read` scope; keys issued with the older\r\n`ServiceProvider:read` keep working.\r\n            \r\nEvery key is listed, revoked ones included, so the list is the record of what has been\r\nissued: a revoked key carries the time it was revoked in `RevokedAt`. A key created by\r\nanother key through `POST /v1/api-keys` names that key in `ParentApiKeyId`. The key\r\nvalue itself is never returned - it is shown once, when the key is created.",
        "operationId": "get_v1_api-keys",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, from 1 to 200 (default 50). A value outside that range is rejected.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Organization"
        ],
        "summary": "Creates an API key for the authenticated service provider.",
        "description": "Requires the `Organization:write` scope; keys issued with the older\r\n`ServiceProvider:write` keep working. The new key's scopes must also be a subset of the\r\ncalling key's own, so a key can never create one more powerful than itself. Asking for a\r\nscope the caller does not hold is rejected and names the scope.\r\n            \r\nEach requested scope is an explicit `\"Module:verb\"`; a bare module name is rejected.\r\nThe key value comes back on this response and on no other - only its hash is stored. The new\r\nkey records the key that created it, returned as `ParentApiKeyId` by\r\n`GET /v1/api-keys`.",
        "operationId": "post_v1_api-keys",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/api-keys/{apiKeyId}": {
      "delete": {
        "tags": [
          "Organization"
        ],
        "summary": "Revokes an API key.",
        "description": "Requires the `Organization:delete` scope; keys issued with the older\r\n`ServiceProvider:delete` keep working.\r\n            \r\nThe key stops working at once and stays on `GET /v1/api-keys` with `RevokedAt`\r\nset; it is not removed and cannot be restored. Only this key is revoked: keys it created\r\nstay active. A key may revoke itself. Revoking a key that is already revoked succeeds and\r\nchanges nothing.",
        "operationId": "delete_v1_api-keys_apiKeyId",
        "parameters": [
          {
            "name": "apiKeyId",
            "in": "path",
            "description": "API key to revoke.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApiKeyResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApiKeyResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApiKeyResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/groups": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "Lists the technician groups configured for the service provider.",
        "operationId": "get_v1_organization_groups",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GetGroupsResponseModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetGroupsResponseModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetGroupsResponseModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Creates a project for the authenticated service provider.",
        "description": "The project is created in status 1 (Not started) and numbered from the same sequence\r\nthe app uses, so its number and prefix match what the app would have given it. The same\r\ncreation timeline entry and the same project-created notification fire as when a project\r\nis created in the app.",
        "operationId": "post_v1_projects",
        "requestBody": {
          "description": "Project details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProjectResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProjectResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProjectResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists the projects visible to the authenticated service provider, newest activity first.",
        "operationId": "get_v1_projects",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort field: `updatedOn` (default) or `createdOn`.",
            "schema": {
              "type": "string",
              "default": "updatedOn"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "Sort direction: `asc` or `desc` (default).",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated project status ids: 1 Not started, 2 In progress, 3 On hold, 4 Completed, 5 Closed. Any other id is a 400. Omitted returns every status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TypeIds",
            "in": "query",
            "description": "Comma-separated project type ids (Guids).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "LeadAssigneeIds",
            "in": "query",
            "description": "Comma-separated lead assignee (technician) ids.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TagIds",
            "in": "query",
            "description": "Comma-separated tag ids (Guids).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GroupIds",
            "in": "query",
            "description": "Comma-separated technician group ids.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the project title, number and display number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "Keeps only projects updated at or after this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "Keeps only projects updated strictly before this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "Keeps only projects created at or after this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "Keeps only projects created strictly before this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "TargetDateAfter",
            "in": "query",
            "description": "Keeps only projects with a target date at or after this instant (UTC). A project with no target date matches neither bound.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "TargetDateBefore",
            "in": "query",
            "description": "Keeps only projects with a target date strictly before this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Gets a single project.",
        "description": "Returns every field the project list returns, with the same values, plus the ones the list\r\nleaves out: the project's `Description`, its `SharedWithContactIds` and its\r\n`WatcherIds`.\r\n            \r\nA project's sections and tasks are their own sub-resources and are not embedded here - read\r\nthem from `GET /v1/projects/{projectId}/sections`.",
        "operationId": "get_v1_projects_projectId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Updates a project. Send only the fields you want to change.",
        "description": "An omitted field is left alone; re-sending a value the project already holds is a no-op\r\nrather than an error, and records no activity. Sending nothing at all is a 400.\r\n            \r\nLists replace outright: send an empty array to clear one. `LeadAssigneeId: 0`\r\nremoves the lead, and `ClearTargetDate: true` removes the target date.\r\n            \r\n`ClosedOn` backdates the close of a project being migrated from another system, and\r\nalso becomes its `UpdatedOn`. It is only accepted for a project that is Closed -\r\nalready, or by this same request - and never for a future date or one before the project\r\nwas created. Omit it and closing a project stamps the time of the change; reopening a\r\nClosed project clears it. Completed is reached automatically and carries no date.\r\n            \r\nTwo field pairings are enforced because the data requires them: moving the project to a\r\ndifferent `ClientId` needs a `LocationId` in that client and **clears the\r\nshared contacts**, and a technician cannot be both the lead and a watcher.",
        "operationId": "patch_v1_projects_projectId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateProjectResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateProjectResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateProjectResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Deletes a project and every task in it.",
        "description": "A soft delete: the project and its tasks stop appearing and stop being targets for\r\nautomation, but the records and their history survive and can be recovered in the app.\r\nThe response says how many tasks went with it.",
        "operationId": "delete_v1_projects_projectId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteProjectResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteProjectResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteProjectResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/tags": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists the project tags configured for the service provider.",
        "description": "Not paginated - a bounded set of configuration, the same class of list as the ticket\r\ntags and types endpoints.\r\n            \r\nThese are the ids a project's `TagIds` holds, and exactly the set\r\n`POST`/`PATCH /v1/projects` will accept: a deleted tag is left out. Project\r\ntags are their own set - they are not the ticket tags from `/v1/tickets/tags`, and\r\nthe two are keyed differently.",
        "operationId": "get_v1_projects_tags",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTagListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTagListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTagListItemModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/types": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists the project types configured for the service provider.",
        "description": "Not paginated, for the reason given on the tags endpoint above. These are the ids a\r\nproject's `TypeId` takes, and exactly the set `POST`/`PATCH /v1/projects`\r\nwill accept: a deleted type is left out.",
        "operationId": "get_v1_projects_types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTypeListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTypeListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTypeListItemModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/sections": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists a project's sections.",
        "description": "Not paginated. A section is a bounded lookup rather than a list of records - the largest\r\nproject in production has 23 sections - so the whole set is returned in one response, the\r\nsame way ticket statuses and types are.",
        "operationId": "get_v1_projects_projectId_sections",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSectionModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSectionModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSectionModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Adds a section to a project.",
        "description": "`Color` is optional - omit it and the section gets `#56A0F9`, the colour the\r\n            app starts a new section from. Supplying it blank is still a 400: a section always has a\r\n            colour.",
        "operationId": "post_v1_projects_projectId_sections",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project to add the section to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Section details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSectionCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSectionCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSectionCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSectionCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSectionResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSectionResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSectionResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/sections/{sectionId}": {
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Updates a section's title or colour. Send only the fields you want to change.",
        "description": "Neither field is clearable - a section always has a title and a colour - so an omitted\r\nfield leaves the stored value alone and a supplied blank is rejected. Sending nothing at\r\nall is a 400 rather than a no-op write.",
        "operationId": "patch_v1_projects_projectId_sections_sectionId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the section belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sectionId",
            "in": "path",
            "description": "Section to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSectionCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSectionCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSectionCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSectionCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateSectionResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateSectionResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateSectionResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Deletes a section and every task in it.",
        "description": "The tasks go with the section. Leaving them behind would strand them: on no board, still\r\ncounted in the project's totals, and still a target for automation. The response says how\r\nmany were deactivated.",
        "operationId": "delete_v1_projects_projectId_sections_sectionId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the section belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sectionId",
            "in": "path",
            "description": "Section to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteSectionResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteSectionResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteSectionResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists a project's tasks.",
        "description": "Ordered by the board's own ordering by default, so the response matches what the app\r\nshows. The locked contract's `assignedToMe` is not offered: the gateway strips\r\nevery technician identifier, so \"me\" would resolve to nobody and the filter would match\r\nnothing for every key. Use assigneeIds instead.",
        "operationId": "get_v1_projects_projectId_tasks",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project whose tasks to list.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort field: `boardOrder` (default), `createdOn` or `updatedOn`.",
            "schema": {
              "type": "string",
              "default": "boardOrder"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "Sort direction: `asc` (default) or `desc`.",
            "schema": {
              "type": "string",
              "default": "asc"
            }
          },
          {
            "name": "SectionIds",
            "in": "query",
            "description": "Comma-separated section ids (Guids).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated task status ids: 1 Not started, 2 Working on it, 3 On hold, 4 Done. Any other id is a 400. Omitted returns every status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AssigneeIds",
            "in": "query",
            "description": "Comma-separated technician ids; matches a task's lead or assisting assignees.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "LeadAssigneeIds",
            "in": "query",
            "description": "Comma-separated technician ids; matches a task's lead assignee only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncompleteOnly",
            "in": "query",
            "description": "When true, drops tasks in the Done status.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "DueAfter",
            "in": "query",
            "description": "Keeps only tasks due at or after this instant (UTC). A task with no due date matches neither bound.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "DueBefore",
            "in": "query",
            "description": "Keeps only tasks due strictly before this instant (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TaskListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Creates a task on a project's board.",
        "description": "The task is numbered from the project's own sequence, so its display number matches what\r\nthe app would have given it - `PRO-462-7`. Creating a task moves a project that had\r\nnot started into progress, exactly as it does in the app, and fires the same automation\r\ntriggers.\r\n            \r\n`PriorityId` is the same scale a ticket uses: None=0, Urgent=1, High=2, Normal=3,\r\nLow=4. Omit it for Normal.",
        "operationId": "post_v1_projects_projectId_tasks",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project to create the task in.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Task details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/comments": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Posts a comment on a project.",
        "description": "Comments default to `ConversationTypeId: 2` (Private). A project has no side\r\nconversations or approvals, so `3` and `4` are rejected.\r\n            \r\nAttach files by uploading them first and sending back the\r\nname and url you were given; any access token on a url is stripped before storage and a\r\nfresh one is issued whenever the comment is read, so never store the url you get back.",
        "operationId": "post_v1_projects_projectId_comments",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project to comment on.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The comment.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommentCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommentCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommentCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectCommentCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProjectCommentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProjectCommentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProjectCommentResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Returns a project's comments, newest first.",
        "description": "Cursor-paginated. Attachment and inline-image links carry a time-limited access token\r\nthat expires, so fetch the comment again rather than storing a url.\r\n            \r\nRows carry `BodyTruncated` so this list has the same shape as the task comment list,\r\nbut it is always false here: a project comment's body is always inline, so the full body\r\nis in the row and there is nothing further to fetch.",
        "operationId": "get_v1_projects_projectId_comments",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project whose comments to return.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Cursor from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Comments per page, 1-200. Defaults to 50.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "`desc` (default, newest first) or `asc`.",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCommentListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCommentListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCommentListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/comments/{commentId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Returns one comment on a project.",
        "operationId": "get_v1_projects_projectId_comments_commentId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the comment belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "description": "Comment to return.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCommentModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCommentModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCommentModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Deletes one comment on a project.",
        "description": "A soft delete: the comment stops appearing but the record survives. Deleting a comment\r\nthat is already deleted succeeds and writes nothing.\r\n            \r\nOnly a private comment can be deleted - the product has no delete for a public comment\r\nanywhere, including the app - so a public one is refused with `ResourceNotDeletable`.",
        "operationId": "delete_v1_projects_projectId_comments_commentId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the comment belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "description": "Comment to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteProjectCommentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteProjectCommentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteProjectCommentResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks/{taskId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Returns one task in full.",
        "description": "Everything the project's task list returns, plus the fields that live only on the task\r\nitself: linked assets, blocking relationships in both directions, the reason behind its\r\nstatus, and time recorded against it.\r\n            \r\nA task in a project you cannot see returns 404, the same as one that does not exist.",
        "operationId": "get_v1_projects_projectId_tasks_taskId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task to return.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Updates a task. Send only the fields you want to change.",
        "description": "An omitted field is left alone; re-sending a value the task already holds is a no-op\r\nrather than an error, and records no activity. Sending nothing at all is a 400.\r\n            \r\nLists replace outright: send an empty array to clear one. `LeadAssigneeId: 0`\r\nremoves the lead, and `ClearDueDate: true` removes the due date - a date field is\r\nnever cleared by omission.\r\n            \r\nChanging the status fires the same automation the app fires.",
        "operationId": "patch_v1_projects_projectId_tasks_taskId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTaskResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTaskResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTaskResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Deletes a task.",
        "description": "A soft delete: the task stops appearing anywhere and stops being a target for\r\nautomation, but its history survives and it can be recovered in the app.\r\n            \r\nBlocking relationships are cleared in both directions, so no other task is left pointing\r\nat it, and any automation timer waiting on it is dropped.",
        "operationId": "delete_v1_projects_projectId_tasks_taskId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTaskResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTaskResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTaskResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks/{taskId}/comments": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Posts a comment on a task.",
        "description": "Comments default to `ConversationTypeId: 2` (Private). Any other kind is\r\noutward-facing, so posting one puts the task in a waiting-on-the-contact state and fires\r\nthe same automation the app does.\r\n            \r\nSide Conversation (3) and Approval (4) need the `ConversationId` of a conversation\r\nthat already exists on this task - list them with the conversations endpoint.\r\n            \r\nAttach files by uploading them first and sending back the name and url you were given.\r\nAny access token on a url is stripped before storage and a fresh one is issued whenever\r\nthe comment is read, so never store the url you get back.",
        "operationId": "post_v1_projects_projectId_tasks_taskId_comments",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task to comment on.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The comment.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommentCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommentCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommentCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskCommentCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskCommentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskCommentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskCommentResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Returns a task's comments, newest first.",
        "description": "Cursor-paginated. Filter from broadest to narrowest: send nothing for every comment;\r\nconversationType to select kinds; or a single\r\nconversationType together with conversationId for\r\none specific conversation.\r\n            \r\nAttachment and inline-image links carry a time-limited access token that expires, so\r\nfetch the comment again rather than storing a url.\r\n            \r\nA comment that arrived by email stores its body outside the document, and this list does\r\nnot fetch it: such a row carries `BodyTruncated: true` with an empty\r\n`BodyHtml`/`BodyText`. Read the single comment to get the full body.",
        "operationId": "get_v1_projects_projectId_tasks_taskId_comments",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task whose comments to return.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Cursor from a previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Comments per page, 1-200. Defaults to 50.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort field: `createdOn`.",
            "schema": {
              "type": "string",
              "default": "createdOn"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "`desc` (default, newest first) or `asc`.",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "ConversationType",
            "in": "query",
            "description": "Kinds to include: `1` Public, `2` Private, `3` Side Conversation, `4` Approval. Comma-separated on its own; a single value when paired with conversationId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ConversationId",
            "in": "query",
            "description": "Identifier of the single conversation to read, from the conversations endpoint. Requires a single conversationType.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks/{taskId}/conversations/side-conversation": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Starts a side conversation on a task.",
        "description": "A thread with somebody outside the task's own contacts - a vendor, say. The conversation\r\nis created empty; its messages are posted afterwards.",
        "operationId": "post_v1_projects_projectId_tasks_taskId_conversations_side-conversation",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task to start the conversation on.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Who the conversation is with.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskSideConversationCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskSideConversationCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskSideConversationCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskSideConversationCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskSideConversationResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskSideConversationResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskSideConversationResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks/{taskId}/conversations/approval": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Asks contacts to approve something on a task.",
        "description": "Each contact must be an active contact of the task's client **and** carry a contact tag\r\nmarked as an approver - the same constraint the app's picker applies. A contact that is\r\nnot eligible is rejected before anything is written.\r\n            \r\nCreating an approval puts the task in a waiting-on-the-contact state.",
        "operationId": "post_v1_projects_projectId_tasks_taskId_conversations_approval",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task the approval is for.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "What is being approved, and by whom.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskApprovalCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskApprovalCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskApprovalCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskApprovalCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskApprovalResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskApprovalResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskApprovalResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks/{taskId}/comments/{commentId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Returns one comment on a task.",
        "description": "Always returns the whole body, so there is no `BodyTruncated` field: a body stored\r\noutside the document - an emailed-in comment - is read back here. If that stored body\r\ncannot be reached, `BodyHtml` is null rather than empty, to distinguish a body that\r\nis unavailable from a comment that has none.",
        "operationId": "get_v1_projects_projectId_tasks_taskId_comments_commentId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task the comment belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "description": "Comment to return.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Deletes one comment on a task.",
        "description": "A soft delete, and idempotent: deleting a comment that is already deleted succeeds and\r\nwrites nothing. Only a private comment can be deleted - anything outward-facing (public,\r\na side conversation, an approval) has left the tenant and is refused with\r\n`ResourceNotDeletable`.",
        "operationId": "delete_v1_projects_projectId_tasks_taskId_comments_commentId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task the comment belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "description": "Comment to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTaskCommentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTaskCommentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTaskCommentResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks/{taskId}/conversations": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists the conversations on a task.",
        "description": "Public and Private are the task's main thread and come back with a null `Id`; Side\r\nConversation and Approval carry a real `Id` that can be passed to the comments\r\nendpoint as `conversationId`. Type-specific details live on each type's own detail\r\nendpoint, so every row has the same lean shape.\r\n            \r\nNot paginated, matching the ticket equivalent: the set is one task's own conversations.",
        "operationId": "get_v1_projects_projectId_tasks_taskId_conversations",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task whose conversations to return.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TaskConversationListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskConversationListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskConversationListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/tasks/{taskId}/approvals/{approvalId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Gets one approval on a task, with its approvers.",
        "description": "This is where approval status lives - the conversations list stays lean and does not\r\ncarry it. `Status` is worked out from the approvers: Denied as soon as anyone\r\ndenies, Approved once everyone approves, Pending otherwise.",
        "operationId": "get_v1_projects_projectId_tasks_taskId_approvals_approvalId",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project the task belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "Task the approval is on.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "approvalId",
            "in": "path",
            "description": "Approval identifier, from the conversations endpoint.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TaskApprovalDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskApprovalDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskApprovalDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets": {
      "post": {
        "tags": [
          "Tickets"
        ],
        "summary": "Creates a ticket for the authenticated service provider.",
        "operationId": "post_v1_tickets",
        "requestBody": {
          "description": "Ticket details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTicketCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTicketCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTicketCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTicketCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTicketResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTicketResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTicketResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Lists tickets for the service provider using cursor pagination.\r\nDefault sort is `updatedOn desc`. sortBy accepts only\r\n`updatedOn` or `createdOn`; sortOrder accepts only\r\n`asc` or `desc` (case-insensitive) — any other value is rejected with a 400.",
        "operationId": "get_v1_tickets",
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort field: `updatedOn` (default) or `createdOn`.",
            "schema": {
              "type": "string",
              "default": "updatedOn"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "Sort direction: `asc` or `desc` (default).",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "StatusIds",
            "in": "query",
            "description": "Comma-separated status ids to include. Omit for every status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientIds",
            "in": "query",
            "description": "Comma-separated client ids to include. Omit for every client.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PriorityIds",
            "in": "query",
            "description": "Comma-separated priority ids on the public scale — None=0, Urgent=1, High=2, Normal=3, Low=4.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TypeIds",
            "in": "query",
            "description": "Comma-separated ticket type ids to include.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "LeadAssigneeIds",
            "in": "query",
            "description": "Comma-separated lead assignee ids to include.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ContactIds",
            "in": "query",
            "description": "Comma-separated contact ids to include.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TagIds",
            "in": "query",
            "description": "Comma-separated tag ids; a ticket matches if it carries any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GroupIds",
            "in": "query",
            "description": "Comma-separated group ids; a ticket matches if it is subscribed to any of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "DeviceIds",
            "in": "query",
            "description": "Comma-separated agent ids (GUIDs, up to 100); a ticket matches if any of those agents is linked to it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "Keyword matched against the ticket title, number and display number. Up to 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only tickets updated at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only tickets updated strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedSince",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only tickets created at or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedBefore",
            "in": "query",
            "description": "ISO-8601 timestamp; keeps only tickets created strictly before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TicketListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/{ticketId}": {
      "patch": {
        "tags": [
          "Tickets"
        ],
        "summary": "Partially updates a ticket. Send only the fields you want to change.",
        "description": "Each supplied field is applied exactly as when it is changed in the app, so the same\r\nnotifications and timeline entries are produced.\r\nChanging `clientId` resets the ticket's contact, cc contacts and billing override and\r\nunlinks its assets; supply those fields in the same request to set them to new values.",
        "operationId": "patch_v1_tickets_ticketId",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to change.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTicketResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTicketResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateTicketResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tickets"
        ],
        "summary": "Deletes a ticket and its time entries.",
        "description": "This is the same soft-delete the app performs: the ticket is deactivated and recoverable from\r\nthe Recycle Bin, never removed. Its delayed actions are cleared, scheduled automation is\r\ncancelled and it leaves the search index, exactly as when it is deleted in the app.\r\nThe ticket's time entries are deleted with it, and any contract hours they consumed are\r\nreturned to the contract. If any of those time entries has already been approved, completed, voided\r\nor invoiced the whole request is refused with 409 and nothing is deleted; the message lists\r\nthe blocking time entries. Deleting an already-deleted ticket succeeds without repeating any\r\nof that, so a retried request is safe.",
        "operationId": "delete_v1_tickets_ticketId",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTicketResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTicketResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTicketResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Gets a single ticket.",
        "description": "Returns every field the ticket list returns, with the same values, plus the ones the list\r\nleaves out because each costs a further read: the ticket's `Description`, the assets and\r\nuptime checks linked to it, its logged `Time` and `Products` totals, any ticket-level\r\n`BillingOverride`, its `Shipments`, and its `Banner`.",
        "operationId": "get_v1_tickets_ticketId",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/{ticketId}/comments/{commentId}": {
      "delete": {
        "tags": [
          "Tickets"
        ],
        "summary": "Deletes a private comment from a ticket.",
        "description": "Only private comments can be deleted — the product has no delete for public comments, so a\r\npublic comment id is rejected with 409. The comment is deactivated rather than removed, the\r\nsame soft-delete the app performs. Deleting an already-deleted comment succeeds, so a retried\r\nrequest is safe.",
        "operationId": "delete_v1_tickets_ticketId_comments_commentId",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket the comment belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "description": "Comment to delete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCommentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCommentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCommentResultBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Gets a single comment on a ticket. Same shape as a comments-list item except that the full\r\n`BodyHtml` is always included, so there is no `BodyTruncated` field.",
        "operationId": "get_v1_tickets_ticketId_comments_commentId",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "description": "Comment identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CommentModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/statuses": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Lists the ticket statuses configured for the service provider.",
        "operationId": "get_v1_tickets_statuses",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListItemModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/tags": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Lists the ticket tags configured for the service provider.",
        "operationId": "get_v1_tickets_tags",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TagListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagListItemModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/types": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Lists the ticket types configured for the service provider.",
        "operationId": "get_v1_tickets_types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TypeListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TypeListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TypeListItemModelListBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/{ticketId}/comments": {
      "post": {
        "tags": [
          "Tickets"
        ],
        "summary": "Adds a comment to a ticket. The comment is always recorded as coming from the API — the\r\ncaller cannot post as a specific user, and `To` and `Cc` are taken from the\r\nconversation rather than the request.",
        "operationId": "post_v1_tickets_ticketId_comments",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Comment details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommentCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommentCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommentCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommentCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCommentResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCommentResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCommentResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Lists the comments on a ticket using cursor pagination. Comments read oldest-first by\r\ndefault, like a conversation top to bottom.\r\nFilter from broadest to narrowest: send nothing for every comment; conversationType\r\nto select kinds; or a single conversationType together with\r\nconversationId for one specific conversation.",
        "operationId": "get_v1_tickets_ticketId_comments",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ConversationType",
            "in": "query",
            "description": "Kinds to include: `1` Public, `2` Private, `3` Side Conversation, `4` Approval. Comma-separated on its own; a single value when paired with conversationId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ConversationId",
            "in": "query",
            "description": "Identifier of the single conversation to read, from the conversations endpoint. Requires a single conversationType.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor from a previous page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Number of items per page, 1-200 (default 50). Out of range is rejected, not clamped.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort field: `createdOn`.",
            "schema": {
              "type": "string",
              "default": "createdOn"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "description": "Sort direction: `asc` (default) or `desc`.",
            "schema": {
              "type": "string",
              "default": "asc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CommentListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/{ticketId}/conversations": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Lists the conversations on a ticket. Public and Private are the ticket's main thread and\r\ncome back with a null `Id`; Side Conversation and Approval carry a real `Id` that\r\ncan be passed to the comments endpoint as `conversationId`.\r\nType-specific details live on each type's own detail endpoint, so every row has the same\r\nlean shape.",
        "operationId": "get_v1_tickets_ticketId_conversations",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationListItemModelListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationListItemModelListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationListItemModelListBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/{ticketId}/approvals/{approvalId}": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Gets a single approval on a ticket, with its approvers. This is where approval status\r\nlives — the conversations list stays lean and does not carry it. `Status` is worked\r\nout from the approvers: Denied as soon as anyone denies, Approved once everyone\r\napproves, Pending otherwise.",
        "operationId": "get_v1_tickets_ticketId_approvals_approvalId",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "approvalId",
            "in": "path",
            "description": "Approval identifier, from the conversations endpoint.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalDetailModelBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalDetailModelBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalDetailModelBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/{ticketId}/conversations/approval": {
      "post": {
        "tags": [
          "Tickets"
        ],
        "summary": "Creates an approval on a ticket. Every listed contact starts Pending. The approval is\r\ncreated empty — post into it afterwards with the comments endpoint, using the returned\r\n`Id` as `conversationId` and `conversationType` 4, which is also what\r\nsends the approvers their confirmation email.",
        "operationId": "post_v1_tickets_ticketId_conversations_approval",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Approval details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApprovalCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApprovalCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApprovalCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApprovalCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApprovalResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApprovalResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApprovalResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tickets/{ticketId}/conversations/side-conversation": {
      "post": {
        "tags": [
          "Tickets"
        ],
        "summary": "Creates a side conversation on a ticket. Post a comment into it afterward using this\r\nconversation's returned `Id` as `conversationId` with `conversationType=3`.",
        "operationId": "post_v1_tickets_ticketId_conversations_side-conversation",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "description": "Ticket identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Side conversation details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSideConversationCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSideConversationCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSideConversationCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSideConversationCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSideConversationResultBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSideConversationResultBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSideConversationResultBaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddDocumentRelatedItem": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "string",
            "description": "The record's id, as text: a Guid for a document, custom asset or agent asset, a number for a contact.",
            "nullable": true
          },
          "ItemTypeId": {
            "type": "integer",
            "description": "1 Document, 2 Custom asset, 3 Contact, 4 Agent asset, 5 Structured document, 6 Password.",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "One record to link."
      },
      "AddDocumentRelatedItemsCommand": {
        "type": "object",
        "properties": {
          "RelatedItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddDocumentRelatedItem"
            },
            "description": "The records to link, 1 to 100 of them. A record already linked is skipped.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Links a document to other records."
      },
      "AgentAppListModel": {
        "type": "object",
        "properties": {
          "LastScannedOn": {
            "type": "string",
            "description": "When the agent last reported its applications (UTC); `null` when it never has.",
            "format": "date-time",
            "nullable": true
          },
          "Items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentAppModel"
            },
            "description": "Installed applications, by name. Empty when the agent never reported any."
          }
        },
        "additionalProperties": false,
        "description": "The applications installed on an agent, from its last stored scan."
      },
      "AgentAppListModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/AgentAppListModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentAppModel": {
        "type": "object",
        "properties": {
          "AppId": {
            "type": "string",
            "description": "The application's package identifier from its install source (for example its winget id);\r\n`null` when the application has no managed source.",
            "nullable": true,
            "example": "Google.Chrome"
          },
          "Name": {
            "type": "string",
            "description": "Application name.",
            "example": "Google Chrome"
          },
          "Version": {
            "type": "string",
            "description": "Installed version.",
            "nullable": true,
            "example": "129.0.6668.90"
          },
          "Publisher": {
            "type": "string",
            "description": "Publisher.",
            "nullable": true,
            "example": "Google LLC"
          },
          "InstalledOn": {
            "type": "string",
            "description": "The date the application was installed; `null` when not reported.",
            "format": "date",
            "nullable": true
          },
          "Source": {
            "type": "string",
            "description": "Install source: `winget` or `AppX`; `null` for any other or no source.",
            "nullable": true,
            "example": "winget"
          },
          "AvailableVersion": {
            "type": "string",
            "description": "The version an upgrade would install; `null` when no upgrade is available.",
            "nullable": true,
            "example": "130.0.6723.59"
          }
        },
        "additionalProperties": false,
        "description": "One installed application."
      },
      "AgentAssetListItemResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Device identifier.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "Device name."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the device belongs to. `null` for an agent awaiting adoption -\r\ninstalled but not yet assigned to a client in the app. Such an agent is listed like any other,\r\nin whatever status it reports, with `LocationId` null too.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the device belongs to. `null` for an agent awaiting\r\nadoption.",
            "format": "int64",
            "nullable": true
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the contact the agent asset is assigned to. Null when unassigned.",
            "format": "int64",
            "nullable": true,
            "example": 7962
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC). Default sort key (ascending) for the agents list endpoint.",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "DisplayName": {
            "type": "string",
            "description": "Display name, always filled in: the override set in the app, or `Name` (what the agent\r\nreports) when there is none."
          },
          "Description": {
            "type": "string",
            "description": "Free-text description."
          },
          "Banner": {
            "type": "string",
            "description": "Banner / label text. Null when the asset has none.",
            "nullable": true
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the device."
          },
          "LastBootUpTime": {
            "type": "string",
            "description": "Last boot-up time (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "LastDisconnectDateTime": {
            "type": "string",
            "description": "Last disconnect time (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "LastLoggedOnUser": {
            "type": "string",
            "description": "Last logged-on user (display name)."
          },
          "LastLoggedOnUserUpn": {
            "type": "string",
            "description": "Last logged-on user principal name (UPN)."
          },
          "LastLoggedOnUserDatetime": {
            "type": "string",
            "description": "Timestamp of the last user logon (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "Os": {
            "type": "string",
            "description": "Operating system (full string)."
          },
          "OsType": {
            "type": "string",
            "description": "Operating system type."
          },
          "OsName": {
            "type": "string",
            "description": "Operating system name."
          },
          "OsVersion": {
            "type": "string",
            "description": "Operating system version."
          },
          "OsArchitecture": {
            "type": "string",
            "description": "Operating system architecture."
          },
          "HardwareArchitecture": {
            "type": "string",
            "description": "Hardware architecture."
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "HardwareType": {
            "type": "string",
            "description": "Hardware type name. <b>Deprecated:</b> use `Type`, which also carries the id.",
            "deprecated": true
          },
          "Manufacturer": {
            "type": "string",
            "description": "Hardware manufacturer."
          },
          "Model": {
            "type": "string",
            "description": "Hardware model."
          },
          "SerialNumber": {
            "type": "string",
            "description": "Hardware serial number. The same name and value on a custom asset (`SerialNumber`)."
          },
          "SerialNo": {
            "type": "string",
            "description": "Hardware serial number. <b>Deprecated:</b> use `SerialNumber`, which has the same value.",
            "deprecated": true
          },
          "WarrantyStartDate": {
            "type": "string",
            "description": "Warranty start date (UTC). Sourced from the device's warranty record.",
            "format": "date-time",
            "nullable": true
          },
          "WarrantyEndDate": {
            "type": "string",
            "description": "Warranty end date (UTC). Sourced from the device's warranty record.",
            "format": "date-time",
            "nullable": true
          },
          "Cpu": {
            "type": "string",
            "description": "CPU description."
          },
          "Memory": {
            "type": "string",
            "description": "Total memory."
          },
          "Disk": {
            "type": "string",
            "description": "Disk description."
          },
          "LocalIPAddress": {
            "type": "string",
            "description": "Local IP address."
          },
          "PublicIPAddress": {
            "type": "string",
            "description": "Public IP address."
          },
          "Uuid": {
            "type": "string",
            "description": "Device UUID."
          },
          "ShellVersion": {
            "type": "string",
            "description": "Agent shell version."
          },
          "RmmVersion": {
            "type": "string",
            "description": "RMM agent version."
          },
          "InstallerVersion": {
            "type": "string",
            "description": "Installer version."
          },
          "SecurityPosture": {
            "$ref": "#/components/schemas/SecurityPostureModel"
          }
        },
        "additionalProperties": false,
        "description": "An agent (managed device) asset as listed by `GET /v1/assets/agents`. Timestamps are UTC."
      },
      "AgentAssetListItemResponseListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentAssetListItemResponse"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentAssetResponse": {
        "type": "object",
        "properties": {
          "CustomProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomPropertyValue"
            },
            "description": "Every custom field the service provider has defined for devices, with its effective value\r\non this device (saved, else the field's default, else null) and `IsSet` saying whether\r\na value is saved. Empty only when no custom fields are defined."
          },
          "Id": {
            "type": "string",
            "description": "Device identifier.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "Device name."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the device belongs to. `null` for an agent awaiting adoption -\r\ninstalled but not yet assigned to a client in the app. Such an agent is listed like any other,\r\nin whatever status it reports, with `LocationId` null too.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the device belongs to. `null` for an agent awaiting\r\nadoption.",
            "format": "int64",
            "nullable": true
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the contact the agent asset is assigned to. Null when unassigned.",
            "format": "int64",
            "nullable": true,
            "example": 7962
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC). Default sort key (ascending) for the agents list endpoint.",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "DisplayName": {
            "type": "string",
            "description": "Display name, always filled in: the override set in the app, or `Name` (what the agent\r\nreports) when there is none."
          },
          "Description": {
            "type": "string",
            "description": "Free-text description."
          },
          "Banner": {
            "type": "string",
            "description": "Banner / label text. Null when the asset has none.",
            "nullable": true
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the device."
          },
          "LastBootUpTime": {
            "type": "string",
            "description": "Last boot-up time (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "LastDisconnectDateTime": {
            "type": "string",
            "description": "Last disconnect time (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "LastLoggedOnUser": {
            "type": "string",
            "description": "Last logged-on user (display name)."
          },
          "LastLoggedOnUserUpn": {
            "type": "string",
            "description": "Last logged-on user principal name (UPN)."
          },
          "LastLoggedOnUserDatetime": {
            "type": "string",
            "description": "Timestamp of the last user logon (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "Os": {
            "type": "string",
            "description": "Operating system (full string)."
          },
          "OsType": {
            "type": "string",
            "description": "Operating system type."
          },
          "OsName": {
            "type": "string",
            "description": "Operating system name."
          },
          "OsVersion": {
            "type": "string",
            "description": "Operating system version."
          },
          "OsArchitecture": {
            "type": "string",
            "description": "Operating system architecture."
          },
          "HardwareArchitecture": {
            "type": "string",
            "description": "Hardware architecture."
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "HardwareType": {
            "type": "string",
            "description": "Hardware type name. <b>Deprecated:</b> use `Type`, which also carries the id.",
            "deprecated": true
          },
          "Manufacturer": {
            "type": "string",
            "description": "Hardware manufacturer."
          },
          "Model": {
            "type": "string",
            "description": "Hardware model."
          },
          "SerialNumber": {
            "type": "string",
            "description": "Hardware serial number. The same name and value on a custom asset (`SerialNumber`)."
          },
          "SerialNo": {
            "type": "string",
            "description": "Hardware serial number. <b>Deprecated:</b> use `SerialNumber`, which has the same value.",
            "deprecated": true
          },
          "WarrantyStartDate": {
            "type": "string",
            "description": "Warranty start date (UTC). Sourced from the device's warranty record.",
            "format": "date-time",
            "nullable": true
          },
          "WarrantyEndDate": {
            "type": "string",
            "description": "Warranty end date (UTC). Sourced from the device's warranty record.",
            "format": "date-time",
            "nullable": true
          },
          "Cpu": {
            "type": "string",
            "description": "CPU description."
          },
          "Memory": {
            "type": "string",
            "description": "Total memory."
          },
          "Disk": {
            "type": "string",
            "description": "Disk description."
          },
          "LocalIPAddress": {
            "type": "string",
            "description": "Local IP address."
          },
          "PublicIPAddress": {
            "type": "string",
            "description": "Public IP address."
          },
          "Uuid": {
            "type": "string",
            "description": "Device UUID."
          },
          "ShellVersion": {
            "type": "string",
            "description": "Agent shell version."
          },
          "RmmVersion": {
            "type": "string",
            "description": "RMM agent version."
          },
          "InstallerVersion": {
            "type": "string",
            "description": "Installer version."
          },
          "SecurityPosture": {
            "$ref": "#/components/schemas/SecurityPostureModel"
          }
        },
        "additionalProperties": false,
        "description": "A single agent, as returned by `GET /v1/assets/agents/{deviceId}`: the list shape plus its\r\ncustom properties, which the list leaves out. Timestamps are UTC."
      },
      "AgentAssetResponseBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/AgentAssetResponse"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentAvailableUpdateListModel": {
        "type": "object",
        "properties": {
          "LastScannedOn": {
            "type": "string",
            "description": "When the agent last scanned for updates (UTC); `null` when no scan is cached.",
            "format": "date-time",
            "nullable": true
          },
          "WindowsUpdateStatus": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentAvailableUpdateModel"
            },
            "description": "Pending updates. Empty when none are pending or no scan is cached."
          }
        },
        "additionalProperties": false,
        "description": "The Windows updates an agent has pending, from its last cached scan."
      },
      "AgentAvailableUpdateListModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/AgentAvailableUpdateListModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentAvailableUpdateModel": {
        "type": "object",
        "properties": {
          "UpdateId": {
            "type": "string",
            "description": "Windows Update's id for the update.",
            "nullable": true,
            "example": "9f3c2b1a-5e4d-4c3b-8a7f-6e5d4c3b2a10"
          },
          "Title": {
            "type": "string",
            "description": "Update title.",
            "example": "2026-10 Cumulative Update for Windows 11 Version 24H2 (KB5044284)"
          },
          "Category": {
            "type": "string",
            "description": "`Security` when the update is a security update, otherwise `General`.",
            "example": "General"
          },
          "FirstSeenOn": {
            "type": "string",
            "description": "When the update was first seen pending (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "IsOutOfDate": {
            "type": "boolean",
            "description": "Whether the update has been pending longer than the agent's policy allows."
          },
          "IsFailed": {
            "type": "boolean",
            "description": "Whether the last attempt to install the update failed."
          },
          "FailureMessage": {
            "type": "string",
            "description": "The failure message when `IsFailed` is `true`; otherwise `null`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One pending Windows update."
      },
      "AgentDiskModel": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "Disk name.",
            "nullable": true,
            "example": "Samsung SSD 980 PRO 1TB"
          },
          "Number": {
            "type": "integer",
            "description": "Disk number.",
            "format": "int32",
            "example": 0
          },
          "HealthStatus": {
            "type": "string",
            "description": "Disk health: `Healthy`, `Warning`, `Unhealthy` or `Unknown`.",
            "example": "Healthy"
          },
          "IsOnline": {
            "type": "boolean",
            "description": "`true` when the disk reports itself online; `false` when offline, not ready, without\r\n            media, stopped or failed; `null` when it reported no status.",
            "nullable": true
          },
          "TotalSpaceBytes": {
            "type": "integer",
            "description": "Total size in bytes.",
            "format": "int64"
          },
          "FreeSpaceBytes": {
            "type": "integer",
            "description": "Free space in bytes.",
            "format": "int64"
          },
          "UsedSpaceBytes": {
            "type": "integer",
            "description": "Used space in bytes: total minus free.",
            "format": "int64"
          },
          "Partitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentPartitionModel"
            },
            "description": "The disk's partitions."
          }
        },
        "additionalProperties": false,
        "description": "One physical disk."
      },
      "AgentHardwareModel": {
        "type": "object",
        "properties": {
          "LastScannedOn": {
            "type": "string",
            "description": "When the agent last reported its disks or processors (UTC); `null` when it never has.",
            "format": "date-time",
            "nullable": true
          },
          "HardwareType": {
            "type": "string",
            "description": "The agent's hardware type: the service provider's custom hardware type when one is set,\r\notherwise the type the device reports. The same value as `HardwareType` on\r\n`GET /v1/assets/agents/{agentAssetId}`.",
            "nullable": true,
            "example": "Laptop"
          },
          "Processors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentProcessorModel"
            },
            "description": "The agent's processors. Empty when the agent has reported none."
          },
          "TotalMemoryBytes": {
            "type": "integer",
            "description": "Total installed memory in bytes; `null` when not reported or not readable.",
            "format": "int64",
            "nullable": true,
            "example": 17179869184
          },
          "Disks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentDiskModel"
            },
            "description": "The agent's physical disks."
          }
        },
        "additionalProperties": false,
        "description": "An agent's processors, memory and disks."
      },
      "AgentHardwareModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/AgentHardwareModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentPartitionModel": {
        "type": "object",
        "properties": {
          "DriveLetter": {
            "type": "string",
            "description": "Drive letter; `null` when the partition has none.",
            "nullable": true,
            "example": "C"
          },
          "Label": {
            "type": "string",
            "description": "Volume label.",
            "nullable": true,
            "example": "Windows"
          },
          "FileSystem": {
            "type": "string",
            "description": "File system.",
            "nullable": true,
            "example": "NTFS"
          },
          "TotalSpaceBytes": {
            "type": "integer",
            "description": "Total size in bytes.",
            "format": "int64"
          },
          "FreeSpaceBytes": {
            "type": "integer",
            "description": "Free space in bytes.",
            "format": "int64"
          },
          "UsedSpaceBytes": {
            "type": "integer",
            "description": "Used space in bytes: total minus free.",
            "format": "int64"
          },
          "HealthStatus": {
            "type": "string",
            "description": "Partition health: `Healthy`, `Warning`, `Unhealthy` or `Unknown`.",
            "example": "Healthy"
          },
          "IsBoot": {
            "type": "boolean",
            "description": "Whether this is the boot partition."
          },
          "IsBitLockerProtected": {
            "type": "boolean",
            "description": "`true` when BitLocker protection is on, `false` when it is off, `null` when\r\n            unknown or not reported.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One partition of a disk."
      },
      "AgentPatchListModel": {
        "type": "object",
        "properties": {
          "LastScannedOn": {
            "type": "string",
            "description": "When the agent last reported its patches (UTC); `null` when it never has.",
            "format": "date-time",
            "nullable": true
          },
          "Items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentPatchModel"
            },
            "description": "Installed patches, newest install first. Empty when the agent never reported any."
          }
        },
        "additionalProperties": false,
        "description": "The patches installed on an agent, from its last stored scan."
      },
      "AgentPatchListModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/AgentPatchListModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentPatchModel": {
        "type": "object",
        "properties": {
          "KbArticleId": {
            "type": "string",
            "description": "The patch's KB article id; `null` when it has none, as for a macOS update.",
            "nullable": true,
            "example": "KB5044284"
          },
          "Name": {
            "type": "string",
            "description": "Patch name.",
            "example": "2026-10 Cumulative Update for Windows 11 Version 24H2 for x64-based Systems"
          },
          "InstalledOn": {
            "type": "string",
            "description": "The date the patch was installed; `null` when the agent reported none it could be read from.",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One installed patch."
      },
      "AgentProcessorModel": {
        "type": "object",
        "properties": {
          "Model": {
            "type": "string",
            "description": "Processor model.",
            "example": "Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz"
          },
          "Manufacturer": {
            "type": "string",
            "description": "Manufacturer as the processor reports it; `null` when not reported.",
            "nullable": true,
            "example": "GenuineIntel"
          }
        },
        "additionalProperties": false,
        "description": "One processor."
      },
      "AgentTagConditionModel": {
        "type": "object",
        "properties": {
          "Join": {
            "type": "string",
            "description": "How this condition joins the one before it: `And` or `Or`. `null` on the first\r\ncondition.",
            "nullable": true,
            "example": "And"
          },
          "Property": {
            "type": "string",
            "description": "What is tested: `InstalledApp`, `InstalledService`, `RegistryKey` (uses\r\n`Path`), `WindowsFeature`, `AssetName` or `MacPreference` (uses\r\n`Domain` and `Key`). `null` for a value outside this set.",
            "nullable": true,
            "example": "InstalledApp"
          },
          "Operator": {
            "type": "string",
            "description": "The comparison: `Contains`, `Equals`, `NotEquals`, `Exists` or\r\n`NotExists`. `null` for a value outside this set.",
            "nullable": true,
            "example": "Contains"
          },
          "Value": {
            "type": "string",
            "description": "The value compared against.",
            "nullable": true,
            "example": "Chrome"
          },
          "Path": {
            "type": "string",
            "description": "Registry path, for a `RegistryKey` condition; otherwise `null`.",
            "nullable": true
          },
          "Domain": {
            "type": "string",
            "description": "Preference domain, for a `MacPreference` condition; otherwise `null`.",
            "nullable": true
          },
          "Key": {
            "type": "string",
            "description": "Preference key, for a `MacPreference` condition; otherwise `null`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One condition of a tag."
      },
      "AgentTagConditionsModel": {
        "type": "object",
        "properties": {
          "Windows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTagConditionModel"
            },
            "description": "Conditions evaluated on Windows agents, in order."
          },
          "Mac": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTagConditionModel"
            },
            "description": "Conditions evaluated on macOS agents, in order."
          }
        },
        "additionalProperties": false,
        "description": "A tag's conditions, per platform. Each list is empty when the platform has none."
      },
      "AgentTagModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Tag identifier.",
            "format": "int64",
            "example": 6118
          },
          "Name": {
            "type": "string",
            "description": "Tag name. For a default tag it is the name the app shows: `New`, `All`, the client's\r\nname, `Client (Location)` for a location, or the device type (`Windows Workstation`,\r\n`Windows Server`, `MacOS Workstation`).",
            "example": "Has Chrome"
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Conditions": {
            "$ref": "#/components/schemas/AgentTagConditionsModel"
          }
        },
        "additionalProperties": false,
        "description": "A tag applied to an agent."
      },
      "AgentTagModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTagModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AlertListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Alert identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "The alert's subject, as the app's alert list shows it after the type - e.g.\r\n`\"Safari not found\"` for a Process alert, `\"Sentinel Agent Missing\"` for an\r\nAntivirus one, `\"Expires in 10 days\"` for an expiration."
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Severity": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Message": {
            "type": "string",
            "description": "The alert's message. Empty for uptime and external alerts."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the alert relates to. Null when the alert's type does not\r\ncarry a client (uptime, external and script alerts).",
            "format": "int64",
            "nullable": true
          },
          "AgentAssetId": {
            "type": "string",
            "description": "Identifier of the agent asset the alert relates to - the id `GET /v1/assets/agents/{agentAssetId}`\r\ntakes. Null when there is none, and on an alert about a custom asset or an uptime.",
            "format": "uuid",
            "nullable": true
          },
          "DeviceId": {
            "type": "string",
            "description": "Identifier of the agent asset the alert relates to. <b>Deprecated:</b> use `AgentAssetId`,\r\nwhich has the same value.",
            "format": "uuid",
            "nullable": true,
            "deprecated": true
          },
          "CustomAssetId": {
            "type": "string",
            "description": "Identifier of the custom asset the alert relates to - the id `GET /v1/assets/custom/{customAssetId}`\r\ntakes. Set on a `Warranty Expiration` alert about a custom asset and on an `API` alert posted with a\r\n`CustomAssetId`; null on every other alert.",
            "format": "uuid",
            "nullable": true
          },
          "CheckId": {
            "type": "string",
            "description": "The check that raised this alert - a reusable check definition applied to devices\r\nthrough a policy, not a per-device record. Null on alerts not raised by one, including\r\nuptime alerts, which carry `UptimeId` instead.",
            "nullable": true
          },
          "UptimeId": {
            "type": "string",
            "description": "The uptime that raised this alert, for `Uptime` alerts only - the same\r\nidentifier `GET /v1/uptime/{uptimeId}` takes. At most one of this and\r\n`CheckId` is set.",
            "format": "uuid",
            "nullable": true
          },
          "UptimeCheckId": {
            "type": "string",
            "description": "The uptime that raised this alert. <b>Deprecated:</b> use `UptimeId`, which has the same value.",
            "format": "uuid",
            "nullable": true,
            "deprecated": true
          },
          "TicketId": {
            "type": "string",
            "description": "Identifier of the ticket created from this alert. Null when no ticket has been created.",
            "format": "uuid",
            "nullable": true
          },
          "ContractId": {
            "type": "integer",
            "description": "The contract behind a `Contract Expiration` alert. Null on every other alert.\r\n            \r\n\n\r\nThe identifier `GET /v1/contracts/{contractId}` takes, so an expiration alert resolves\r\nto its contract without a second lookup.\r\n",
            "format": "int64",
            "nullable": true
          },
          "DomainId": {
            "type": "integer",
            "description": "The web domain behind a `Domain Expiration` alert. Null on every other alert.\r\n            \r\n\n\r\nIdentifies the expiring domain, so it distinguishes - and lets a caller group - the many\r\nalerts a single domain produces as its expiry approaches.\r\n",
            "format": "int64",
            "nullable": true
          },
          "DismissedOn": {
            "type": "string",
            "description": "When the alert was dismissed (UTC), or null when it is not dismissed. The same value the\r\napp shows under \"Dismiss - By/On\".",
            "format": "date-time",
            "nullable": true
          },
          "DismissedBy": {
            "type": "integer",
            "description": "Identifier of the technician who dismissed the alert, or null when it is not dismissed.\r\nResolve it with the technician endpoint.\r\n            \r\n\n\r\nAlso null when the alert was dismissed automatically rather than by a person, so an\r\nauto-dismissal cannot currently be told apart from an unattributed one.\r\n",
            "format": "int64",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the alert was raised (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the alert was last updated (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An alert as returned by the alert list endpoint. All timestamps are UTC."
      },
      "AlertListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "AlertSeverity": {
        "enum": [
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "description": "How severe an alert is: `1` Critical, `2` Error, `3` Warning,\r\n`4` Information.",
        "format": "int32"
      },
      "ApiKeyModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "API key identifier.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "The name the key is identified by."
          },
          "Description": {
            "type": "string",
            "description": "What the key is for.",
            "nullable": true
          },
          "Scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The scopes the key carries, as granted. Keys issued before per-verb scopes may carry a bare\r\nmodule name, such as `Tickets`, which grants every verb on that module."
          },
          "CreatedAt": {
            "type": "string",
            "description": "When the key was created (UTC).",
            "format": "date-time"
          },
          "LastUsedAt": {
            "type": "string",
            "description": "When the key was last used to make a call (UTC), or null if it never has been.",
            "format": "date-time",
            "nullable": true
          },
          "RevokedAt": {
            "type": "string",
            "description": "When the key was revoked (UTC), or null while it is still active. A revoked key is rejected on every call.",
            "format": "date-time",
            "nullable": true
          },
          "ParentApiKeyId": {
            "type": "string",
            "description": "The key that created this one through `POST /v1/api-keys`, or null for a key created\r\nin Gorelo or by a signed-in user. The parent may since have been revoked; that does not\r\nrevoke this key.",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An API key belonging to the service provider. The key value itself is never returned - it is\r\nshown once, when the key is created. Timestamps are UTC."
      },
      "ApiKeyModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ApprovalDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Approval identifier, as a string. Matches the `Id` from the conversations list."
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Short label for the approval."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Approvers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApproverModel"
            },
            "description": "One row per person who must approve."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Full details of one approval on a ticket — this is where approval status lives, the\r\nconversations list being deliberately lean. Attachments belong to the approval's comments\r\nrather than to the approval itself, so there is no attachments field here. Timestamps are UTC."
      },
      "ApprovalDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ApprovalDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ApproverModel": {
        "type": "object",
        "properties": {
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the contact asked to approve.",
            "format": "int64"
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "One person's response on an approval.\r\n            \r\nThere is deliberately no response timestamp here. The approver document carries a\r\n`submittedAt`, but it is written once when the approver is created and is never\r\nrewritten when they answer — every decided approver observed on Dev carried a\r\n`submittedAt` within 130ms of its approval's creation. Exposing it would publish a\r\ncreation time under a name that promises a response time."
      },
      "BillingRoleModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the billing role. Send this as BillingRoleId when logging time.",
            "format": "int64",
            "example": 12
          },
          "Name": {
            "type": "string",
            "description": "Display name of the billing role.",
            "example": "Senior Engineer"
          },
          "HourlyRate": {
            "type": "number",
            "description": "Hourly rate charged for this role, in the service provider's currency.",
            "format": "double",
            "example": 150
          },
          "CoaCode": {
            "type": "string",
            "description": "Chart-of-accounts code this role posts to, when one is configured.",
            "nullable": true,
            "example": "4000"
          },
          "Tax": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "A billing role configured for the service provider."
      },
      "BillingRoleModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingRoleModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "BlockHoursDetailsModel": {
        "type": "object",
        "properties": {
          "Balance": {
            "type": "number",
            "description": "The block's total balance, in hours.",
            "format": "double",
            "nullable": true
          },
          "WarningThreshold": {
            "type": "number",
            "description": "Hours remaining before a low-balance warning is raised on the block.",
            "format": "double",
            "nullable": true
          },
          "OverrunThreshold": {
            "type": "number",
            "description": "How far past zero the block may run before it is considered overrun.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BooleanBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "boolean"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ChecklistSummaryModel": {
        "type": "object",
        "properties": {
          "Completed": {
            "type": "integer",
            "description": "How many checklist items are completed.",
            "format": "int32"
          },
          "Total": {
            "type": "integer",
            "description": "How many checklist items exist in total.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Checklist completion across every checklist on a ticket."
      },
      "ClientListItemResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Client identifier.",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "Client display name."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "BillingName": {
            "type": "string",
            "description": "Name used on invoices."
          },
          "AlternateName": {
            "type": "string",
            "description": "Alternate / trading name."
          },
          "IsDefault": {
            "type": "boolean",
            "description": "Whether this is the default client.",
            "nullable": true
          },
          "Domains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientWebDomainResponse"
            },
            "description": "Web domains associated with the client."
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Ids of the groups the client is subscribed to (Client > Quick Links > Groups in Gorelo web),\r\nascending. Names are on `GET /v1/organization/groups`. Empty when the client has none."
          }
        },
        "additionalProperties": false,
        "description": "A client (customer organization) as listed by `GET /v1/clients`. Timestamps are UTC."
      },
      "ClientListItemResponseListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientListItemResponse"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientLocationRequest": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Location display name. Required. Maximum 150 characters.",
            "example": "Head Office"
          },
          "PhoneCountryCode": {
            "type": "string",
            "description": "Phone ISO 3166-1 alpha-2 region code (e.g. US). Maximum 25 characters.",
            "nullable": true
          },
          "Phone": {
            "type": "string",
            "description": "Phone number, as dialled within its country, e.g. 021 123 4567 for NZ; an international +64 21 123 4567 is accepted too. A number sent without its leading 0 (21 123 4567) is stored with it. Maximum 15 characters.",
            "nullable": true
          },
          "PhoneExt": {
            "type": "string",
            "description": "Phone extension. Maximum 5 characters.",
            "nullable": true
          },
          "Address1": {
            "type": "string",
            "description": "Address line 1. Maximum 150 characters.",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "description": "Address line 2. Maximum 150 characters.",
            "nullable": true
          },
          "City": {
            "type": "string",
            "description": "City. Maximum 100 characters.",
            "nullable": true
          },
          "State": {
            "type": "string",
            "description": "State / province. Maximum 100 characters.",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "description": "Country. Maximum 100 characters.",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "description": "Postal / ZIP code. Maximum 10 characters.",
            "nullable": true
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the location (e.g. America/New_York). Maximum 200 characters.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Location details supplied when creating a client's default location."
      },
      "ClientLocationResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Location identifier.",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "Location display name."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client this location belongs to.",
            "format": "int64"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "PrimaryContactId": {
            "type": "integer",
            "description": "Identifier of the primary contact for the location.",
            "format": "int64",
            "nullable": true
          },
          "PhoneCountryCode": {
            "type": "string",
            "description": "Phone ISO 3166-1 alpha-2 region code (e.g. US)."
          },
          "Phone": {
            "type": "string",
            "description": "Phone number, as dialled within its country, e.g. 021 123 4567 for NZ."
          },
          "PhoneExt": {
            "type": "string",
            "description": "Phone extension."
          },
          "BillingContactIds": {
            "type": "string",
            "description": "Comma-separated identifiers of billing contacts."
          },
          "Address1": {
            "type": "string",
            "description": "Address line 1."
          },
          "Address2": {
            "type": "string",
            "description": "Address line 2."
          },
          "City": {
            "type": "string",
            "description": "City."
          },
          "State": {
            "type": "string",
            "description": "State / province."
          },
          "Country": {
            "type": "string",
            "description": "Country."
          },
          "PostalCode": {
            "type": "string",
            "description": "Postal / ZIP code."
          },
          "GeoLocationLatitude": {
            "type": "number",
            "description": "Geolocation latitude.",
            "format": "double",
            "nullable": true
          },
          "GeoLocationLongitude": {
            "type": "number",
            "description": "Geolocation longitude.",
            "format": "double",
            "nullable": true
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the location."
          },
          "IsDefault": {
            "type": "boolean",
            "description": "Whether this is the client's default location.",
            "nullable": true
          },
          "IsDefaultBilling": {
            "type": "boolean",
            "description": "Whether this is the client's default billing location.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A client location. Timestamps are UTC."
      },
      "ClientLocationResponseListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientLocationResponse"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientResponse": {
        "type": "object",
        "properties": {
          "CustomProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomPropertyValue"
            },
            "description": "Every custom field the service provider has defined for clients, with its effective value\r\non this client (saved, else the field's default, else null) and `IsSet` saying whether\r\na value is saved. Empty only when no custom fields are defined."
          },
          "Id": {
            "type": "integer",
            "description": "Client identifier.",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "Client display name."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "BillingName": {
            "type": "string",
            "description": "Name used on invoices."
          },
          "AlternateName": {
            "type": "string",
            "description": "Alternate / trading name."
          },
          "IsDefault": {
            "type": "boolean",
            "description": "Whether this is the default client.",
            "nullable": true
          },
          "Domains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientWebDomainResponse"
            },
            "description": "Web domains associated with the client."
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Ids of the groups the client is subscribed to (Client > Quick Links > Groups in Gorelo web),\r\nascending. Names are on `GET /v1/organization/groups`. Empty when the client has none."
          }
        },
        "additionalProperties": false,
        "description": "A single client, as returned by `GET /v1/clients/{clientId}`, `POST` and `PATCH`: the\r\nlist shape plus its custom properties, which the list deliberately leaves out.\r\nTimestamps are UTC."
      },
      "ClientResponseBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ClientResponse"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientWebDomainResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Web domain identifier.",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "Domain name (e.g. contoso.com)."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ExpirationDate": {
            "type": "string",
            "description": "Domain registration expiration date, as a calendar date (\"yyyy-MM-dd\").",
            "format": "date",
            "nullable": true
          },
          "IsDateSetManually": {
            "type": "boolean",
            "description": "Whether the expiration date was set manually rather than resolved automatically."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "A web domain associated with a client. Timestamps are UTC."
      },
      "CodeModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Numeric identifier of the coded value (e.g. status, priority, type, or source id).",
            "format": "int64",
            "example": 1
          },
          "Name": {
            "type": "string",
            "description": "Display name of the coded value."
          }
        },
        "additionalProperties": false,
        "description": "A coded value, such as a status, priority, type or source, as an id and a display name."
      },
      "CodeModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CommentAttachmentInput": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "File name as it should appear."
          },
          "Url": {
            "type": "string",
            "description": "The url the upload returned. Any access token on it is stripped before storage."
          }
        },
        "additionalProperties": false,
        "description": "A file to attach to a comment."
      },
      "CommentAttachmentModel": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "File name."
          },
          "Url": {
            "type": "string",
            "description": "Temporary secure download link. Expires."
          }
        },
        "additionalProperties": false,
        "description": "A file attached to a comment, and what the upload endpoint returns."
      },
      "CommentAttachmentModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CommentAttachmentModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CommentAuthorModel": {
        "type": "object",
        "properties": {
          "Type": {
            "type": "string",
            "description": "One of `User`, `Contact`, `Automation`, `AI Agent`, `API`."
          },
          "Id": {
            "type": "integer",
            "description": "Identifier of the author. Null for authors that have no numeric id of their own -\r\nAI agents, automations, and comments created through the public API.",
            "format": "int64",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "description": "Display name of the author."
          },
          "Email": {
            "type": "string",
            "description": "Email address of the author, where we have it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Who wrote a comment."
      },
      "CommentEmailInfoModel": {
        "type": "object",
        "properties": {
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ErrorDetail": {
            "type": "string",
            "description": "Reason the send failed; null unless `Status` is `Failed`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Delivery state of this comment's email. Recipients are not here: they belong to the\r\nconversation, not to one comment, and are served by the conversations endpoint."
      },
      "CommentListItemModel": {
        "type": "object",
        "properties": {
          "BodyTruncated": {
            "type": "boolean",
            "description": "True when the full HTML body is stored separately and was left out of the list to keep it\r\nfast. Fetch the single comment to get the complete `BodyHtml`."
          },
          "Id": {
            "type": "string",
            "description": "Comment identifier.",
            "format": "uuid"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation this comment belongs to, as a string. Null for public and\r\nprivate comments, which are the ticket's main thread rather than a separate conversation.",
            "nullable": true
          },
          "ConversationType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Source": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BodyHtml": {
            "type": "string",
            "description": "Comment body as HTML.",
            "nullable": true
          },
          "BodyText": {
            "type": "string",
            "description": "Comment body without HTML — the markdown stored alongside it. Comments written before\r\nthat was stored fall back to the HTML with its tags removed."
          },
          "Author": {
            "$ref": "#/components/schemas/CommentAuthorModel"
          },
          "EmailInfo": {
            "$ref": "#/components/schemas/CommentEmailInfoModel"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to the comment."
          },
          "SentimentScore": {
            "type": "number",
            "description": "Customer sentiment scored on incoming comments; null when not scored.",
            "format": "double",
            "nullable": true
          },
          "Reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentReactionModel"
            },
            "description": "Reactions left on the comment."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A comment as it appears in the comments list. Adds `BodyTruncated`, which the\r\nsingle-comment endpoint omits because it always returns the full body."
      },
      "CommentListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CommentModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Comment identifier.",
            "format": "uuid"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation this comment belongs to, as a string. Null for public and\r\nprivate comments, which are the ticket's main thread rather than a separate conversation.",
            "nullable": true
          },
          "ConversationType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Source": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BodyHtml": {
            "type": "string",
            "description": "Comment body as HTML.",
            "nullable": true
          },
          "BodyText": {
            "type": "string",
            "description": "Comment body without HTML — the markdown stored alongside it. Comments written before\r\nthat was stored fall back to the HTML with its tags removed."
          },
          "Author": {
            "$ref": "#/components/schemas/CommentAuthorModel"
          },
          "EmailInfo": {
            "$ref": "#/components/schemas/CommentEmailInfoModel"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to the comment."
          },
          "SentimentScore": {
            "type": "number",
            "description": "Customer sentiment scored on incoming comments; null when not scored.",
            "format": "double",
            "nullable": true
          },
          "Reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentReactionModel"
            },
            "description": "Reactions left on the comment."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A comment on a ticket. Timestamps are UTC."
      },
      "CommentModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CommentModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CommentReactionModel": {
        "type": "object",
        "properties": {
          "UserId": {
            "type": "integer",
            "description": "Identifier of the user who reacted.",
            "format": "int64"
          },
          "ReactionId": {
            "type": "integer",
            "description": "Identifier of the reaction.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A reaction left on a comment."
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Contact identifier.",
            "format": "int64"
          },
          "FirstName": {
            "type": "string",
            "description": "Contact first name."
          },
          "LastName": {
            "type": "string",
            "description": "Contact last name."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the contact belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the contact belongs to.",
            "format": "int64",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "PrimaryEmail": {
            "type": "string",
            "description": "Primary email address."
          },
          "Alias": {
            "type": "string",
            "description": "Contact alias."
          },
          "MobilePhone": {
            "type": "string",
            "description": "Mobile phone number, as dialled within its country, e.g. 021 123 4567 for NZ."
          },
          "MobilePhoneCountryCode": {
            "type": "string",
            "description": "Mobile phone ISO 3166-1 alpha-2 region code (e.g. US)."
          },
          "OfficePhone": {
            "type": "string",
            "description": "Office phone number, as dialled within its country, e.g. 021 123 4567 for NZ."
          },
          "OfficePhoneCountryCode": {
            "type": "string",
            "description": "Office phone ISO 3166-1 alpha-2 region code (e.g. US)."
          },
          "JobTitle": {
            "type": "string",
            "description": "Contact job title."
          },
          "Department": {
            "type": "string",
            "description": "Contact department."
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the contact."
          },
          "Description": {
            "type": "string",
            "description": "Free-text description / notes."
          },
          "IsTemporaryContact": {
            "type": "boolean",
            "description": "Whether the contact is a temporary (auto-created) contact."
          },
          "MergedWithContactId": {
            "type": "integer",
            "description": "Identifier of the contact this one was merged with, if any.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A contact belonging to a client. Timestamps are UTC."
      },
      "ContactResponseBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ContactResponse"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ContactResponseListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactResponse"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ContractDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the contract.",
            "format": "int64",
            "example": 4021
          },
          "Name": {
            "type": "string",
            "description": "Name of the contract.",
            "example": "All Labor Terms Example"
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Client": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "LocationIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The client locations the contract is scoped to, as location ids. Empty\r\nwhen the contract covers every one of the client's locations (see\r\n`IsForAllLocations`) as well as when a location-scoped contract's rows have all\r\nbeen removed; never null."
          },
          "IsForAllLocations": {
            "type": "boolean",
            "description": "Whether the contract covers every one of the client's locations rather than the specific\r\nones named in `LocationIds`. When true, `LocationIds` is empty by\r\ndefinition."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the contract was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the contract was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "Reference": {
            "type": "string",
            "description": "The contract's invoice reference, free text. Null when it is not set.",
            "nullable": true,
            "example": "MSA-2025-014"
          },
          "StartDate": {
            "type": "string",
            "description": "Date the contract's coverage starts, a calendar date.",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "description": "Date the contract's coverage ends, a calendar date, or null when it is open-ended.",
            "format": "date",
            "nullable": true
          },
          "RepeatPeriod": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "DaysBeforeInvoiceCreation": {
            "type": "integer",
            "description": "How many days before the billing period ends the invoice is generated.",
            "format": "int32",
            "nullable": true
          },
          "InvoiceDue": {
            "type": "integer",
            "description": "How many days the client has to pay once invoiced.",
            "format": "int64"
          },
          "AutoApproveAndSend": {
            "type": "boolean",
            "description": "Whether an invoice raised from this contract is approved and sent automatically.",
            "nullable": true
          },
          "Contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeModel"
            },
            "description": "The contacts who can auto-approve invoices on this contract. Empty when none are set."
          },
          "RecurringAmount": {
            "type": "number",
            "description": "Total recurring amount the contract bills each period, before tax.",
            "format": "double",
            "example": 6870
          },
          "RecurringCost": {
            "type": "number",
            "description": "Total recurring cost of the contract's recurring products each period.",
            "format": "double",
            "example": 2981.36
          },
          "ServiceLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractServiceLineDetailModel"
            },
            "description": "The contract's service lines. Empty when the contract has none; never null."
          }
        },
        "additionalProperties": false,
        "description": "Everything about one contract: the client and locations it covers, its billing schedule, and\r\neach service line with the actual products/labor billed on it."
      },
      "ContractDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ContractDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ContractLineItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of this line.",
            "format": "int64"
          },
          "ItemId": {
            "type": "string",
            "description": "The catalog item this line bills, resolving against `GET /v1/items`. Null for a line\r\nthat does not reference a catalog item.",
            "format": "uuid",
            "nullable": true
          },
          "ItemType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Name of the line as billed."
          },
          "Description": {
            "type": "string",
            "description": "Description of the line as billed, if any.",
            "nullable": true
          },
          "Quantity": {
            "type": "number",
            "description": "Quantity billed.",
            "format": "double",
            "nullable": true
          },
          "Cost": {
            "type": "number",
            "description": "Unit cost of the line.",
            "format": "double",
            "nullable": true
          },
          "UnitPrice": {
            "type": "number",
            "description": "Unit price charged.",
            "format": "double"
          },
          "DiscountPercent": {
            "type": "number",
            "description": "Discount percentage applied to this line, 0-100.",
            "format": "double",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "description": "Date this line's coverage starts, if it is date-scoped. A calendar date.",
            "format": "date",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "description": "Date this line's coverage ends, if it is date-scoped. A calendar date.",
            "format": "date",
            "nullable": true
          },
          "Tax": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Amount": {
            "type": "number",
            "description": "Line total after discount, before tax.",
            "format": "double"
          },
          "TaxAmount": {
            "type": "number",
            "description": "Tax on this line.",
            "format": "double",
            "nullable": true
          },
          "BillableStatus": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "One product, bundle or labor charge billed on a contract's service line."
      },
      "ContractModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the contract.",
            "format": "int64",
            "example": 4021
          },
          "Name": {
            "type": "string",
            "description": "Name of the contract.",
            "example": "All Labor Terms Example"
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ClientId": {
            "type": "integer",
            "description": "Client the contract is billed to.",
            "format": "int64",
            "example": 88
          },
          "LocationIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The client locations the contract is scoped to, as location ids ascending. An empty array\r\nwhen the contract covers all of the client's locations (see\r\n`IsForAllLocations`); also empty when a location-scoped contract's locations\r\nhave all been removed. Never null."
          },
          "IsForAllLocations": {
            "type": "boolean",
            "description": "Whether the contract covers every one of the client's locations rather than the specific\r\nones named in `LocationIds`. When true, `LocationIds` is empty by\r\ndefinition."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the contract was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the contract was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "Reference": {
            "type": "string",
            "description": "The contract's invoice reference, free text. Null when it is not set.\r\n\n\r\nThis is the product's invoice-reference field, and it doubles as a template: values such as\r\n`{{contractgroupname}}-{{billingmonth}}` are common and are substituted when an invoice\r\nis raised. It is returned exactly as stored, tokens included.\r\n",
            "nullable": true,
            "example": "MSA-2025-014"
          },
          "StartDate": {
            "type": "string",
            "description": "Date the contract's coverage starts, a calendar date.",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "description": "Date the contract's coverage ends, a calendar date, or null when it is open-ended.",
            "format": "date",
            "nullable": true
          },
          "RepeatPeriod": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "RecurringAmount": {
            "type": "number",
            "description": "Total recurring amount the contract bills each period, before tax, summed across its service\r\nlines. Zero when the contract has no recurring products.",
            "format": "double",
            "example": 3870
          },
          "RecurringCost": {
            "type": "number",
            "description": "Total recurring cost of the contract's recurring products each period, summed across its\r\nservice lines. Cost is the unit cost recorded against each product line multiplied by its\r\nquantity, so RecurringAmount minus RecurringCost is the contract's periodic margin.",
            "format": "double",
            "example": 1681.36
          },
          "ServiceLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractServiceLineModel"
            },
            "description": "The contract's service lines. An empty array when the contract has none; never null.\r\nSoft-deleted service lines are omitted."
          }
        },
        "additionalProperties": false,
        "description": "A billing contract and the service lines it is made of."
      },
      "ContractModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ContractServiceLineDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the service line. The same value a time entry's ServiceLineId carries.",
            "format": "int64",
            "example": 88214
          },
          "Name": {
            "type": "string",
            "description": "Name of the service line."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the service line was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the service line was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "LaborTerms": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "WorkTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeModel"
            },
            "description": "The work types this line applies to. Only recorded for an Unlimited Hours line; empty for\r\nevery other `LaborTerms` today, since the other labor terms carry no work-type\r\nselection of their own in storage."
          },
          "WorkRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeModel"
            },
            "description": "Same coverage as `WorkTypes`, for billing roles."
          },
          "UnlimitedHoursDetails": {
            "$ref": "#/components/schemas/UnlimitedHoursDetailsModel"
          },
          "PerHourDetails": {
            "$ref": "#/components/schemas/PerHourDetailsModel"
          },
          "LimitedHoursDetails": {
            "$ref": "#/components/schemas/LimitedHoursDetailsModel"
          },
          "BlockHoursDetails": {
            "$ref": "#/components/schemas/BlockHoursDetailsModel"
          },
          "RecurringAmount": {
            "type": "number",
            "description": "Recurring amount this service line bills each period, before tax.",
            "format": "double"
          },
          "RecurringCost": {
            "type": "number",
            "description": "Recurring cost of this service line's recurring products each period.",
            "format": "double"
          },
          "LineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractLineItemModel"
            },
            "description": "The actual products/labor billed on this line. Empty array when nothing is billed on it\r\nyet; never null."
          }
        },
        "additionalProperties": false,
        "description": "One service line inside a contract, with the products/labor billed on it."
      },
      "ContractServiceLineModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the service line.",
            "format": "int64",
            "example": 88214
          },
          "Name": {
            "type": "string",
            "description": "Name of the service line.",
            "example": "Managed Services"
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the service line was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the service line was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "LaborTerms": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "LaborRates": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "RecurringAmount": {
            "type": "number",
            "description": "Recurring amount this service line bills each period, before tax.",
            "format": "double",
            "example": 2280
          },
          "RecurringCost": {
            "type": "number",
            "description": "Recurring cost of this service line's recurring products each period.",
            "format": "double",
            "example": 591.36
          }
        },
        "additionalProperties": false,
        "description": "One service line inside a contract: a Billing.Agreement row. Its Id is the value a time entry's\r\nServiceLineId carries."
      },
      "ConversationListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Conversation identifier, as a string. Null for the Public and Private rows, which are\r\nthe ticket's main thread and have no id to drill into.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Short label for the conversation."
          },
          "Email": {
            "type": "string",
            "description": "Address this conversation is directed to — the ticket's contact for Public, the side\r\nconversation's own address, the first approver for Approval. Null for Private, which is\r\nnever emailed.",
            "nullable": true
          },
          "CcEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Addresses copied on this conversation — the ticket's CC contacts for Public, the side\r\nconversation's CC list. Empty for Private and Approval, neither of which copies anyone."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A conversation on a ticket. Deliberately lean and identical in shape for every conversation\r\ntype — type-specific details (approvers, side-conversation email) live on that type's own\r\ndetail endpoint. Timestamps are UTC."
      },
      "ConversationListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateApiKeyCommand": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "A name to identify the key by. Required.",
            "example": "CI pipeline"
          },
          "Description": {
            "type": "string",
            "description": "What the key is for.",
            "nullable": true
          },
          "Scopes": {
            "type": "array",
            "items": {
              "enum": [
                "Organization:read",
                "Organization:write",
                "Organization:delete",
                "Tickets:read",
                "Tickets:write",
                "Tickets:delete",
                "Clients:read",
                "Clients:write",
                "Clients:delete",
                "Contacts:read",
                "Contacts:write",
                "Contacts:delete",
                "Billing:read",
                "Billing:write",
                "Billing:delete",
                "Project:read",
                "Project:write",
                "Project:delete",
                "Assets:read",
                "Assets:write",
                "Assets:delete",
                "Alerts:read",
                "Alerts:write",
                "Alerts:delete",
                "Forms:read",
                "Forms:write",
                "Forms:delete",
                "Documents:read",
                "Documents:write",
                "Documents:delete"
              ],
              "type": "string"
            },
            "description": "The scopes the new key carries, each an explicit `\"Module:verb\"`. Required, and every\r\nentry must be one the calling key already holds.\r\n            \r\n\nThe valid values are published as the enum on this property. Verbs are independent -\r\n`write` does not imply `read`. Note `Project` is singular. Scopes are stored\r\nas published here, whatever casing is sent; the older `ServiceProvider:verb` is still\r\naccepted and is stored as `Organization:verb`.",
            "example": [
              "Tickets:read",
              "Tickets:write"
            ]
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating an API key. The owning service provider and the calling key's own\r\nscopes are resolved from the request context, not from the body."
      },
      "CreateApiKeyResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "KeyValue": {
            "type": "string",
            "description": "The key value itself. Only the hash is stored, so this response is the single opportunity\r\nto capture it - it cannot be read back afterwards."
          },
          "Name": {
            "type": "string"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "The created key. `KeyValue` is returned here and nowhere else, ever."
      },
      "CreateApiKeyResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateApiKeyResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateApprovalCommand": {
        "required": [
          "ContactIds",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Short label for the approval."
          },
          "ContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of the contacts asked to approve. At least one is required. Every id must be\r\nActive, belong to this ticket's client (any client when the ticket has none) and carry a\r\ncontact tag marked as an approver — the same restriction the app's own approver picker\r\napplies."
          },
          "AttachPublicConversation": {
            "type": "boolean",
            "description": "When true, the public comments already on the ticket's main thread are attached the first\r\ntime a comment is posted into this approval. Matches the in-app checkbox (\"Attach all\r\nPublic comments to this Approval\")."
          }
        },
        "additionalProperties": false
      },
      "CreateApprovalResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created approval. Matches the conversations list's `Id`."
          }
        },
        "additionalProperties": false
      },
      "CreateApprovalResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateApprovalResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateClientCommand": {
        "required": [
          "Location",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Client display name. Required. Maximum 150 characters.",
            "example": "Contoso Ltd"
          },
          "BillingName": {
            "type": "string",
            "description": "Optional name used on invoices when it differs from the display name. Maximum 150 characters.",
            "nullable": true
          },
          "AlternateName": {
            "type": "string",
            "description": "Optional alternate / trading name. Maximum 500 characters.",
            "nullable": true
          },
          "Domain": {
            "type": "string",
            "description": "Optional primary web domain for the client (e.g. contoso.com). Maximum 256 characters.",
            "nullable": true
          },
          "Location": {
            "$ref": "#/components/schemas/ClientLocationRequest"
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating a client, along with its default location."
      },
      "CreateCommentCommand": {
        "required": [
          "Body",
          "ConversationTypeId"
        ],
        "type": "object",
        "properties": {
          "ConversationTypeId": {
            "type": "integer",
            "description": "1 Public, 2 Private, 3 Side Conversation, 4 Approval.",
            "format": "int64"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation to post into. Required for Side Conversation and Approval,\r\nand rejected for Public and Private, which are the ticket's main thread.",
            "nullable": true
          },
          "Body": {
            "minLength": 1,
            "type": "string",
            "description": "Comment body as HTML. Mentions go inside the HTML. A literal < or > in the text must be sent as\r\n`&lt;` / `&gt;`."
          },
          "CreatedByName": {
            "type": "string",
            "description": "Display name to show the comment as. The comment is still recorded as API-authored — a\r\nname cannot be used to post as a specific real user. Omitted or blank, it is recorded as `API`.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "Backdate the comment's timestamp — for importing ticket history from another system.\r\nMust not be in the future or earlier than the ticket's own CreatedOn. Omit to use the\r\ncurrent time.\r\n            \r\nWhen supplied, the ticket's UpdatedOn becomes the later of its current value and this\r\ntimestamp, so importing older history does not push the ticket to the top of an\r\nupdatedOn-sorted list.\r\n            \r\nSend only when importing history. A record with this field set sends no emails or notifications.",
            "format": "date-time",
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files to attach, as returned by the attachment upload endpoint."
          }
        },
        "additionalProperties": false
      },
      "CreateCommentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created comment.",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "CreateCommentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateCommentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateContactCommand": {
        "required": [
          "FirstName",
          "LastName",
          "PrimaryEmail"
        ],
        "type": "object",
        "properties": {
          "FirstName": {
            "minLength": 1,
            "type": "string",
            "description": "Contact first name. Required. Maximum 150 characters.",
            "example": "Jane"
          },
          "LastName": {
            "minLength": 1,
            "type": "string",
            "description": "Contact last name. Required. Maximum 150 characters.",
            "example": "Doe"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the contact belongs to. Optional. When omitted the contact is\r\ncreated as a temporary contact (IsTemporaryContact true) with no client, the way an email\r\nfrom an unknown requester creates one; a temporary contact can be the contact or a cc\r\ncontact on a ticket that has no client.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the contact belongs to. Requires ClientId.",
            "format": "int64",
            "nullable": true
          },
          "PrimaryEmail": {
            "minLength": 1,
            "type": "string",
            "description": "Primary email address. Required. Maximum 200 characters.",
            "example": "jane.doe@contoso.com"
          },
          "SecondaryEmail": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional (secondary) email addresses. Maximum 200 characters each.",
            "nullable": true
          },
          "MobilePhone": {
            "type": "string",
            "description": "Mobile phone number, as dialled within its country, e.g. 021 123 4567 for NZ; an international +64 21 123 4567 is accepted too. A number sent without its leading 0 (21 123 4567) is stored with it. Maximum 20 characters."
          },
          "MobilePhoneCountryCode": {
            "type": "string",
            "description": "Mobile phone ISO 3166-1 alpha-2 region code (e.g. US). Maximum 100 characters."
          },
          "OfficePhone": {
            "type": "string",
            "description": "Office phone number, as dialled within its country, e.g. 021 123 4567 for NZ; an international +64 21 123 4567 is accepted too. A number sent without its leading 0 (21 123 4567) is stored with it. Maximum 20 characters."
          },
          "OfficePhoneCountryCode": {
            "type": "string",
            "description": "Office phone ISO 3166-1 alpha-2 region code (e.g. US). Maximum 25 characters."
          },
          "JobTitle": {
            "type": "string",
            "description": "Contact job title. Maximum 100 characters."
          },
          "Department": {
            "type": "string",
            "description": "Contact department. Maximum 150 characters."
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the contact (e.g. America/New_York). Maximum 50 characters."
          },
          "Description": {
            "type": "string",
            "description": "Free-text description / notes for the contact. Maximum 2000 characters."
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating a contact, under a client or, with no client, as a temporary contact."
      },
      "CreateCustomAssetCommand": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "Display name of the asset. Required, max 300 characters, cannot be blank.",
            "example": "Reception printer"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the asset belongs to. Required; the client must be active.",
            "format": "int64",
            "example": 3521
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the asset sits at. Required; must be an active location of\r\n`ClientId`.",
            "format": "int64",
            "example": 4410
          },
          "HardwareTypeId": {
            "type": "integer",
            "description": "Identifier of the asset's hardware type, one of the service provider's active custom asset\r\ntypes. Required.",
            "format": "int64",
            "example": 118
          },
          "Description": {
            "type": "string",
            "description": "Free-text description. Optional, max 1000 characters.",
            "nullable": true,
            "example": "HP LaserJet on the front desk"
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the contact the asset is assigned to. Optional; must be an active contact of\r\n`ClientId`.",
            "format": "int64",
            "nullable": true,
            "example": 7962
          },
          "WarrantyEndDate": {
            "type": "string",
            "description": "Date the warranty ends, a calendar date in the form yyyy-MM-dd. A value with a time or a time zone is rejected. Optional.",
            "format": "date",
            "nullable": true,
            "example": "2027-03-31"
          },
          "LocalIPAddress": {
            "type": "string",
            "description": "IPv4 address of the asset, such as 192.168.1.20. Optional. The same name an agent asset publishes.",
            "nullable": true,
            "example": "192.168.1.20"
          },
          "IpAddress": {
            "type": "string",
            "description": "IPv4 address of the asset. Optional. <b>Deprecated:</b> use `LocalIPAddress`. Still accepted;\r\nsending both with different values is a 400.",
            "nullable": true,
            "example": "192.168.1.20",
            "deprecated": true
          },
          "SerialNumber": {
            "type": "string",
            "description": "Hardware serial number. Optional, max 250 characters.",
            "nullable": true,
            "example": "CNB1K23456"
          },
          "WarrantyStartDate": {
            "type": "string",
            "description": "Date the warranty starts, a calendar date in the form yyyy-MM-dd. A value with a time or a time zone is rejected. Optional. Not shown in the Gorelo app.",
            "format": "date",
            "nullable": true,
            "example": "2024-03-31"
          },
          "Manufacturer": {
            "type": "string",
            "description": "Manufacturer. Optional, max 300 characters. Not shown in the Gorelo app.",
            "nullable": true,
            "example": "Ubiquiti"
          },
          "Model": {
            "type": "string",
            "description": "Model. Optional, max 300 characters. Not shown in the Gorelo app.",
            "nullable": true,
            "example": "UniFi Dream Machine Pro"
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating a custom asset. The owning service provider is resolved from the\r\nrequest context, not from the body."
      },
      "CreateCustomAssetResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created custom asset."
      },
      "CreateCustomAssetResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateCustomAssetResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateDocumentCommand": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "description": "Title. Required, max 200 characters.",
            "nullable": true
          },
          "Body": {
            "type": "string",
            "description": "The body, as HTML. Must not embed images as `data:` URLs - upload them first.",
            "nullable": true
          },
          "ParentDocumentId": {
            "type": "string",
            "description": "The document to nest this one under; omit or null for a top-level document.",
            "format": "uuid",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "The client the document belongs to; omit or null for an internal document. Under a parent\r\nthe document takes the parent's client, and a different value here is rejected.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A new document."
      },
      "CreateInvoiceCommand": {
        "type": "object",
        "properties": {
          "ClientId": {
            "type": "integer",
            "description": "Client to bill. Validated against the service provider - an unknown client is a 404.",
            "format": "int64",
            "example": 88
          },
          "StatusId": {
            "type": "integer",
            "description": "Status to create the invoice in: 1 = Draft (default) or 5 = Approved. Any other value is\r\nrejected. Approving on create pushes the invoice to the connected accounting system, the\r\nsame as approving it in the app. An Approved invoice whose computed total is\r\nexactly 0 is recorded as Paid instead.",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "InvoiceDate": {
            "type": "string",
            "description": "Date the invoice is raised, a calendar date. Defaults to today (service provider's local date) when omitted.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-09-15T00:00:00.0000000+00:00"
          },
          "DueDate": {
            "type": "string",
            "description": "Date payment is due, a calendar date. Defaults to InvoiceDate when omitted. Must not be\r\nearlier than InvoiceDate.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-10-15T00:00:00.0000000+00:00"
          },
          "Reference": {
            "type": "string",
            "description": "Free-text reference for the invoice, or omit for none.",
            "nullable": true,
            "example": "PO-4471"
          },
          "RecipientEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Email addresses to send the invoice to. Optional.",
            "nullable": true
          },
          "LineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateInvoiceLineItem"
            },
            "description": "Line items for this invoice. At least one is required. Lines carry no task/ticket/time-entry\r\nlinkage - that belongs to contract-generated invoices, out of scope for a manual one. A line\r\nwhose ItemId is a bundle is billed as one line and stored as the bundle's parts, the same\r\nway the app stores it; the caller never sends the parts."
          }
        },
        "additionalProperties": false,
        "description": "Raises a manual invoice against a client, with line items."
      },
      "CreateInvoiceLineItem": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "string",
            "description": "Catalog item this line bills. Required. Validated for existence and tenant ownership against\r\nGET /v1/items.",
            "format": "uuid",
            "example": "9214"
          },
          "Description": {
            "type": "string",
            "description": "Description shown on the invoice for this line. Falls back to the item's own name when omitted.",
            "nullable": true
          },
          "Quantity": {
            "type": "number",
            "description": "Quantity billed. Required, must be greater than 0.",
            "format": "double",
            "example": 2
          },
          "UnitPrice": {
            "type": "number",
            "description": "Unit price. Falls back to the item's own price when omitted.",
            "format": "double",
            "nullable": true,
            "example": 150
          },
          "UnitCost": {
            "type": "number",
            "description": "Unit cost. Falls back to the item's own cost when omitted.",
            "format": "double",
            "nullable": true,
            "example": 90
          },
          "DiscountPercent": {
            "type": "number",
            "description": "Discount percentage for this line, 0-100. Defaults to 0 when omitted.",
            "format": "double",
            "nullable": true,
            "example": 10
          },
          "TaxId": {
            "type": "integer",
            "description": "Tax to apply to this line. Falls back to the item's own tax when omitted; send explicit null to force no tax regardless of the item's own tax.",
            "format": "int64",
            "nullable": true
          },
          "CoaCode": {
            "type": "string",
            "description": "Chart-of-accounts code for this line. Falls back to the item's own COA code when omitted.",
            "nullable": true
          },
          "BillableStatusId": {
            "type": "integer",
            "description": "Billable status for this line: 1 = Billable, 2 = No charge, 3 = Non-billable. Defaults to Billable when omitted.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateInvoiceResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the newly created invoice.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Result of a create-invoice request. Matches Create Ticket/Create Time Entry's minimal shape:\r\njust the new record's `Id`. Fetch the invoice back through\r\n`GET /v1/invoices/{invoiceId}` for the full record."
      },
      "CreateInvoiceResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateInvoiceResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateItemCommand": {
        "type": "object",
        "properties": {
          "TypeId": {
            "type": "integer",
            "description": "Whether this is a product (1) or a bundle (2). Required; cannot be changed once created.",
            "format": "int32",
            "example": 1
          },
          "Name": {
            "type": "string",
            "description": "Display name of the item. Required.",
            "example": "Managed Workstation - Standard"
          },
          "Number": {
            "type": "string",
            "description": "The item's product number, free text.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Free-text description.",
            "nullable": true
          },
          "CategoryId": {
            "type": "integer",
            "description": "Category to file the item under, from GET /v1/items/categories. Validated for existence and tenant ownership.",
            "format": "int64",
            "nullable": true
          },
          "SubcategoryId": {
            "type": "integer",
            "description": "Subcategory to file the item under; must belong to CategoryId.",
            "format": "int64",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Client this item is scoped to, when it is client-specific rather than catalog-wide.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Client location this item is scoped to; must belong to ClientId.",
            "format": "int64",
            "nullable": true
          },
          "Sku": {
            "type": "string",
            "description": "Product-only. Rejected (400) if sent while TypeId is Bundle.",
            "nullable": true
          },
          "PartNumber": {
            "type": "string",
            "description": "Product-only. Rejected (400) if sent while TypeId is Bundle.",
            "nullable": true
          },
          "Manufacturer": {
            "type": "string",
            "description": "Product-only. Rejected (400) if sent while TypeId is Bundle.",
            "nullable": true
          },
          "Vendor": {
            "type": "string",
            "description": "Vendor the item is sourced from.",
            "nullable": true
          },
          "UnitCost": {
            "type": "number",
            "description": "Product-only. Rejected (400) if sent while TypeId is Bundle — a bundle's cost is derived\r\nserver-side from its sub-items, never supplied directly.",
            "format": "double",
            "nullable": true,
            "example": 42.5
          },
          "UnitPrice": {
            "type": "number",
            "description": "Unit price charged to the client. May be negative, for a discount or credit line.",
            "format": "double",
            "nullable": true,
            "example": 89
          },
          "TaxId": {
            "type": "integer",
            "description": "Tax rate to apply, from GET /v1/taxes.",
            "format": "int64",
            "nullable": true
          },
          "ExternalProductId": {
            "type": "string",
            "description": "Identifier of this item in an external accounting system.",
            "nullable": true
          },
          "SubItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateItemSubItemModel"
            },
            "description": "Bundle-only, required for a bundle (at least one entry) — rejected (400) if sent while\r\nTypeId is Product. Every ItemId must resolve to an existing, active product (not a bundle\r\n— bundles cannot nest) owned by this service provider.",
            "nullable": true
          },
          "ShowSubItemsOnInvoice": {
            "type": "boolean",
            "description": "Bundle-only. Rejected (400) if sent while TypeId is Product.",
            "nullable": true
          },
          "ShowSubItemDescriptionsOnInvoice": {
            "type": "boolean",
            "description": "Bundle-only. Rejected (400) if sent while TypeId is Product.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Creates a product or a bundle in the catalog. `TypeId` decides which, and which of the\r\ntype-conditional fields below are accepted."
      },
      "CreateItemResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the newly created item.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Result of a create-item request. Matches the minimal shape returned by create-ticket,\r\ncreate-time-entry and create-invoice, rather than returning the full item."
      },
      "CreateItemResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateItemResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateItemSubItemModel": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "string",
            "description": "Identifier of the product this sub-item refers to. Must not itself be a bundle.",
            "format": "uuid"
          },
          "Quantity": {
            "type": "number",
            "description": "How many of this product the bundle includes. Must be greater than 0.",
            "format": "double",
            "example": 2
          }
        },
        "additionalProperties": false,
        "description": "One sub-item on a bundle create/update request."
      },
      "CreatePaymentCommand": {
        "type": "object",
        "properties": {
          "InvoiceId": {
            "type": "string",
            "description": "Invoice the payment is recorded against. Required. The invoice must be Approved; an invoice\r\nthat does not exist, or belongs to another service provider, is a 404.",
            "format": "uuid",
            "example": "3f1a9e2b-6c4d-4e2a-8b1a-0e2f7c9d1a44"
          },
          "Amount": {
            "type": "number",
            "description": "Amount received. Optional - defaults to the invoice's whole amount due when omitted. Must be\r\ngreater than 0 and no more than the invoice's amount due.",
            "format": "double",
            "nullable": true,
            "example": 250
          },
          "PaymentDate": {
            "type": "string",
            "description": "Date the payment was received, a calendar date. Required. Cannot be later than today in the\r\nservice provider's time zone.",
            "format": "date",
            "nullable": true,
            "example": "2026-10-01"
          },
          "Reference": {
            "type": "string",
            "description": "Your reference for the payment, such as a bank transaction or remittance number. Required,\r\nmax 50 characters.",
            "example": "BANK-20261001-118"
          }
        },
        "additionalProperties": false,
        "description": "Records a payment received outside Gorelo against an invoice."
      },
      "CreatePaymentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the newly recorded payment.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Result of recording a payment: just the new payment's `Id`, the same minimal shape Create\r\nInvoice returns. The payment appears in `Payments` on `GET /v1/invoices/{invoiceId}`."
      },
      "CreatePaymentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreatePaymentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateProjectCommand": {
        "required": [
          "ClientId",
          "GroupId",
          "LocationId",
          "Title",
          "TypeId"
        ],
        "type": "object",
        "properties": {
          "Title": {
            "minLength": 1,
            "type": "string",
            "description": "Project title. Required.",
            "example": "Office 365 migration"
          },
          "Description": {
            "type": "string",
            "description": "Project description.",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the project belongs to. Required.",
            "format": "int64"
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the project belongs to. Required.",
            "format": "int64"
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the technician to lead the project. Optional - a project created without one\r\nhas no lead, and none is assigned by default.",
            "format": "int64",
            "nullable": true
          },
          "TypeId": {
            "type": "string",
            "description": "Identifier of the project type. Required.",
            "format": "uuid"
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tags to apply to the project.",
            "nullable": true
          },
          "GroupId": {
            "type": "integer",
            "description": "Identifier of the technician group the project is assigned to. Required.",
            "format": "int64",
            "example": 101
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians to watch the project. The lead is never also a watcher.",
            "nullable": true
          },
          "SharedWithContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of contacts to share the project with. They must belong to `ClientId`.",
            "nullable": true
          },
          "TargetDate": {
            "type": "string",
            "description": "Date the project is targeted to finish (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "CreatedByName": {
            "type": "string",
            "description": "Display name to record as the project creator. An API key is not a person, so when it is\r\nomitted or blank the creator is recorded as `API`.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "Backdate the project's creation timestamp - for importing projects from another system.\r\nMust not be in the future. Omit to use the current time.\r\nSend only when importing history. A record with this field set sends no emails or notifications.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Backdate the project's last-activity timestamp so an imported project does not sort above\r\nlive work. Must not be in the future or earlier than `CreatedOn`. Defaults to\r\nthe effective creation time.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating a project. The owning service provider is resolved from the\r\nrequest context, not from the body."
      },
      "CreateProjectCommentCommand": {
        "required": [
          "Body"
        ],
        "type": "object",
        "properties": {
          "Body": {
            "minLength": 1,
            "type": "string",
            "description": "The comment body, as HTML. Required."
          },
          "ConversationTypeId": {
            "type": "integer",
            "description": "Kind of conversation: `1` Public or `2` Private. **Defaults to 2 (Private)** -\r\na project comment posted by an integration is an internal note unless it says otherwise.\r\n            \r\nA project has no side conversations or approvals of its own, so `3` and `4` are\r\nrejected rather than silently written as something else.",
            "format": "int64"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation to post into. A project's comments are all on its one main\r\nthread, so there is no conversation to name and sending one is a 400.",
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentInput"
            },
            "description": "Files to attach. Upload them first, then send the returned name and url.",
            "nullable": true
          },
          "CreatedByName": {
            "type": "string",
            "description": "Display name to record as the author. An API key is not a person, so when it is\r\nomitted or blank the author is recorded as `API`.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the comment was written. UTC. Defaults to now - supply it only when importing a\r\ncomment that already existed elsewhere.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for posting a comment on a project."
      },
      "CreateProjectCommentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created comment.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created comment."
      },
      "CreateProjectCommentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateProjectCommentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateProjectResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created project.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created project."
      },
      "CreateProjectResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateProjectResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateSectionCommand": {
        "required": [
          "Title"
        ],
        "type": "object",
        "properties": {
          "Title": {
            "minLength": 1,
            "type": "string",
            "description": "Section title. Required.",
            "example": "Discovery"
          },
          "Color": {
            "type": "string",
            "description": "Colour the section is displayed in, as a hex code. Optional - omit it and the\r\nsection gets `#56A0F9`. A supplied blank is rejected: a section always has a colour.",
            "nullable": true,
            "example": "#56A0F9"
          },
          "CreatedByName": {
            "type": "string",
            "description": "Display name to record as the author of this change. An API key is not a person, so\r\nwhen it is omitted or blank the author is recorded as `API`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for adding a section to a project."
      },
      "CreateSectionResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created section.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created section."
      },
      "CreateSectionResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateSectionResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateSideConversationCommand": {
        "required": [
          "Email",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Short label for the side conversation. Maximum 250 characters."
          },
          "Email": {
            "minLength": 1,
            "type": "string",
            "description": "Address this side conversation is directed to. Maximum 50 characters.",
            "format": "email"
          },
          "CcEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Addresses copied on this side conversation. Optional. Maximum 50 characters each."
          },
          "AttachPublicConversation": {
            "type": "boolean",
            "description": "When true, public comments already on the ticket's main thread are attached the first\r\ntime a comment is posted into this side conversation."
          }
        },
        "additionalProperties": false
      },
      "CreateSideConversationResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the created side conversation. A number, not a guid — pass this as\r\n            `conversationId` to the comments endpoint.",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "CreateSideConversationResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateSideConversationResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateSubmissionLinkCommand": {
        "type": "object",
        "properties": {
          "TicketId": {
            "type": "string",
            "description": "Ticket the submission is filed against. Optional; not with `TaskId`. Must be an\r\nactive ticket of the authenticated service provider.",
            "format": "uuid",
            "nullable": true
          },
          "TaskId": {
            "type": "string",
            "description": "Task the submission is filed against. Optional; not with `TicketId`. Must be an\r\nactive task, in an active project, of the authenticated service provider.",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for issuing a submission link. The form is named in the path and the owning\r\nservice provider is resolved from the request context, not from the body."
      },
      "CreateSubmissionLinkResult": {
        "type": "object",
        "properties": {
          "Link": {
            "type": "string",
            "description": "The url to hand to the person who is to fill the form in."
          },
          "ExpiresOn": {
            "type": "string",
            "description": "When the link expires, UTC. An unused link is kept for seven days; a submission made\r\nthrough it before then is kept indefinitely.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A submission link and when it stops working."
      },
      "CreateSubmissionLinkResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateSubmissionLinkResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateTaskApprovalCommand": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "What is being approved. Required."
          },
          "ContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Contacts asked to approve. Required. Each must be an active contact of the task's client\r\nand carry a contact tag marked as an approver."
          }
        },
        "additionalProperties": false,
        "description": "Request body for asking contacts to approve something on a task."
      },
      "CreateTaskApprovalResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created approval.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created approval."
      },
      "CreateTaskApprovalResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateTaskApprovalResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateTaskCommand": {
        "required": [
          "SectionId",
          "Title"
        ],
        "type": "object",
        "properties": {
          "SectionId": {
            "type": "string",
            "description": "Identifier of the section the task belongs to. Required.",
            "format": "uuid"
          },
          "Title": {
            "minLength": 1,
            "type": "string",
            "description": "Task title. Required.",
            "example": "Migrate the finance mailboxes"
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the technician leading the task. Optional.",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians assisting on the task.",
            "nullable": true
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians watching the task.",
            "nullable": true
          },
          "PriorityId": {
            "type": "integer",
            "description": "Task priority: None=0, Urgent=1, High=2, Normal=3, Low=4 - the same scale a ticket uses.\r\nDefaults to Normal, which is what the app assigns a task created without one.",
            "format": "int64"
          },
          "StatusId": {
            "type": "integer",
            "description": "Task status: 1 Not started, 2 Working on it, 3 On hold, 4 Done. Defaults to 1 Not started.",
            "format": "int64"
          },
          "DueDate": {
            "type": "string",
            "description": "When the task is due. UTC.",
            "format": "date-time",
            "nullable": true
          },
          "CreatedByName": {
            "type": "string",
            "description": "Display name to record as the task creator. An API key is not a person, so when it is\r\nomitted or blank the creator is recorded as `API`.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the task was created. UTC. Defaults to now - supply it only when importing a task\r\nthat already existed elsewhere.\r\nSend only when importing history. A record with this field set sends no emails or notifications.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the task was last updated. UTC. Defaults to `CreatedOn`.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating a task inside a project section. The owning service provider is\r\nresolved from the request context, not from the body."
      },
      "CreateTaskCommentCommand": {
        "required": [
          "Body"
        ],
        "type": "object",
        "properties": {
          "ConversationTypeId": {
            "type": "integer",
            "description": "Kind of conversation: `1` Public, `2` Private, `3` Side Conversation,\r\n`4` Approval. **Defaults to 2 (Private)** - a comment posted by an integration is an\r\ninternal note unless it says otherwise.",
            "format": "int64"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation to post into, from the task's conversations endpoint.\r\nRequired for Side Conversation and Approval, and rejected for Public and Private, which\r\nare the task's main thread.",
            "nullable": true
          },
          "Body": {
            "minLength": 1,
            "type": "string",
            "description": "The comment body, as HTML. Required."
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentInput"
            },
            "description": "Files to attach. Upload them first, then send the returned name and url.",
            "nullable": true
          },
          "CreatedByName": {
            "type": "string",
            "description": "Display name to record as the author. Omitted or blank, it is recorded as `API`.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the comment was written. UTC. Defaults to now.\r\nSend only when importing history. A record with this field set sends no emails or notifications.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for posting a comment on a task."
      },
      "CreateTaskCommentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created comment.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created comment."
      },
      "CreateTaskCommentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateTaskCommentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateTaskResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created task.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created task."
      },
      "CreateTaskResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateTaskResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateTaskSideConversationCommand": {
        "required": [
          "Email",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name of the person the conversation is with. Required."
          },
          "Email": {
            "minLength": 1,
            "type": "string",
            "description": "Their email address. Required."
          },
          "CcEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Addresses to copy on the conversation.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for starting a side conversation on a task - a thread with somebody outside the\r\ntask's own contacts, such as a vendor."
      },
      "CreateTaskSideConversationResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the created side conversation.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created conversation."
      },
      "CreateTaskSideConversationResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateTaskSideConversationResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateTicketCommand": {
        "required": [
          "GroupId",
          "StatusId",
          "Title",
          "TypeId"
        ],
        "type": "object",
        "properties": {
          "Title": {
            "minLength": 1,
            "type": "string",
            "description": "Ticket title/subject. Required. Maximum 250 characters.",
            "example": "Printer on 3rd floor is offline"
          },
          "CreatedByName": {
            "type": "string",
            "description": "Display name to record as the ticket creator when no contact is resolved. Omitted or blank, it is recorded as `API`.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "Backdate the ticket's creation timestamp — for importing tickets from another system.\r\nMust not be in the future. Omit to use the current time. Required when ClosedOn or\r\nUpdatedOn is supplied. A caller migrating a ticket sends CreatedOn, ClosedOn and UpdatedOn\r\ntogether, so the ticket keeps the dates it had in the other system.\r\nSend only when importing history. A record with this field set sends no emails or notifications.",
            "format": "date-time",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "The date the ticket was closed, for importing already-closed tickets from another system.\r\nRequires CreatedOn to be supplied. Only valid when the ticket is created in a closed status.\r\nMust not be in the future or earlier than CreatedOn. Omit to have a ticket created in a\r\nclosed status closed as of its creation time.\r\nSend only when importing history. A record with this field set sends no emails or notifications.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Backdate the ticket's last-activity timestamp so an imported ticket does not sort above\r\nlive work. Requires CreatedOn to be supplied. Must not be in the future or earlier than\r\nCreatedOn. Defaults to ClosedOn when supplied, otherwise to CreatedOn.",
            "format": "date-time",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the ticket belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the ticket belongs to. Requires ClientId.",
            "format": "int64",
            "nullable": true
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the primary contact for the ticket. With a ClientId it may be a contact of any\r\nclient; without one it must be a temporary contact (IsTemporaryContact true).",
            "format": "int64",
            "nullable": true
          },
          "CcContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of additional (CC) contacts. At most 100. Same rule as ContactId: contacts of\r\nany client, or temporary contacts when the ticket has no client.",
            "nullable": true
          },
          "StatusId": {
            "type": "integer",
            "description": "Initial status identifier. Required; must be an existing status for the service provider.",
            "format": "int64",
            "example": 1
          },
          "GroupId": {
            "type": "integer",
            "description": "Identifier of the technician group the ticket is assigned to. Required.",
            "format": "int64",
            "example": 101
          },
          "Description": {
            "type": "string",
            "description": "Ticket description / body, as HTML. Text without markup is wrapped in a paragraph. A literal < or >\r\nin the text must be sent as `&lt;` / `&gt;`.",
            "nullable": true
          },
          "PriorityId": {
            "$ref": "#/components/schemas/TicketPriority"
          },
          "SourceId": {
            "$ref": "#/components/schemas/TicketSource"
          },
          "TypeId": {
            "type": "integer",
            "description": "Ticket type identifier. Required.",
            "format": "int64",
            "example": 1
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the lead assignee (technician).",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of assisting assignees (technicians).",
            "nullable": true
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians watching the ticket.",
            "nullable": true
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of tags to apply to the ticket.",
            "nullable": true
          },
          "AgentAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of agent (managed device) assets to link to the ticket.",
            "nullable": true
          },
          "CustomAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of custom assets to link to the ticket.",
            "nullable": true
          },
          "UptimeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of uptime monitors to link to the ticket.",
            "nullable": true
          },
          "SendTicketCreatedEmail": {
            "type": "boolean",
            "description": "When true, sends a \"ticket created\" email to the contact. Defaults to false. Ignored when\r\nCreatedOn or ClosedOn is supplied.",
            "nullable": true
          },
          "IsUnread": {
            "type": "boolean",
            "description": "Whether the ticket is created in an unread state. Defaults to true. Ignored when CreatedOn\r\nor ClosedOn is supplied: the ticket is created read.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating a ticket. The owning service provider is resolved from the\r\nrequest context, not from the body."
      },
      "CreateTicketResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the newly created ticket.",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result of a create-ticket request."
      },
      "CreateTicketResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateTicketResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateTimeEntryCommand": {
        "type": "object",
        "properties": {
          "TicketId": {
            "type": "string",
            "description": "Ticket to log the time against. Send **either** this or `TaskId`, not both and\r\nnot neither. Validated against the service provider - an unknown ticket is a 404. The entry\r\nis billed to the ticket's client; a ticket with no client is rejected with 409.",
            "format": "uuid",
            "nullable": true,
            "example": "e5fb2939-3bd7-4893-8b47-a287003d5b8a"
          },
          "TaskId": {
            "type": "string",
            "description": "Task to log the time against, instead of a ticket. Validated the same way - an unknown task\r\nis a 404. The entry is billed to the client of the task's **project**, which is\r\nauthoritative; the task's own copy of the client can lag behind.\r\n            \r\nA task carries no billing defaults of its own, so the billing role, work type and billable\r\nstatus fall to the technician's defaults and then the service provider's - the same chain a\r\nticket uses once its own values are absent.",
            "format": "uuid",
            "nullable": true
          },
          "StartedOn": {
            "type": "string",
            "description": "When the work started, as a single UTC instant.\r\n            \r\nSupply any two of StartedOn, EndedOn and ActualHours and the third is derived. Supplying all\r\nthree is accepted only when ActualHours agrees with the span between the two instants, to the\r\nsame four decimal places GET reports it at; a disagreement is rejected rather than resolved\r\nby discarding one of the three.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-04-28T09:00:00.0000000+00:00"
          },
          "EndedOn": {
            "type": "string",
            "description": "When the work finished, as a single UTC instant. Must be later than `StartedOn`.\r\nSee `StartedOn` for which combinations of the three time fields are accepted.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-04-28T10:30:00.0000000+00:00"
          },
          "ActualHours": {
            "type": "number",
            "description": "Duration worked, in decimal hours. Must be greater than 0.\r\n            \r\nThis is the raw logged duration and is never pre-rounded: the work type's minimum and\r\nincrement rounding is applied on top of it, and GET reports the rounded figure separately as\r\nAdjustedHours. See `StartedOn` for which combinations of the three time fields\r\nare accepted.",
            "format": "double",
            "nullable": true,
            "example": 1.5
          },
          "BillableStatusId": {
            "type": "integer",
            "description": "Billable status for this entry: 1 = Billable, 2 = No charge, 3 = Non-billable; any other\r\nvalue is rejected. Optional — omit it and the ticket's own billable status is used, else the\r\nwork type's, else Billable.",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "UserId": {
            "type": "integer",
            "description": "User whose time this is. Validated against the service provider. Named UserId rather than\r\nTechnicianId because Gorelo uses \"user\", not \"technician\", in its own vocabulary.",
            "format": "int64",
            "example": 8842
          },
          "BillingRoleId": {
            "type": "integer",
            "description": "Billing role to charge at. Optional — omit it and the ticket's own billing role is used, else\r\nthe user's, else the service provider's first. Get valid ids from\r\nGET /v1/billing-roles.",
            "format": "int64",
            "nullable": true,
            "example": 1742
          },
          "WorkTypeId": {
            "type": "integer",
            "description": "Work type to apply. Determines the rate multiplier and the minimum/increment rounding applied\r\nto the logged duration. Optional — omit it and the ticket's own work type is used, else the\r\nuser's, else the service provider's first. Get valid ids from\r\nGET /v1/work-types.",
            "format": "int64",
            "nullable": true,
            "example": 2432
          },
          "ServiceLineId": {
            "type": "integer",
            "description": "Service line to bill this time against.\r\n            \r\nOptional. Omit it and the ticket's own service line is used, else the first one whose\r\nconfigured billing roles and work types both cover the resolved role and type, else no\r\ncontract. Send it as null to decline a contract outright, which suppresses the automatic\r\ncontract assignment that would otherwise happen when the time is approved.\r\n            \r\nWhen supplied, the service line must belong to the ticket's client, and its contract must\r\nbe active today and cover labour.",
            "format": "int64",
            "nullable": true,
            "example": 4720
          },
          "Comment": {
            "type": "string",
            "description": "Free-text note describing the work.",
            "nullable": true,
            "example": "Replaced faulty NIC"
          },
          "Distance": {
            "type": "number",
            "description": "Distance travelled for this work, when the service provider bills mileage.",
            "format": "double",
            "nullable": true,
            "example": 12.5
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeEntryAttachmentModel"
            },
            "description": "Files to attach to this entry. The serialised list must be 5000 characters or fewer.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Logs time against a ticket."
      },
      "CreateTimeEntryResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the created time entry.",
            "format": "int64",
            "example": 904412
          }
        },
        "additionalProperties": false
      },
      "CreateTimeEntryResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateTimeEntryResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateUptimeCommand": {
        "type": "object",
        "properties": {
          "TypeId": {
            "type": "integer",
            "description": "What the check does: 1 ICMP, 2 HTTP, 3 TCP. Required.",
            "format": "int32",
            "example": 1
          },
          "Target": {
            "$ref": "#/components/schemas/UptimeTarget"
          },
          "AdoptClientAssets": {
            "type": "boolean",
            "description": "Move unassigned devices whose public IP matches this check's address to the check's\r\nclient. Only acted on for ICMP checks that carry both a client and a location; stored\r\neither way."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the check belongs to. When supplied, `LocationId`\r\nis required with it.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the check belongs to.",
            "format": "int64",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "What the check watches, free text. Max 250 characters.",
            "nullable": true
          },
          "Frequency": {
            "type": "integer",
            "description": "How often the check runs, in minutes. Required.",
            "format": "int32",
            "example": 1
          },
          "NumberOfRetriesAfterFailure": {
            "type": "integer",
            "description": "How many times a failure is rechecked before the check counts as down. Defaults to 2.",
            "format": "int32",
            "nullable": true,
            "example": 2
          },
          "RegionId": {
            "type": "integer",
            "description": "Which monitoring region runs the check: 1 Seattle, 2 Sydney, 3 UK, 4 Frankfurt. Required.",
            "format": "int32",
            "example": 1
          },
          "IspConnectionLink": {
            "type": "string",
            "description": "Link to the ISP or provider status page for this endpoint. Max 500 characters.",
            "nullable": true
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of tags to apply to the check.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for creating an uptime check. The owning service provider is resolved from the\r\nrequest context, not from the body."
      },
      "CreateUptimeResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the created uptime check."
      },
      "CreateUptimeResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CreateUptimeResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CustomAssetResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Asset identifier.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "Asset name."
          },
          "DisplayName": {
            "type": "string",
            "description": "Display name. Read-only and always equal to `Name`, so a caller can read it the same way as an agent asset's."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the asset belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the asset belongs to.",
            "format": "int64",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Free-text description. Null when the asset has none.",
            "nullable": true
          },
          "Banner": {
            "type": "string",
            "description": "Banner / label text. Null when the asset has none.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "HardwareType": {
            "type": "string",
            "description": "Hardware type name. Null when the type no longer exists. <b>Deprecated:</b> use `Type.Name`.",
            "nullable": true,
            "example": "Printer",
            "deprecated": true
          },
          "HardwareTypeId": {
            "type": "integer",
            "description": "Identifier of the hardware type: the value `POST`/`PATCH /v1/assets/custom` take as\r\n`HardwareTypeId`. <b>Deprecated:</b> use `Type.Id`, which has the same value.",
            "format": "int64",
            "example": 118,
            "deprecated": true
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the contact the asset is assigned to. Null when unassigned.",
            "format": "int64",
            "nullable": true,
            "example": 7962
          },
          "SerialNumber": {
            "type": "string",
            "description": "Hardware serial number. Null when the asset has none.",
            "nullable": true
          },
          "WarrantyEndDate": {
            "type": "string",
            "description": "Date the warranty ends, a calendar date (yyyy-MM-dd).",
            "format": "date",
            "nullable": true
          },
          "WarrantyStartDate": {
            "type": "string",
            "description": "Date the warranty starts, a calendar date (yyyy-MM-dd). Null when not set. Set through the\r\nAPI; not shown in the Gorelo app.",
            "format": "date",
            "nullable": true
          },
          "Manufacturer": {
            "type": "string",
            "description": "Manufacturer. Null when not set. Set through the API; not shown in the Gorelo app.",
            "nullable": true
          },
          "Model": {
            "type": "string",
            "description": "Model. Null when not set. Set through the API; not shown in the Gorelo app.",
            "nullable": true
          },
          "LocalIPAddress": {
            "type": "string",
            "description": "IP address. Null when the asset has none. The same name and value as an agent asset's `LocalIPAddress`.",
            "nullable": true,
            "example": "192.168.1.20"
          },
          "IpAddress": {
            "type": "string",
            "description": "IP address. Null when the asset has none. <b>Deprecated:</b> use `LocalIPAddress`, which has the same value.",
            "nullable": true,
            "example": "192.168.1.20",
            "deprecated": true
          }
        },
        "additionalProperties": false,
        "description": "A custom (non-agent) asset. Timestamps are UTC."
      },
      "CustomAssetResponseBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/CustomAssetResponse"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CustomAssetResponseListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomAssetResponse"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "CustomPropertyUpdate": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the custom field to set.",
            "format": "int64"
          },
          "Value": {
            "type": "string",
            "description": "New value to save. `null` clears the saved value, so the field falls back to its default\r\n(which may itself be empty); an empty string saves an empty value. Either is rejected with a\r\n400 on a required field when it would leave the field with no value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single custom-field value to set on a PATCH body. Identified by `Id` only;\r\na custom field not present in the array is left untouched."
      },
      "CustomPropertyValue": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Custom field identifier.",
            "format": "int64"
          },
          "Variable": {
            "type": "string",
            "description": "The field's variable name, returned raw with no prefix."
          },
          "Name": {
            "type": "string",
            "description": "Custom field display name."
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Value": {
            "type": "string",
            "description": "The field's effective value, as the app shows it: the value saved on this record, else the\r\nfield's default, else null. Always a string regardless of Type. Always null when\r\n`IsHidden` is true.",
            "nullable": true
          },
          "IsSet": {
            "type": "boolean",
            "description": "True when a value is saved on this record; false when `Value` is the field's default\r\n(or null). A saved value that happens to equal the default is still true. Reported for\r\nhidden fields too."
          },
          "IsHidden": {
            "type": "boolean",
            "description": "True when the service provider has hidden this field's value from the API, which is set\r\nper field in the Gorelo app. `Value` is then always null, whether or not a value is\r\nsaved. The value can still be written through the API."
          }
        },
        "additionalProperties": false,
        "description": "A custom field's value on a device or client."
      },
      "DeleteAgentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteAgentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteAgentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteApiKeyResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteApiKeyResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteApiKeyResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteClientResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "DeleteClientResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteClientResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteCommentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteCommentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteCommentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteContactResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "DeleteContactResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteContactResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteContractResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the deleted contract.",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "DeleteContractResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteContractResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteCustomAssetResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteCustomAssetResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteCustomAssetResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteInvoiceResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the invoice.",
            "format": "uuid"
          },
          "StatusId": {
            "type": "integer",
            "description": "The invoice's status after the call: 6 (Deleted) when a Draft invoice was deleted, or 4\r\n(Void) when an Approved invoice was voided. Deleted (6) appears only here - a deleted\r\ninvoice is never returned by `GET /v1/invoices`, so the list's status set stays 1-5.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The outcome of deleting an invoice."
      },
      "DeleteInvoiceResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteInvoiceResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteItemResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the deleted item.",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteItemResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteItemResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeletePaymentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the deleted payment.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The outcome of deleting a payment."
      },
      "DeletePaymentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeletePaymentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteProjectCommentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the deleted comment.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the deleted comment."
      },
      "DeleteProjectCommentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteProjectCommentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteProjectResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the deleted project.",
            "format": "uuid"
          },
          "DeletedTaskCount": {
            "type": "integer",
            "description": "Tasks deactivated as part of the delete.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the deleted project, and how many tasks went with it."
      },
      "DeleteProjectResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteProjectResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteSectionResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the deleted section.",
            "format": "uuid"
          },
          "DeletedTaskCount": {
            "type": "integer",
            "description": "Tasks deactivated as part of the delete.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the deleted section, and how many tasks went with it."
      },
      "DeleteSectionResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteSectionResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteTaskCommentResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the deleted comment.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the deleted comment."
      },
      "DeleteTaskCommentResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteTaskCommentResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteTaskResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the deleted task.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the deleted task."
      },
      "DeleteTaskResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteTaskResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteTicketResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteTicketResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteTicketResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteTimeEntryResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Outcome": {
            "type": "string",
            "description": "What the delete actually did. A time entry that has been closed for billing is first pulled\r\nback out of the billing pipeline — the same two-step the app has — so a single DELETE does not\r\nalways remove the entry. Without this field both outcomes would look like an identical 200\r\nwhile the entry was still listed.\r\n\n`Deleted` — the entry is now inactive and its billing ledger entries reverted.\n`Reopened` — the entry was closed for billing and has been returned to unclosed;\r\ndelete it again to remove it."
          }
        },
        "additionalProperties": false
      },
      "DeleteTimeEntryResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteTimeEntryResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeleteUptimeResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteUptimeResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DeleteUptimeResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DeletionResponse": {
        "type": "object",
        "properties": {
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Id": {
            "type": "string",
            "description": "The deleted record's id, as a string, in the form that record type's own endpoints take: a\r\nnumber for clients, contacts and contracts, a GUID for tickets, items, invoices, custom\r\nassets, projects and tasks. Read it with `Type` to know which record it names.",
            "example": "1042"
          },
          "DeletedOn": {
            "type": "string",
            "description": "When the record was deleted (UTC). This is the record's last update, so it moves if the\r\ndeleted record is edited later.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A record that has been deleted: which kind of record, its id, and when it was deleted."
      },
      "DeletionResponseListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeletionResponse"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DocumentChildModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Document identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Title."
          },
          "ChildCount": {
            "type": "integer",
            "description": "Number of documents nested directly under this one.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A document nested directly under another."
      },
      "DocumentDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Document identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Title."
          },
          "Body": {
            "type": "string",
            "description": "The body of the current version, as HTML. Image links carry a time-limited access token."
          },
          "ParentDocumentId": {
            "type": "string",
            "description": "The document this one is nested under; null for a top-level document.",
            "format": "uuid",
            "nullable": true
          },
          "RootDocumentId": {
            "type": "string",
            "description": "The top-level document of this document's tree; its own id when it is top level.",
            "format": "uuid"
          },
          "Depth": {
            "type": "integer",
            "description": "How deep the document is nested: 0 for a top-level document, 1 for its children, and so on.",
            "format": "int32"
          },
          "ChildCount": {
            "type": "integer",
            "description": "Number of documents nested directly under this one, archived ones included.",
            "format": "int32"
          },
          "DocumentOrder": {
            "type": "integer",
            "description": "Position among the documents that share its parent, lowest first. Read-only.",
            "format": "int32"
          },
          "Children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentChildModel"
            },
            "description": "The documents nested directly under this one, in their display order."
          },
          "ClientId": {
            "type": "integer",
            "description": "The client the document belongs to; null for an internal document.",
            "format": "int64",
            "nullable": true
          },
          "IsStarred": {
            "type": "boolean",
            "description": "Whether the document is starred. A star is shared by everyone in the account, not kept per user."
          },
          "PublicLinkEnabled": {
            "type": "boolean",
            "description": "Whether the document can be read by anyone holding its public link."
          },
          "PublicLinkUrl": {
            "type": "string",
            "description": "The public link to the current version, in the form the app copies to the clipboard. Null\r\nwhile `PublicLinkEnabled` is false.",
            "nullable": true
          },
          "PublishToPortalEnabled": {
            "type": "boolean",
            "description": "Whether the document is published to the client portal."
          },
          "AlternateName": {
            "type": "string",
            "description": "The name the document is shown under in the client portal; null when none is set.",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to the current version. Each url carries a time-limited access token; do\r\nnot store it."
          },
          "RelatedItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentRelatedItemModel"
            },
            "description": "The records this document is linked to."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the document was created (UTC).",
            "format": "date-time"
          },
          "CreatedById": {
            "type": "integer",
            "description": "Technician who created the document; 0 when it was created through the API.",
            "format": "int64"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the document was last changed (UTC); its creation time if it has not been changed since.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedById": {
            "type": "integer",
            "description": "Technician who last changed the document, or who created it if it has not been changed since; 0 when that came through the API.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single document, with its body, children, attachments and related items."
      },
      "DocumentDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DocumentDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DocumentListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Document identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Title."
          },
          "ParentDocumentId": {
            "type": "string",
            "description": "The document this one is nested under; null for a top-level document.",
            "format": "uuid",
            "nullable": true
          },
          "RootDocumentId": {
            "type": "string",
            "description": "The top-level document of this document's tree; its own id when it is top level.",
            "format": "uuid"
          },
          "Depth": {
            "type": "integer",
            "description": "How deep the document is nested: 0 for a top-level document, 1 for its children, and so on.",
            "format": "int32"
          },
          "ChildCount": {
            "type": "integer",
            "description": "Number of documents nested directly under this one, archived ones included.",
            "format": "int32"
          },
          "DocumentOrder": {
            "type": "integer",
            "description": "Position among the documents that share its parent, lowest first. Read-only.",
            "format": "int32"
          },
          "ClientId": {
            "type": "integer",
            "description": "The client the document belongs to; null for an internal document.",
            "format": "int64",
            "nullable": true
          },
          "IsStarred": {
            "type": "boolean",
            "description": "Whether the document is starred. A star is shared by everyone in the account, not kept per user."
          },
          "PublicLinkEnabled": {
            "type": "boolean",
            "description": "Whether the document can be read by anyone holding its public link."
          },
          "PublishToPortalEnabled": {
            "type": "boolean",
            "description": "Whether the document is published to the client portal."
          },
          "AlternateName": {
            "type": "string",
            "description": "The name the document is shown under in the client portal; null when none is set.",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the document was created (UTC).",
            "format": "date-time"
          },
          "CreatedById": {
            "type": "integer",
            "description": "Technician who created the document; 0 when it was created through the API.",
            "format": "int64"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the document was last changed (UTC); its creation time if it has not been changed since.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedById": {
            "type": "integer",
            "description": "Technician who last changed the document, or who created it if it has not been changed since; 0 when that came through the API.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A document as it appears in the document list."
      },
      "DocumentListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DocumentRelatedItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the link itself - what the remove endpoint takes.",
            "format": "int64"
          },
          "ItemId": {
            "type": "string",
            "description": "Identifier of the linked record, as text: a Guid for documents, custom assets and agent assets, a number for contacts."
          },
          "ItemType": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "A link between a document and another record."
      },
      "DocumentRelatedItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentRelatedItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DocumentVersionDetailModel": {
        "type": "object",
        "properties": {
          "VersionId": {
            "type": "string",
            "description": "Version identifier.",
            "format": "uuid"
          },
          "IsCurrent": {
            "type": "boolean",
            "description": "Whether this is the version the document currently shows."
          },
          "Title": {
            "type": "string",
            "description": "The document's title in this version."
          },
          "Body": {
            "type": "string",
            "description": "The body of this version, as HTML. Image links carry a time-limited access token."
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to this version. Each url carries a time-limited access token."
          },
          "EditedById": {
            "type": "integer",
            "description": "Technician who wrote this version; 0 when it was written through the API.",
            "format": "int64"
          },
          "EditedOn": {
            "type": "string",
            "description": "When this version was written (UTC). Restoring a version resets it to the time of the restore.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "One version of a document, with its body and attachments."
      },
      "DocumentVersionDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/DocumentVersionDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DocumentVersionListItemModel": {
        "type": "object",
        "properties": {
          "VersionId": {
            "type": "string",
            "description": "Version identifier.",
            "format": "uuid"
          },
          "IsCurrent": {
            "type": "boolean",
            "description": "Whether this is the version the document currently shows."
          },
          "Title": {
            "type": "string",
            "description": "The document's title in this version."
          },
          "EditedById": {
            "type": "integer",
            "description": "Technician who wrote this version; 0 when it was written through the API.",
            "format": "int64"
          },
          "EditedOn": {
            "type": "string",
            "description": "When this version was written (UTC). Restoring a version resets it to the time of the restore.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "One version of a document, as it appears in its version history."
      },
      "DocumentVersionListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentVersionListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "DuplicateDocumentCommand": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "description": "The duplicate's title, max 200 characters; defaults to the original title followed by \" clone\".",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A duplicate of a document. The body may be omitted entirely."
      },
      "Error": {
        "type": "object",
        "properties": {
          "Code": {
            "pattern": "^[0-9]{6}$",
            "type": "string",
            "description": "6-digit MMTTNN error code. See the Public API error-code registry.",
            "example": "070101"
          },
          "Message": {
            "type": "string"
          },
          "PropertyName": {
            "type": "string",
            "nullable": true
          },
          "ActionHint": {
            "type": "string",
            "nullable": true
          },
          "DocUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ErrorDataContext": {
        "type": "object",
        "properties": {
          "TraceId": {
            "type": "string",
            "description": "Request correlation id. Quote this when reporting a problem.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The `DataContext` of an error response: carries the correlation id for the failed\r\nrequest."
      },
      "FormAnswerModel": {
        "type": "object",
        "properties": {
          "FieldId": {
            "type": "string",
            "description": "The field answered - the same `Id` the form detail lists."
          },
          "Label": {
            "type": "string",
            "description": "The question text at the time of submission."
          },
          "Type": {
            "type": "string",
            "description": "The input type answered, e.g. `Short_Answer`, `Checkbox`, `Date`."
          },
          "TextValue": {
            "type": "string",
            "description": "The answer as text. Dates are `yyyy-MM-dd`, times as typed (`4:30 PM`).",
            "nullable": true
          },
          "NumberValue": {
            "type": "number",
            "description": "The answer to a `Number` field, when it parses as a number.",
            "format": "double",
            "nullable": true
          },
          "OptionValues": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The chosen option names - one for a multiple-choice, dropdown or toggle, any number for a checkbox.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One answer. Exactly one of `TextValue`, `NumberValue` and\r\n`OptionValues` is set, according to the field type; all three are null when the\r\nrespondent left the field blank."
      },
      "FormListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Form identifier. Six url-safe characters."
          },
          "Title": {
            "type": "string",
            "description": "Form title, as the app displays it."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ResponseCount": {
            "type": "integer",
            "description": "Number of submitted responses.",
            "format": "int32"
          },
          "AllowInPortal": {
            "type": "boolean",
            "description": "Whether the form is offered in the client portal."
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of the technician groups the form is assigned to."
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of the ticket tags applied to tickets created from the form - the ids `GET /v1/tickets/tags` lists."
          },
          "ClientIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of the clients the form is restricted to. Empty means every client."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the form was created (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the form was last updated (UTC). Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A form as returned by the form list endpoint. All timestamps are UTC."
      },
      "FormListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "FormResponseListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Response identifier."
          },
          "TicketId": {
            "type": "string",
            "description": "The ticket the form was submitted for, when it was sent from a ticket.",
            "format": "uuid",
            "nullable": true
          },
          "TaskId": {
            "type": "string",
            "description": "The task the form was submitted for, when it was sent from a task.",
            "format": "uuid",
            "nullable": true
          },
          "SubmittedAt": {
            "type": "string",
            "description": "When the response was submitted (UTC).",
            "format": "date-time"
          },
          "Answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormAnswerModel"
            },
            "description": "The answers, one per field that takes an answer, in the form's display order."
          }
        },
        "additionalProperties": false,
        "description": "A submitted response to a form, as returned by the form responses endpoint."
      },
      "FormResponseListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormResponseListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "GetGroupsResponseModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "CreatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Alias": {
            "type": "string"
          },
          "OutboundEmail": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "GetGroupsResponseModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetGroupsResponseModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "GuidCodeModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the coded value.",
            "format": "uuid",
            "example": "0f6a1e1c-5f2b-4f1e-9a3d-2c6f1b7a4e10"
          },
          "Name": {
            "type": "string",
            "description": "Display name of the coded value."
          }
        },
        "additionalProperties": false,
        "description": "A resolved reference whose key is a GUID rather than a number - the same `{ Id, Name }`\r\nshape as `PublicCodeModel`. Used for tenant-configured values such as a\r\nproject's type."
      },
      "HardwareTypeListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Type identifier: the value `POST`/`PATCH /v1/assets/custom` take as `HardwareTypeId`.",
            "format": "int64",
            "example": 118
          },
          "Name": {
            "type": "string",
            "description": "Type display name.",
            "example": "Printer"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A hardware type a custom asset can be given. Timestamps are UTC."
      },
      "HardwareTypeListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HardwareTypeListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "HttpStatusCode": {
        "enum": [
          100,
          101,
          102,
          103,
          200,
          201,
          202,
          203,
          204,
          205,
          206,
          207,
          208,
          226,
          300,
          301,
          302,
          303,
          304,
          305,
          306,
          307,
          308,
          400,
          401,
          402,
          403,
          404,
          405,
          406,
          407,
          408,
          409,
          410,
          411,
          412,
          413,
          414,
          415,
          416,
          417,
          421,
          422,
          423,
          424,
          426,
          428,
          429,
          431,
          451,
          500,
          501,
          502,
          503,
          504,
          505,
          506,
          507,
          508,
          510,
          511
        ],
        "type": "integer",
        "format": "int32"
      },
      "InvoiceAttachmentModel": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "File name.",
            "example": "timesheet-august.pdf"
          },
          "Url": {
            "type": "string",
            "description": "Temporary secure download link. Expires, so don't store it - fetch the invoice again for a fresh one."
          }
        },
        "additionalProperties": false,
        "description": "A file attached to an invoice."
      },
      "InvoiceDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the invoice.",
            "format": "uuid",
            "example": "3f1a9e2b-6c4d-4e2a-8b1a-0e2f7c9d1a44"
          },
          "Number": {
            "type": "integer",
            "description": "The bare sequential invoice number, prefix and suffix stripped.",
            "format": "int64",
            "nullable": true,
            "example": 1042
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable invoice number, including the service provider's configured prefix/suffix.",
            "example": "INV-1042"
          },
          "ClientId": {
            "type": "integer",
            "description": "Client the invoice is billed to.",
            "format": "int64",
            "example": 88
          },
          "ContractId": {
            "type": "integer",
            "description": "Contract this invoice was raised from, or null. A manual invoice created through\r\n`POST /v1/invoices` always has no contract — `ContractId` is accepted only on\r\ncontract-generated invoices, which this surface does not create.",
            "format": "int64",
            "nullable": true,
            "example": 4021
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "InvoiceDate": {
            "type": "string",
            "description": "Date the invoice was raised, a calendar date in the service provider's terms.",
            "format": "date",
            "example": "2026-09-01"
          },
          "DueDate": {
            "type": "string",
            "description": "Date payment is due, a calendar date. Never earlier than InvoiceDate.",
            "format": "date",
            "nullable": true,
            "example": "2026-10-01"
          },
          "SubTotal": {
            "type": "number",
            "description": "Sum of the invoice's line items before discount and tax.",
            "format": "double",
            "example": 1200
          },
          "TotalDiscount": {
            "type": "number",
            "description": "Total discount amount across the invoice's line items.",
            "format": "double",
            "example": 60
          },
          "TotalTax": {
            "type": "number",
            "description": "Total tax across the invoice's line items.",
            "format": "double",
            "example": 85.5
          },
          "Total": {
            "type": "number",
            "description": "Grand total: SubTotal - TotalDiscount + TotalTax.",
            "format": "double",
            "example": 1225.5
          },
          "AmountPaid": {
            "type": "number",
            "description": "Amount paid against this invoice so far. Computed live from recorded payments.",
            "format": "double",
            "example": 500
          },
          "AmountDue": {
            "type": "number",
            "description": "Amount still owed: Total - AmountPaid. Never negative on the wire; a credit is reported as 0.",
            "format": "double",
            "example": 725.5
          },
          "Reference": {
            "type": "string",
            "description": "Free-text reference on the invoice, or null when not set.",
            "nullable": true,
            "example": "PO-4471"
          },
          "ExternalId": {
            "type": "string",
            "description": "Identifier of this invoice in the connected external accounting system (Xero or QuickBooks), or null when not yet synced.",
            "nullable": true
          },
          "PaymentLink": {
            "type": "string",
            "description": "Hosted payment link for this invoice, or null when none has been generated.",
            "nullable": true
          },
          "InvoiceTemplateId": {
            "type": "integer",
            "description": "Invoice template used to render this invoice's PDF.",
            "format": "int64",
            "nullable": true
          },
          "InvoiceEmailTemplateId": {
            "type": "integer",
            "description": "Email template used when this invoice is sent.",
            "format": "int64",
            "nullable": true
          },
          "BrandingThemeId": {
            "type": "string",
            "description": "Branding theme applied in the connected accounting system.",
            "format": "uuid",
            "nullable": true
          },
          "IsEmailSent": {
            "type": "boolean",
            "description": "Whether this invoice has been emailed to the client."
          },
          "EmailSentOn": {
            "type": "string",
            "description": "When this invoice was last emailed, in UTC, or null if never.",
            "format": "date-time",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the invoice was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the invoice was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Description on the invoice itself, separate from its lines' descriptions. Null when not set.",
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceAttachmentModel"
            },
            "description": "Files attached to the invoice. Empty when there are none."
          },
          "LineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineItemModel"
            },
            "description": "The invoice's line items, in the order they appear on the invoice."
          },
          "Payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoicePaymentModel"
            },
            "description": "Payments recorded against the invoice, oldest first - whether recorded in Gorelo, through\r\n`POST /v1/payments`, or synced from a connected accounting system. Empty when there are\r\nnone."
          }
        },
        "additionalProperties": false,
        "description": "An invoice with its line items, returned by `GET /v1/invoices/{invoiceId}`."
      },
      "InvoiceDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/InvoiceDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "InvoiceLineItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the line. On a bundle line it identifies the bundle as a whole, not any one of\r\nits parts.",
            "format": "uuid"
          },
          "ItemId": {
            "type": "string",
            "description": "The item charged on this line, resolving against `GET /v1/items` - the bundle itself on\r\na bundle line. Null only on an older line stored with no linked item.",
            "format": "uuid",
            "nullable": true,
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "ItemType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Name of the line as charged.",
            "example": "Onboarding Pack"
          },
          "Description": {
            "type": "string",
            "description": "Description of the line as charged. Null when not set.",
            "nullable": true
          },
          "Quantity": {
            "type": "number",
            "description": "Quantity billed.",
            "format": "double",
            "example": 2
          },
          "UnitCost": {
            "type": "number",
            "description": "Unit cost of the line.",
            "format": "double",
            "nullable": true,
            "example": 90
          },
          "UnitPrice": {
            "type": "number",
            "description": "Unit price charged.",
            "format": "double",
            "example": 150
          },
          "DiscountPercent": {
            "type": "number",
            "description": "Discount percentage applied to this line, 0-100.",
            "format": "double",
            "example": 10
          },
          "Tax": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Amount": {
            "type": "number",
            "description": "Line total after discount, before tax.",
            "format": "double",
            "example": 270
          },
          "TaxAmount": {
            "type": "number",
            "description": "Tax on this line.",
            "format": "double"
          },
          "BillableStatus": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "CoaCode": {
            "type": "string",
            "description": "Chart-of-accounts code the line posts to.",
            "nullable": true
          },
          "SubItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineSubItemModel"
            },
            "description": "The parts inside a bundle line, each resolving against `GET /v1/items`. Empty on every\r\nother line, never null. Returned whether or not the bundle prints its parts on the PDF."
          }
        },
        "additionalProperties": false,
        "description": "One line on an invoice. A bundle is one line: its quantity, price, cost, amount and tax belong\r\nto the bundle as a whole, and `SubItems` lists what is inside it."
      },
      "InvoiceLineSubItemModel": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "string",
            "description": "The part's item, resolving against `GET /v1/items`.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "Name of the part as charged."
          }
        },
        "additionalProperties": false,
        "description": "One part inside a bundle line. Priced as part of the bundle, so it carries no price of its own."
      },
      "InvoiceModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the invoice.",
            "format": "uuid",
            "example": "3f1a9e2b-6c4d-4e2a-8b1a-0e2f7c9d1a44"
          },
          "Number": {
            "type": "integer",
            "description": "The bare sequential invoice number, prefix and suffix stripped.",
            "format": "int64",
            "nullable": true,
            "example": 1042
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable invoice number, including the service provider's configured prefix/suffix.",
            "example": "INV-1042"
          },
          "ClientId": {
            "type": "integer",
            "description": "Client the invoice is billed to.",
            "format": "int64",
            "example": 88
          },
          "ContractId": {
            "type": "integer",
            "description": "Contract this invoice was raised from, or null. A manual invoice created through\r\n`POST /v1/invoices` always has no contract — `ContractId` is accepted only on\r\ncontract-generated invoices, which this surface does not create.",
            "format": "int64",
            "nullable": true,
            "example": 4021
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "InvoiceDate": {
            "type": "string",
            "description": "Date the invoice was raised, a calendar date in the service provider's terms.",
            "format": "date",
            "example": "2026-09-01"
          },
          "DueDate": {
            "type": "string",
            "description": "Date payment is due, a calendar date. Never earlier than InvoiceDate.",
            "format": "date",
            "nullable": true,
            "example": "2026-10-01"
          },
          "SubTotal": {
            "type": "number",
            "description": "Sum of the invoice's line items before discount and tax.",
            "format": "double",
            "example": 1200
          },
          "TotalDiscount": {
            "type": "number",
            "description": "Total discount amount across the invoice's line items.",
            "format": "double",
            "example": 60
          },
          "TotalTax": {
            "type": "number",
            "description": "Total tax across the invoice's line items.",
            "format": "double",
            "example": 85.5
          },
          "Total": {
            "type": "number",
            "description": "Grand total: SubTotal - TotalDiscount + TotalTax.",
            "format": "double",
            "example": 1225.5
          },
          "AmountPaid": {
            "type": "number",
            "description": "Amount paid against this invoice so far. Computed live from recorded payments.",
            "format": "double",
            "example": 500
          },
          "AmountDue": {
            "type": "number",
            "description": "Amount still owed: Total - AmountPaid. Never negative on the wire; a credit is reported as 0.",
            "format": "double",
            "example": 725.5
          },
          "Reference": {
            "type": "string",
            "description": "Free-text reference on the invoice, or null when not set.",
            "nullable": true,
            "example": "PO-4471"
          },
          "ExternalId": {
            "type": "string",
            "description": "Identifier of this invoice in the connected external accounting system (Xero or QuickBooks), or null when not yet synced.",
            "nullable": true
          },
          "PaymentLink": {
            "type": "string",
            "description": "Hosted payment link for this invoice, or null when none has been generated.",
            "nullable": true
          },
          "InvoiceTemplateId": {
            "type": "integer",
            "description": "Invoice template used to render this invoice's PDF.",
            "format": "int64",
            "nullable": true
          },
          "InvoiceEmailTemplateId": {
            "type": "integer",
            "description": "Email template used when this invoice is sent.",
            "format": "int64",
            "nullable": true
          },
          "BrandingThemeId": {
            "type": "string",
            "description": "Branding theme applied in the connected accounting system.",
            "format": "uuid",
            "nullable": true
          },
          "IsEmailSent": {
            "type": "boolean",
            "description": "Whether this invoice has been emailed to the client."
          },
          "EmailSentOn": {
            "type": "string",
            "description": "When this invoice was last emailed, in UTC, or null if never.",
            "format": "date-time",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the invoice was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the invoice was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One invoice, in the shape `GET /v1/invoices` returns each list row in."
      },
      "InvoiceModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "InvoicePaymentModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the payment. A payment recorded through `POST /v1/payments` can be removed\r\nwith `DELETE /v1/payments/{paymentId}`.",
            "format": "uuid",
            "example": "8c2d4f1a-3b5e-4c7d-9a1f-2e6b8d0c4f13"
          },
          "Amount": {
            "type": "number",
            "description": "Amount of the payment applied to this invoice.",
            "format": "double",
            "example": 250
          },
          "PaymentDate": {
            "type": "string",
            "description": "Date the payment was received, a calendar date in the service provider's time zone.",
            "format": "date",
            "example": "2026-10-01"
          },
          "Reference": {
            "type": "string",
            "description": "Reference recorded with the payment, such as a bank transaction or remittance number.",
            "example": "BANK-20261001-118"
          }
        },
        "additionalProperties": false,
        "description": "A payment recorded against an invoice."
      },
      "ItemDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the item.",
            "format": "uuid",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Display name of the item.",
            "example": "Managed Workstation - Standard"
          },
          "Number": {
            "type": "string",
            "description": "The item's product number, free text. Not clearable once set.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Free-text description.",
            "nullable": true
          },
          "CategoryId": {
            "type": "integer",
            "description": "Category the item is filed under, resolvable against GET /v1/items/categories.",
            "format": "int64",
            "nullable": true
          },
          "SubcategoryId": {
            "type": "integer",
            "description": "Subcategory the item is filed under, nested under CategoryId.",
            "format": "int64",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Client this item is scoped to, when it is client-specific rather than catalog-wide.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Client location this item is scoped to. Only meaningful alongside ClientId.",
            "format": "int64",
            "nullable": true
          },
          "Sku": {
            "type": "string",
            "description": "Stock-keeping unit. Product-only; null for a bundle.",
            "nullable": true
          },
          "PartNumber": {
            "type": "string",
            "description": "Manufacturer part number. Product-only; null for a bundle.",
            "nullable": true
          },
          "Manufacturer": {
            "type": "string",
            "description": "Manufacturer name. Product-only; null for a bundle.",
            "nullable": true
          },
          "Vendor": {
            "type": "string",
            "description": "Vendor the item is sourced from.",
            "nullable": true
          },
          "UnitCost": {
            "type": "number",
            "description": "Unit cost. For a product this is its current cost. For a bundle this is the sum of its\r\nsub-items' unit cost times quantity.",
            "format": "double",
            "nullable": true,
            "example": 42.5
          },
          "UnitPrice": {
            "type": "number",
            "description": "Unit price charged to the client.",
            "format": "double",
            "nullable": true,
            "example": 89
          },
          "TaxId": {
            "type": "integer",
            "description": "Tax rate applied to this item, resolvable against GET /v1/taxes, or null when none is\r\nassigned.",
            "format": "int64",
            "nullable": true
          },
          "ExternalProductId": {
            "type": "string",
            "description": "Identifier of this item in an external accounting system (QuickBooks/Xero), or null.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the item was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the item was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "SubItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemSubItemModel"
            },
            "description": "The products that make up this bundle, each with its quantity and the cost/price it\r\ncarried at the time it was added to the bundle. Present (and possibly empty) only for a\r\nbundle; null for a product.",
            "nullable": true
          },
          "ShowSubItemsOnInvoice": {
            "type": "boolean",
            "description": "Bundle-only: whether the bundle's sub-items are listed individually on an invoice.",
            "nullable": true
          },
          "ShowSubItemDescriptionsOnInvoice": {
            "type": "boolean",
            "description": "Bundle-only: whether each sub-item's description is shown alongside it on an invoice.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single item. Returns every field the item list returns, with the same values, plus the\r\nsub-item breakdown for a bundle."
      },
      "ItemDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ItemDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ItemListModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the item.",
            "format": "uuid",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Display name of the item.",
            "example": "Managed Workstation - Standard"
          },
          "Number": {
            "type": "string",
            "description": "The item's product number, free text. Not clearable once set.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Free-text description.",
            "nullable": true
          },
          "CategoryId": {
            "type": "integer",
            "description": "Category the item is filed under, resolvable against GET /v1/items/categories.",
            "format": "int64",
            "nullable": true
          },
          "SubcategoryId": {
            "type": "integer",
            "description": "Subcategory the item is filed under, nested under CategoryId.",
            "format": "int64",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Client this item is scoped to, when it is client-specific rather than catalog-wide.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Client location this item is scoped to. Only meaningful alongside ClientId.",
            "format": "int64",
            "nullable": true
          },
          "Sku": {
            "type": "string",
            "description": "Stock-keeping unit. Product-only; null for a bundle.",
            "nullable": true
          },
          "PartNumber": {
            "type": "string",
            "description": "Manufacturer part number. Product-only; null for a bundle.",
            "nullable": true
          },
          "Manufacturer": {
            "type": "string",
            "description": "Manufacturer name. Product-only; null for a bundle.",
            "nullable": true
          },
          "Vendor": {
            "type": "string",
            "description": "Vendor the item is sourced from.",
            "nullable": true
          },
          "UnitCost": {
            "type": "number",
            "description": "Unit cost. For a product this is its current cost. For a bundle this is the sum of its\r\nsub-items' unit cost times quantity.",
            "format": "double",
            "nullable": true,
            "example": 42.5
          },
          "UnitPrice": {
            "type": "number",
            "description": "Unit price charged to the client.",
            "format": "double",
            "nullable": true,
            "example": 89
          },
          "TaxId": {
            "type": "integer",
            "description": "Tax rate applied to this item, resolvable against GET /v1/taxes, or null when none is\r\nassigned.",
            "format": "int64",
            "nullable": true
          },
          "ExternalProductId": {
            "type": "string",
            "description": "Identifier of this item in an external accounting system (QuickBooks/Xero), or null.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the item was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the item was last changed, in UTC. Null when it has never been changed.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One row of the item catalog: a product or a bundle. `Type` says which. A bundle is a\r\nproduct made of other products; an invoice line references either kind through one\r\n`ItemId`. Labor items are internal to contract pricing, are not creatable in the app, and\r\nare never returned here."
      },
      "ItemListModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemListModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ItemSubItemModel": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "string",
            "description": "Identifier of the product this sub-item refers to.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "Name of the referenced product, echoed for convenience."
          },
          "Quantity": {
            "type": "number",
            "description": "How many of this product the bundle includes.",
            "format": "double",
            "example": 2
          },
          "UnitCost": {
            "type": "number",
            "description": "Unit cost recorded against this sub-item at the time it was added to the bundle.",
            "format": "double",
            "nullable": true
          },
          "UnitPrice": {
            "type": "number",
            "description": "Unit price recorded against this sub-item at the time it was added to the bundle.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One product inside a bundle."
      },
      "LastUpdateModel": {
        "type": "object",
        "properties": {
          "UpdateType": {
            "type": "string",
            "description": "Type of the last update: New, CommentCreated, StatusUpdated, TechnicianMentioned,\r\nExternalCommentCreated, TechnicianUpdated, Read, Unread. Empty for any other update."
          },
          "Summary": {
            "type": "string",
            "description": "Short summary of the last update."
          },
          "On": {
            "type": "string",
            "description": "Timestamp of the last update (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Summary of the most recent update to a ticket."
      },
      "LimitedHoursDetailsModel": {
        "type": "object",
        "properties": {
          "RateType": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false
      },
      "NumberedReferenceModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the referenced ticket or task.",
            "format": "uuid",
            "example": "e5fb2939-3bd7-4893-8b47-a287003d5b8a"
          },
          "Number": {
            "type": "string",
            "description": "Number as shown in the app, including any prefix. A string rather than an integer — task\r\nnumbers are not purely numeric.",
            "example": "T-1042"
          },
          "Title": {
            "type": "string",
            "description": "Title of the referenced ticket or task.",
            "example": "Laptop will not boot after update"
          }
        },
        "additionalProperties": false,
        "description": "A pointer to the ticket or task a record hangs off: the id to fetch it by, plus the number and\r\ntitle a person recognises it by. Kept separate from PublicCodeModel because a ticket has both a\r\nnumber and a title, and neither one alone identifies it to a reader."
      },
      "ObjectBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/ErrorDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "PaginatedResponse": {
        "type": "object",
        "properties": {
          "NextCursor": {
            "type": "string",
            "nullable": true
          },
          "PreviousCursor": {
            "type": "string",
            "nullable": true
          },
          "HasMore": {
            "type": "boolean"
          },
          "HasPrevious": {
            "type": "boolean"
          },
          "TotalCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PaginationDataContext": {
        "type": "object",
        "properties": {
          "Pagination": {
            "$ref": "#/components/schemas/PaginatedResponse"
          }
        },
        "additionalProperties": false,
        "description": "The `DataContext` of a cursor-paginated success response: carries the paging metadata\r\nfor the returned page."
      },
      "PerHourDetailsModel": {
        "type": "object",
        "properties": {
          "RateType": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false
      },
      "PostAlertRequest": {
        "required": [
          "ClientId",
          "Name",
          "Resource"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Alert name / title. Required.",
            "example": "Disk usage above 90%"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the alert relates to. Required.",
            "format": "int64"
          },
          "Resource": {
            "minLength": 1,
            "type": "string",
            "description": "Resource the alert is raised for (e.g. host name, service).",
            "example": "SRV-DB-01"
          },
          "Severity": {
            "$ref": "#/components/schemas/AlertSeverity"
          },
          "Description": {
            "type": "string",
            "description": "Free-text alert description."
          },
          "AgentAssetId": {
            "type": "string",
            "description": "The agent asset the alert is about - an id from `GET /v1/assets/agents`. Optional; at most\r\none of `AgentAssetId`, `CustomAssetId` and `UptimeId` may be sent. It must belong\r\nto `ClientId`. `Resource` stays free text.",
            "format": "uuid",
            "nullable": true
          },
          "CustomAssetId": {
            "type": "string",
            "description": "The custom asset the alert is about - an id from `GET /v1/assets/custom`. Optional; see\r\n`AgentAssetId`.",
            "format": "uuid",
            "nullable": true
          },
          "UptimeId": {
            "type": "string",
            "description": "The uptime the alert is about - an id from `GET /v1/uptime`. Optional; see\r\n`AgentAssetId`.",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for posting an external alert against a client."
      },
      "ProductCategoryModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the category.",
            "format": "int64",
            "example": 4
          },
          "Name": {
            "type": "string",
            "description": "Display name of the category.",
            "example": "Elevate Apps"
          },
          "Description": {
            "type": "string",
            "description": "Free-text description of the category.",
            "nullable": true,
            "example": "SaaS Applications"
          },
          "TaxId": {
            "type": "integer",
            "description": "Tax rate assigned to the category, or null when none is assigned. Resolve it against\r\nGET /v1/taxes.",
            "format": "int64",
            "nullable": true,
            "example": 4
          },
          "Subcategories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductSubcategoryModel"
            },
            "description": "The subcategories under this category. Always present, and an empty array when the\r\ncategory has none."
          }
        },
        "additionalProperties": false,
        "description": "A category products are organised under, with its subcategories nested underneath."
      },
      "ProductCategoryModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductCategoryModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ProductSubcategoryModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the subcategory. Subcategory ids are issued independently of category ids,\r\nso the same number can name both a category and a subcategory.",
            "format": "int64",
            "example": 12
          },
          "Name": {
            "type": "string",
            "description": "Display name of the subcategory.",
            "example": "Cloud Storage"
          },
          "Description": {
            "type": "string",
            "description": "Free-text description of the subcategory.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A subcategory nested under a product category."
      },
      "ProjectCommentListItemModel": {
        "type": "object",
        "properties": {
          "BodyTruncated": {
            "type": "boolean",
            "description": "Whether the body was left out of the list. Always false on a project comment, whose body\r\nis always returned in full."
          },
          "Id": {
            "type": "string",
            "description": "Comment identifier.",
            "format": "uuid"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation this comment belongs to, as a string. Always null on a\r\nproject: a project carries only the Public and Private main thread, which has no\r\nconversation record of its own.",
            "nullable": true
          },
          "ConversationType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BodyHtml": {
            "type": "string",
            "description": "The comment body, as HTML."
          },
          "BodyText": {
            "type": "string",
            "description": "The comment body as markdown, when one was stored.",
            "nullable": true
          },
          "Author": {
            "$ref": "#/components/schemas/CommentAuthorModel"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to the comment."
          },
          "Reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentReactionModel"
            },
            "description": "Reactions left on the comment."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the comment was written (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the comment was last edited (UTC). Null if it never was.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A project comment as it appears in the comments list. Carries `BodyTruncated` so\r\nthe project and task comment lists read the same way, and a client written against one does\r\nnot have to special-case the other."
      },
      "ProjectCommentListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectCommentListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ProjectCommentModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Comment identifier.",
            "format": "uuid"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation this comment belongs to, as a string. Always null on a\r\nproject: a project carries only the Public and Private main thread, which has no\r\nconversation record of its own.",
            "nullable": true
          },
          "ConversationType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BodyHtml": {
            "type": "string",
            "description": "The comment body, as HTML."
          },
          "BodyText": {
            "type": "string",
            "description": "The comment body as markdown, when one was stored.",
            "nullable": true
          },
          "Author": {
            "$ref": "#/components/schemas/CommentAuthorModel"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to the comment."
          },
          "Reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentReactionModel"
            },
            "description": "Reactions left on the comment."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the comment was written (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the comment was last edited (UTC). Null if it never was.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A comment on a project. All timestamps are UTC. Project comments carry no email delivery\r\ndetails or sentiment score."
      },
      "ProjectCommentModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ProjectCommentModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ProjectDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Project identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Project title."
          },
          "Number": {
            "type": "integer",
            "description": "Sequential project number.",
            "format": "int64",
            "nullable": true
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable project number, including any service-provider prefix."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the project belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the project belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the lead assignee (technician).",
            "format": "int64",
            "nullable": true
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of the technician groups the project is assigned to."
          },
          "PrimaryGroupId": {
            "type": "integer",
            "description": "Identifier of the primary technician group - the first entry of `GroupIds`, the\r\nsame reading a ticket's `PrimaryGroupId` uses. Null when the project has no group.",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "StatusUpdatedOn": {
            "type": "string",
            "description": "Timestamp of the last status change (UTC). Null when no status change has been recorded\r\nfor the project.",
            "format": "date-time",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Reason recorded for the current status, when applicable."
          },
          "Type": {
            "$ref": "#/components/schemas/GuidCodeModel"
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tags applied to the project."
          },
          "TargetDate": {
            "type": "string",
            "description": "Date the project is targeted to finish (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ProgressPercent": {
            "type": "number",
            "description": "Percentage of the project's tasks that are complete, 0-100, rounded to two decimal places.",
            "format": "float",
            "nullable": true
          },
          "LastUpdate": {
            "$ref": "#/components/schemas/ProjectLastUpdateModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the project was created (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the project was last updated (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "When the project was closed (UTC) - set when it moves to Closed, cleared when it is\r\nreopened. Null for a project that is not Closed.",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Project description."
          },
          "SharedWithContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of contacts the project is shared with."
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians watching the project."
          }
        },
        "additionalProperties": false,
        "description": "A single project. Returns every field the project list returns, with the same values, plus the\r\nones the list leaves out. Sections are their own sub-resource\r\n(`GET /v1/projects/{projectId}/sections`) and are deliberately not embedded here."
      },
      "ProjectDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ProjectDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ProjectLastUpdateModel": {
        "type": "object",
        "properties": {
          "UpdateType": {
            "type": "string",
            "description": "Type of the last update, from a fixed set. Empty, with an empty `Summary`, for any\r\nother recorded event.\r\n\n\r\nOn a project: `ProjectCreated`, `ProjectSectionCreated`,\r\n`ProjectSectionUpdated`, `ProjectSectionDeleted`, `TaskCreated`,\r\n`TaskSectionUpdated`, `TaskStatusUpdated`, `TaskDeleted`,\r\n`ProjectLeadAssigneeUpdated`, `ProjectContactsUpdated`, `ProjectDueDateUpdated`,\r\n`ProjectTypeUpdated`, `ProjectTagsUpdated`, `ProjectGroupsUpdated`,\r\n`ProjectStatusUpdated`, `ProjectCommentAdded`, `ProjectDeleted`,\r\n`ProjectRecovered`, `ProjectTitleUpdated`, `ProjectWatchersUpdated`,\r\n`ProjectClientUpdated`, `ProjectClientLocationUpdated`,\r\n`ProjectDescriptionUpdated`.\r\n\n\r\nOn a task: `TaskCreated`, `TaskSectionUpdated`, `TaskDeleted`,\r\n`TaskStatusUpdated`, `TaskPriorityUpdated`, `TaskDueDateUpdated`,\r\n`TaskLeadAssigneeUpdated`, `TaskAssistingAssigneesUpdated`, `TaskAssetsUpdated`,\r\n`TaskBlockersUpdated`, `TaskReadStatusUpdated`, `TaskTPCAdded`,\r\n`TaskShipmentTrackingAdded`, `TaskShipmentTrackingDeleted`,\r\n`TaskShipmentTrackingUpdated`, `TaskChecklistAdded`, `TaskChecklistDeleted`,\r\n`TaskChecklistItemAdded`, `TaskChecklistItemDeleted`,\r\n`TaskChecklistItemCompleted`, `TaskApprovalAdded`, `TaskCommentAdded`,\r\n`TaskTitleUpdated`, `TaskWatchersUpdated`, `TaskRecovered`, `TaskMerged`,\r\n`ProjectShortcutApplied`, `TaskDeviceFileExplorerUsed`,\r\n`TaskDeviceRemoteConnectLaunched`, `TaskEventScheduled`, `TaskEventRemoved`.\r\n"
          },
          "Summary": {
            "type": "string",
            "description": "Short plain-text summary of the last update. Empty when the event type carries no summary."
          },
          "On": {
            "type": "string",
            "description": "When the last update happened (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The most recent activity recorded on a project."
      },
      "ProjectListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Project identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Project title."
          },
          "Number": {
            "type": "integer",
            "description": "Sequential project number.",
            "format": "int64",
            "nullable": true
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable project number, including any service-provider prefix."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the project belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the project belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the lead assignee (technician).",
            "format": "int64",
            "nullable": true
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of the technician groups the project is assigned to."
          },
          "PrimaryGroupId": {
            "type": "integer",
            "description": "Identifier of the primary technician group - the first entry of `GroupIds`, the\r\nsame reading a ticket's `PrimaryGroupId` uses. Null when the project has no group.",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "StatusUpdatedOn": {
            "type": "string",
            "description": "Timestamp of the last status change (UTC). Null when no status change has been recorded\r\nfor the project.",
            "format": "date-time",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Reason recorded for the current status, when applicable."
          },
          "Type": {
            "$ref": "#/components/schemas/GuidCodeModel"
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tags applied to the project."
          },
          "TargetDate": {
            "type": "string",
            "description": "Date the project is targeted to finish (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ProgressPercent": {
            "type": "number",
            "description": "Percentage of the project's tasks that are complete, 0-100, rounded to two decimal places.",
            "format": "float",
            "nullable": true
          },
          "LastUpdate": {
            "$ref": "#/components/schemas/ProjectLastUpdateModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the project was created (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the project was last updated (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "When the project was closed (UTC) - set when it moves to Closed, cleared when it is\r\nreopened. Null for a project that is not Closed.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A project as returned by the project list endpoint. All timestamps are UTC."
      },
      "ProjectListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ProjectSectionModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Section identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Section title."
          },
          "Color": {
            "type": "string",
            "description": "Colour the section is displayed in, as stored by the app."
          },
          "TaskCount": {
            "type": "integer",
            "description": "Number of tasks in the section.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A section of a project, as returned by the project sections endpoint."
      },
      "ProjectSectionModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSectionModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ProjectTagListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Tag identifier — the value that appears in a project's `TagIds`.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "Tag display name."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC). Null when the tag has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Tag description."
          }
        },
        "additionalProperties": false,
        "description": "A project tag, as returned by the project tags endpoint. Project tags are a separate set from\r\nticket tags and are identified by a GUID."
      },
      "ProjectTagListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectTagListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ProjectTypeListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Type identifier — the value that appears as a project's `TypeId`.",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "description": "Type display name."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC). Null when the type has never been changed.",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Type description."
          }
        },
        "additionalProperties": false,
        "description": "A project type, as returned by the project types endpoint. Project types are a separate set\r\nfrom ticket types and are identified by a GUID."
      },
      "ProjectTypeListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectTypeListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "RemoveDocumentRelatedItemResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the removed link.",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "The link that was removed."
      },
      "RemoveDocumentRelatedItemResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/RemoveDocumentRelatedItemResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ScriptDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Script identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Script title.",
            "example": "Clear Teams cache"
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ParentScriptId": {
            "type": "string",
            "description": "The script this one sits under in the library's tree; `null` at the top level.",
            "format": "uuid",
            "nullable": true
          },
          "IsFavorite": {
            "type": "boolean",
            "description": "Whether the script is marked as a favorite. Shared across the service provider."
          },
          "Version": {
            "type": "integer",
            "description": "Version number; it goes up each time the script's content or settings are saved.",
            "format": "int32",
            "example": 4
          },
          "TimeoutSeconds": {
            "type": "integer",
            "description": "How long the script may run, in seconds; `null` means the product default.",
            "format": "int32",
            "nullable": true,
            "example": 300
          },
          "RunAsUser": {
            "type": "boolean",
            "description": "Whether the script runs as the logged-on user rather than as the system."
          },
          "Content": {
            "type": "string",
            "description": "The script's content, as plain text.",
            "example": "Stop-Process -Name ms-teams -Force"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC); `null` when never updated.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A script with its content and run settings. Timestamps are UTC."
      },
      "ScriptDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/ScriptDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "ScriptListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Script identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Script title.",
            "example": "Clear Teams cache"
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ParentScriptId": {
            "type": "string",
            "description": "The script this one sits under in the library's tree; `null` at the top level.",
            "format": "uuid",
            "nullable": true
          },
          "IsFavorite": {
            "type": "boolean",
            "description": "Whether the script is marked as a favorite. Shared across the service provider."
          },
          "Version": {
            "type": "integer",
            "description": "Version number; it goes up each time the script's content or settings are saved.",
            "format": "int32",
            "example": 4
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC); `null` when never updated.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A script in the service provider's script library. Timestamps are UTC."
      },
      "ScriptListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScriptListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "SecurityPostureModel": {
        "type": "object",
        "properties": {
          "Antivirus": {
            "$ref": "#/components/schemas/SecurityPostureStatusModel"
          },
          "Firewall": {
            "$ref": "#/components/schemas/SecurityPostureStatusModel"
          },
          "Patches": {
            "$ref": "#/components/schemas/SecurityPostureStatusModel"
          },
          "Apps": {
            "$ref": "#/components/schemas/SecurityPostureStatusModel"
          }
        },
        "additionalProperties": false,
        "description": "The security posture of an agent, as four independent categories. Always present on an agent\r\nresponse; a category with nothing to report is `Unknown` rather than null."
      },
      "SecurityPostureStatusModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Status id on the `PublicSecurityPostureStatus` scale.",
            "format": "int32",
            "example": 1
          },
          "Name": {
            "type": "string",
            "description": "Status name, as the Gorelo app's asset list labels it. A fixed set: 1 `Up To Date`,\r\n2 `Updates Available`, 3 `Out of Date` (one name for every category, the\r\napp's own helper value), 4 `Enabled`, 5 `Disabled`, 6 `Missing`,\r\n7 `Unmanaged`, 8 `N/A`, 9 `Unknown`.",
            "example": "Up To Date"
          },
          "Passing": {
            "type": "boolean",
            "description": "Whether the category counts as healthy. `Updates Available` is healthy — the product\r\ntreats an available update as normal, not a fault — while `Unknown` is not, because\r\nno evidence of health is not health.",
            "example": true
          }
        },
        "additionalProperties": false,
        "description": "One security posture category: the coded status plus whether it counts as healthy."
      },
      "SlaFirstResponseModel": {
        "type": "object",
        "properties": {
          "ElapsedBusinessMinutes": {
            "type": "number",
            "description": "Time from the ticket being created to its first response, in minutes.\r\n            Null until the ticket has had a first response.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "First-response SLA details."
      },
      "SlaModel": {
        "type": "object",
        "properties": {
          "FirstResponse": {
            "$ref": "#/components/schemas/SlaFirstResponseModel"
          }
        },
        "additionalProperties": false,
        "description": "SLA information for a ticket."
      },
      "StatusListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Status identifier.",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "Status display name."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "BaseStatus": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Color": {
            "type": "string",
            "description": "Display color (hex)."
          },
          "SortOrder": {
            "type": "integer",
            "description": "Ordering position among statuses.",
            "format": "int32"
          },
          "Description": {
            "type": "string",
            "description": "Status description."
          },
          "AskForReason": {
            "type": "boolean",
            "description": "Whether transitioning to this status requires a reason."
          }
        },
        "additionalProperties": false,
        "description": "A ticket status configured for the service provider. Timestamps are UTC."
      },
      "StatusListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "SubTaxModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the component rate.",
            "format": "int64",
            "example": 41
          },
          "Name": {
            "type": "string",
            "description": "Display name of the component rate.",
            "example": "GST"
          },
          "Code": {
            "type": "string",
            "description": "Short code for the component rate, as carried by the accounting system it came from.",
            "nullable": true,
            "example": "GST"
          },
          "Percentage": {
            "type": "number",
            "description": "The component rate itself, as a percentage. Null when the rate has not been set. There is\r\nno IsDefault here - only a whole tax can be the default, not one of its components.",
            "format": "double",
            "nullable": true,
            "example": 5
          }
        },
        "additionalProperties": false,
        "description": "One component of a tax rate: a SubTax row belonging to the tax it is nested under. Sub-taxes\r\nare owned by their parent tax rather than referenced, so they carry no tax id of their own -\r\nthe parent is the object they appear inside."
      },
      "TagListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Tag identifier.",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "Tag display name."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Tag description."
          },
          "IsAiTag": {
            "type": "boolean",
            "description": "Whether the tag is AI-generated."
          }
        },
        "additionalProperties": false,
        "description": "A ticket tag configured for the service provider. Timestamps are UTC."
      },
      "TagListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TaskApprovalDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Approval identifier, as a string. Matches the `Id` from the conversations list."
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Short label for the approval."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Approvers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskApproverModel"
            },
            "description": "One row per person who must approve."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Full details of one approval on a task - this is where approval status lives, the\r\nconversations list being deliberately lean. Attachments belong to the approval's comments\r\nrather than to the approval itself, so there is no attachments field here. Timestamps are UTC."
      },
      "TaskApprovalDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/TaskApprovalDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TaskApproverModel": {
        "type": "object",
        "properties": {
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the contact asked to approve.",
            "format": "int64"
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "One person's response on a task approval. No response timestamp is recorded."
      },
      "TaskBillingOverrideModel": {
        "type": "object",
        "properties": {
          "ServiceLine": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BillingRole": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "WorkType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BillableStatus": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "Billing settings overridden at the task level. Tasks do not support billing overrides, so\r\nevery field here is always null."
      },
      "TaskChecklistSummaryModel": {
        "type": "object",
        "properties": {
          "Completed": {
            "type": "integer",
            "description": "Number of completed checklist items.",
            "format": "int32"
          },
          "Total": {
            "type": "integer",
            "description": "Total number of checklist items.",
            "format": "int32"
          },
          "ProgressPercent": {
            "type": "number",
            "description": "Percentage complete, 0-100, rounded to two decimal places.",
            "format": "float",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How many checklist items are done out of the total, across a task's checklists."
      },
      "TaskCommentListItemModel": {
        "type": "object",
        "properties": {
          "BodyTruncated": {
            "type": "boolean",
            "description": "True when the body was left out of the list. Fetch the single comment to get the complete\r\n`BodyHtml` and `BodyText`."
          },
          "Id": {
            "type": "string",
            "description": "Comment identifier.",
            "format": "uuid"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation this comment belongs to, as a string. Null for Public and\r\nPrivate comments, which are the task's main thread rather than a separate conversation.",
            "nullable": true
          },
          "ConversationType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Source": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BodyHtml": {
            "type": "string",
            "description": "The comment body, as HTML."
          },
          "BodyText": {
            "type": "string",
            "description": "The comment body as markdown, when one was stored.",
            "nullable": true
          },
          "Author": {
            "$ref": "#/components/schemas/CommentAuthorModel"
          },
          "EmailInfo": {
            "$ref": "#/components/schemas/CommentEmailInfoModel"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to the comment."
          },
          "SentimentScore": {
            "type": "number",
            "description": "Customer sentiment scored on incoming comments; null when not scored.",
            "format": "double",
            "nullable": true
          },
          "Reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentReactionModel"
            },
            "description": "Reactions left on the comment."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the comment was written (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the comment was last edited (UTC). Null if it never was.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A task comment as it appears in the comments list. Adds `BodyTruncated`, which\r\nthe single-comment endpoint omits because it always returns the full body."
      },
      "TaskCommentListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskCommentListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TaskCommentModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Comment identifier.",
            "format": "uuid"
          },
          "ConversationId": {
            "type": "string",
            "description": "Identifier of the conversation this comment belongs to, as a string. Null for Public and\r\nPrivate comments, which are the task's main thread rather than a separate conversation.",
            "nullable": true
          },
          "ConversationType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Source": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BodyHtml": {
            "type": "string",
            "description": "The comment body, as HTML."
          },
          "BodyText": {
            "type": "string",
            "description": "The comment body as markdown, when one was stored.",
            "nullable": true
          },
          "Author": {
            "$ref": "#/components/schemas/CommentAuthorModel"
          },
          "EmailInfo": {
            "$ref": "#/components/schemas/CommentEmailInfoModel"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "Files attached to the comment."
          },
          "SentimentScore": {
            "type": "number",
            "description": "Customer sentiment scored on incoming comments; null when not scored.",
            "format": "double",
            "nullable": true
          },
          "Reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentReactionModel"
            },
            "description": "Reactions left on the comment."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the comment was written (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the comment was last edited (UTC). Null if it never was.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A comment on a task. All timestamps are UTC.\r\n            \r\nSame shape as a project comment and a ticket comment. A task, unlike a project, has side\r\nconversations and approvals, so `ConversationId` is populated for those two kinds."
      },
      "TaskCommentModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/TaskCommentModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TaskConversationListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Conversation identifier, as a string. Null for the Public and Private rows, which are\r\nthe task's main thread and have no id to drill into.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Short label for the conversation."
          },
          "Email": {
            "type": "string",
            "description": "Address this conversation is directed to - the side conversation's own address, the\r\nfirst approver for Approval. Null for Private, which is never emailed, and for Public: a\r\ntask's public thread is addressed from the comment being posted rather than from a\r\ncontact stored on the task.",
            "nullable": true
          },
          "CcEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Addresses copied on this conversation - the side conversation's CC list. Empty for\r\nPublic, Private and Approval, none of which copies anyone."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A conversation on a task. Deliberately lean and identical in shape for every conversation\r\ntype - type-specific details (approvers, side-conversation email) live on that type's own\r\ndetail endpoint. Timestamps are UTC."
      },
      "TaskConversationListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskConversationListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TaskDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Task identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Task title."
          },
          "Number": {
            "type": "integer",
            "description": "Sequential task number within the project.",
            "format": "int64",
            "nullable": true
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable task number, the project's display number and the task number joined —\r\ne.g. `PRO-462-3`."
          },
          "SectionId": {
            "type": "string",
            "description": "Identifier of the section the task sits in.",
            "format": "uuid"
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the lead assignee.",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of assisting assignees."
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians watching the task."
          },
          "PrimaryGroupId": {
            "type": "integer",
            "description": "Identifier of the primary technician group. A task has no groups of its own - it inherits\r\nthem from its parent project - so this is the first entry of the project's\r\n`GroupIds`, the same reading a ticket's `PrimaryGroupId` uses. Null when the\r\nproject has no groups.",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "StatusUpdatedOn": {
            "type": "string",
            "description": "When the current status was last set (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Free-text reason recorded for the current status."
          },
          "Priority": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "DueDate": {
            "type": "string",
            "description": "Date the task is due (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ChecklistSummary": {
            "$ref": "#/components/schemas/TaskChecklistSummaryModel"
          },
          "IsUnread": {
            "type": "boolean",
            "description": "Whether the task is currently unread."
          },
          "IsWaitingOnThem": {
            "type": "boolean",
            "description": "Whether the task is waiting on the client rather than on the service provider."
          },
          "BlockedByTaskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tasks that must finish before this one can."
          },
          "BlockingTaskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tasks this one is blocking."
          },
          "LastUpdate": {
            "$ref": "#/components/schemas/ProjectLastUpdateModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the task was created (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the task was last updated (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "When the task was marked Done (UTC). Null whenever the task's current status is not Done:\r\nunlike a reopened ticket's `ClosedOn`, it reports the current close, not the last one\r\never recorded.",
            "format": "date-time",
            "nullable": true
          },
          "ProjectId": {
            "type": "string",
            "description": "Identifier of the project the task belongs to.",
            "format": "uuid"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the task is for - always the parent project's client.",
            "format": "int64",
            "nullable": true
          },
          "StatusDetails": {
            "$ref": "#/components/schemas/TaskStatusDetailsModel"
          },
          "AgentAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of linked agent-managed assets."
          },
          "CustomAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of linked custom assets."
          },
          "UptimeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of linked uptime checks."
          },
          "Time": {
            "$ref": "#/components/schemas/TaskTimeModel"
          },
          "Products": {
            "$ref": "#/components/schemas/TaskProductsModel"
          },
          "BillingOverride": {
            "$ref": "#/components/schemas/TaskBillingOverrideModel"
          },
          "Shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskShipmentModel"
            },
            "description": "Shipment tracking attached to the task. Tasks do not support shipment tracking, so this is\r\nalways empty; the list is present so the shape matches a ticket's."
          },
          "Banner": {
            "type": "string",
            "description": "The banner shown on the task, if one is set.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single task in full. Everything the task list returns, plus the fields only a single task\r\ncarries. All timestamps are UTC."
      },
      "TaskDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/TaskDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TaskListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Task identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Task title."
          },
          "Number": {
            "type": "integer",
            "description": "Sequential task number within the project.",
            "format": "int64",
            "nullable": true
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable task number, the project's display number and the task number joined —\r\ne.g. `PRO-462-3`."
          },
          "SectionId": {
            "type": "string",
            "description": "Identifier of the section the task sits in.",
            "format": "uuid"
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the lead assignee.",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of assisting assignees."
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians watching the task."
          },
          "PrimaryGroupId": {
            "type": "integer",
            "description": "Identifier of the primary technician group. A task has no groups of its own - it inherits\r\nthem from its parent project - so this is the first entry of the project's\r\n`GroupIds`, the same reading a ticket's `PrimaryGroupId` uses. Null when the\r\nproject has no groups.",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "StatusUpdatedOn": {
            "type": "string",
            "description": "When the current status was last set (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Free-text reason recorded for the current status."
          },
          "Priority": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "DueDate": {
            "type": "string",
            "description": "Date the task is due (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ChecklistSummary": {
            "$ref": "#/components/schemas/TaskChecklistSummaryModel"
          },
          "IsUnread": {
            "type": "boolean",
            "description": "Whether the task is currently unread."
          },
          "IsWaitingOnThem": {
            "type": "boolean",
            "description": "Whether the task is waiting on the client rather than on the service provider."
          },
          "BlockedByTaskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tasks that must finish before this one can."
          },
          "BlockingTaskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tasks this one is blocking."
          },
          "LastUpdate": {
            "$ref": "#/components/schemas/ProjectLastUpdateModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the task was created (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the task was last updated (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "When the task was marked Done (UTC). Null whenever the task's current status is not Done:\r\nunlike a reopened ticket's `ClosedOn`, it reports the current close, not the last one\r\never recorded.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A task as returned by the project's task list. All timestamps are UTC."
      },
      "TaskListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TaskProductsModel": {
        "type": "object",
        "properties": {
          "Count": {
            "type": "integer",
            "description": "How many products are on the task, whatever their billable state.",
            "format": "int32"
          },
          "TotalAmount": {
            "type": "number",
            "description": "What those products are worth to the client, in the service provider's currency: each\r\nbillable product's price x quantity, rounded to two decimals, summed. Products marked not\r\nbillable, hidden or void are counted by `Count` but contribute nothing here,\r\nbecause invoicing bills them as zero. Excludes tax.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "The products added to a task."
      },
      "TaskShipmentModel": {
        "type": "object",
        "properties": {
          "TrackingNumber": {
            "type": "string",
            "description": "The carrier's tracking number."
          },
          "Carrier": {
            "type": "string",
            "description": "The carrier, as its tracking slug (e.g. \"star-track\")."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Label given to the shipment on the task.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One shipment tracked on a task. Tasks do not support shipment tracking, so the list is always\r\nempty; the shape matches a ticket's shipment."
      },
      "TaskStatusDetailsModel": {
        "type": "object",
        "properties": {
          "Reason": {
            "type": "string",
            "description": "Free-text reason for the current status.",
            "nullable": true
          },
          "UpdatedById": {
            "type": "integer",
            "description": "Identifier of the technician who last set the status.",
            "format": "int64",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the status was last set (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The reason recorded with a task's status, and who set it."
      },
      "TaskTimeBreakdownModel": {
        "type": "object",
        "properties": {
          "Billable": {
            "$ref": "#/components/schemas/TaskTimeBucketModel"
          },
          "NotBillable": {
            "$ref": "#/components/schemas/TaskTimeBucketModel"
          },
          "NotBillableHidden": {
            "$ref": "#/components/schemas/TaskTimeBucketModel"
          }
        },
        "additionalProperties": false,
        "description": "A task's time split by billable state. An entry stays in its billable-state bucket whatever\r\nits position in the billing pipeline - approved or invoiced time is not moved out."
      },
      "TaskTimeBucketModel": {
        "type": "object",
        "properties": {
          "ActualHours": {
            "type": "number",
            "description": "Hours as the timer recorded them.",
            "format": "double"
          },
          "AdjustedHours": {
            "type": "number",
            "description": "Hours after any manual correction to the entry.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One bucket of a task's time, in decimal hours."
      },
      "TaskTimeModel": {
        "type": "object",
        "properties": {
          "ActualHours": {
            "type": "number",
            "description": "All time recorded against the task as timed, whatever its billable state.",
            "format": "double"
          },
          "AdjustedHours": {
            "type": "number",
            "description": "The same total after manual corrections to individual entries.",
            "format": "double"
          },
          "Breakdown": {
            "$ref": "#/components/schemas/TaskTimeBreakdownModel"
          }
        },
        "additionalProperties": false,
        "description": "Time recorded against a task, on both bases and split by billable state."
      },
      "TaxModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the tax rate. This is the id every other endpoint's tax reference carries -\r\na product category's TaxId and a contract line item's Tax.Id are the same identifier - so a\r\ntax seen anywhere is resolved by finding it in this list.",
            "format": "int64",
            "example": 4
          },
          "Name": {
            "type": "string",
            "description": "Display name of the tax rate.",
            "example": "GST on Income"
          },
          "Code": {
            "type": "string",
            "description": "Short code for the tax rate, as carried by the accounting system it came from. Often an\r\nabbreviation of the name, sometimes identical to it.",
            "nullable": true,
            "example": "GST"
          },
          "Percentage": {
            "type": "number",
            "description": "The tax rate itself, as a percentage. Null when the rate has not been set.\r\n\n\r\nWhen SubTaxes is non-empty this is the headline total and the components carry the rates\r\nactually applied, so the two are alternatives rather than additive - see SubTaxes.\r\n",
            "format": "double",
            "nullable": true,
            "example": 10
          },
          "IsDefault": {
            "type": "boolean",
            "description": "Whether this is the tax rate applied automatically when none is chosen.",
            "example": true
          },
          "SubTaxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubTaxModel"
            },
            "description": "The component rates this tax is broken into, for accounting systems that split one tax\r\ninto parts - HST as GST plus PST, for example. An empty array for a tax with no\r\ncomponents, which is the common case; never null.\r\n\n\r\nWhere components exist they are what gets charged: the amount is the sum of each\r\ncomponent's Percentage applied to the line, and the parent's own Percentage is not applied\r\non top. Adding the two together double-taxes.\r\n"
          }
        },
        "additionalProperties": false,
        "description": "A tax rate configured for the service provider."
      },
      "TaxModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TicketBillingOverride": {
        "type": "object",
        "properties": {
          "ServiceLineId": {
            "type": "integer",
            "description": "Contract service line to bill time against. The owning contract is resolved from this\r\nautomatically.\r\n            \r\nOmit it and the override keeps the service line it has. Send it as null to clear the\r\ncontract override outright.",
            "format": "int64",
            "nullable": true
          },
          "BillingRoleId": {
            "type": "integer",
            "description": "Default billing role for time entries created against the ticket.",
            "format": "int64",
            "nullable": true
          },
          "WorkTypeId": {
            "type": "integer",
            "description": "Default work type for time entries created against the ticket.",
            "format": "int64",
            "nullable": true
          },
          "BillableStatusId": {
            "type": "integer",
            "description": "Default billable status for time entries created against the ticket.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Ticket-level billing defaults. These are stored on the ticket and applied when a time entry is\r\ncreated against it — they are not posted to Billing by this endpoint."
      },
      "TicketBillingOverrideModel": {
        "type": "object",
        "properties": {
          "ServiceLine": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BillingRole": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "WorkType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BillableStatus": {
            "$ref": "#/components/schemas/CodeModel"
          }
        },
        "additionalProperties": false,
        "description": "Billing settings overridden at the ticket level."
      },
      "TicketDetailModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Ticket identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Ticket title/subject."
          },
          "Number": {
            "type": "integer",
            "description": "Sequential ticket number.",
            "format": "int64",
            "nullable": true
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable ticket number, including any service-provider prefix."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the ticket belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the ticket belongs to.",
            "format": "int64",
            "nullable": true
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the primary contact.",
            "format": "int64",
            "nullable": true
          },
          "CcContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of additional (CC) contacts."
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the lead assignee (technician).",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of assisting assignees (technicians)."
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians watching the ticket."
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of all technician groups the ticket is assigned to."
          },
          "PrimaryGroupId": {
            "type": "integer",
            "description": "Identifier of the primary technician group.",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "StatusUpdatedOn": {
            "type": "string",
            "description": "Timestamp of the last status change (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Reason recorded for the current status, when applicable."
          },
          "Priority": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Source": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of tags applied to the ticket."
          },
          "ChecklistSummary": {
            "$ref": "#/components/schemas/ChecklistSummaryModel"
          },
          "IsUnread": {
            "type": "boolean",
            "description": "Whether the ticket is currently unread."
          },
          "IsWaitingOnThem": {
            "type": "boolean",
            "description": "Whether the ticket is waiting on the client rather than on the service provider."
          },
          "IsMerged": {
            "type": "boolean",
            "description": "Whether the ticket has been merged into another ticket."
          },
          "MergedIntoTicketId": {
            "type": "integer",
            "description": "Identifier of the ticket this one was merged into, if any.",
            "format": "int64",
            "nullable": true
          },
          "MergedTicketIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tickets merged into this one."
          },
          "Sla": {
            "$ref": "#/components/schemas/SlaModel"
          },
          "LastUpdate": {
            "$ref": "#/components/schemas/LastUpdateModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Ticket creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Ticket last-updated timestamp (UTC). Default sort key for the list endpoint.",
            "format": "date-time",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "Ticket closed timestamp (UTC), if closed.",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "The ticket's description — the body of its first (primary) comment, as plain text.\r\nNull when the ticket has no primary comment recorded.",
            "nullable": true
          },
          "AgentAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of the managed devices (agent assets) currently linked to the ticket."
          },
          "CustomAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of the custom assets currently linked to the ticket."
          },
          "UptimeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of the uptime checks currently linked to the ticket."
          },
          "Time": {
            "$ref": "#/components/schemas/TicketTimeModel"
          },
          "Products": {
            "$ref": "#/components/schemas/TicketProductsModel"
          },
          "BillingOverride": {
            "$ref": "#/components/schemas/TicketBillingOverrideModel"
          },
          "Shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TicketShipmentModel"
            },
            "description": "Shipment tracking attached to the ticket, one entry per tracking number."
          },
          "Banner": {
            "type": "string",
            "description": "Banner text shown on the ticket. May contain HTML.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A ticket's full detail, as returned by the single-ticket endpoint. Every field the ticket list\r\nserves is present and carries the same value; the fields below are the ones the list leaves out\r\nbecause they each cost an extra read and are rarely wanted for every row of a page.\r\nAll timestamps are UTC."
      },
      "TicketDetailModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/TicketDetailModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TicketListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Ticket identifier.",
            "format": "uuid"
          },
          "Title": {
            "type": "string",
            "description": "Ticket title/subject."
          },
          "Number": {
            "type": "integer",
            "description": "Sequential ticket number.",
            "format": "int64",
            "nullable": true
          },
          "DisplayNumber": {
            "type": "string",
            "description": "Human-readable ticket number, including any service-provider prefix."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the ticket belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the ticket belongs to.",
            "format": "int64",
            "nullable": true
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the primary contact.",
            "format": "int64",
            "nullable": true
          },
          "CcContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of additional (CC) contacts."
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Identifier of the lead assignee (technician).",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of assisting assignees (technicians)."
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of technicians watching the ticket."
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of all technician groups the ticket is assigned to."
          },
          "PrimaryGroupId": {
            "type": "integer",
            "description": "Identifier of the primary technician group.",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "StatusUpdatedOn": {
            "type": "string",
            "description": "Timestamp of the last status change (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Reason recorded for the current status, when applicable."
          },
          "Priority": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Source": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of tags applied to the ticket."
          },
          "ChecklistSummary": {
            "$ref": "#/components/schemas/ChecklistSummaryModel"
          },
          "IsUnread": {
            "type": "boolean",
            "description": "Whether the ticket is currently unread."
          },
          "IsWaitingOnThem": {
            "type": "boolean",
            "description": "Whether the ticket is waiting on the client rather than on the service provider."
          },
          "IsMerged": {
            "type": "boolean",
            "description": "Whether the ticket has been merged into another ticket."
          },
          "MergedIntoTicketId": {
            "type": "integer",
            "description": "Identifier of the ticket this one was merged into, if any.",
            "format": "int64",
            "nullable": true
          },
          "MergedTicketIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Identifiers of tickets merged into this one."
          },
          "Sla": {
            "$ref": "#/components/schemas/SlaModel"
          },
          "LastUpdate": {
            "$ref": "#/components/schemas/LastUpdateModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Ticket creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Ticket last-updated timestamp (UTC). Default sort key for the list endpoint.",
            "format": "date-time",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "Ticket closed timestamp (UTC), if closed.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A ticket as returned by the ticket list endpoint. All timestamps are UTC."
      },
      "TicketListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TicketListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TicketPriority": {
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "format": "int32"
      },
      "TicketProductsModel": {
        "type": "object",
        "properties": {
          "Count": {
            "type": "integer",
            "description": "How many products are on the ticket, whatever their billable state.",
            "format": "int32"
          },
          "TotalAmount": {
            "type": "number",
            "description": "What those products are worth to the client, in the service provider's currency: each\r\nbillable product's price × quantity, rounded to two decimals, summed. Products marked not\r\nbillable, hidden or void are counted by `Count` but contribute nothing here,\r\nbecause invoicing bills them as zero. Excludes tax.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "The products added to a ticket."
      },
      "TicketShipmentModel": {
        "type": "object",
        "properties": {
          "TrackingNumber": {
            "type": "string",
            "description": "The carrier's tracking number."
          },
          "Carrier": {
            "type": "string",
            "description": "The carrier, as its tracking slug (e.g. \"star-track\")."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Name": {
            "type": "string",
            "description": "Label given to the shipment on the ticket.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One shipment tracked on a ticket."
      },
      "TicketSource": {
        "enum": [
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "type": "integer",
        "format": "int32"
      },
      "TicketTimeBreakdownModel": {
        "type": "object",
        "properties": {
          "Billable": {
            "$ref": "#/components/schemas/TicketTimeBucketModel"
          },
          "NotBillable": {
            "$ref": "#/components/schemas/TicketTimeBucketModel"
          },
          "NotBillableHidden": {
            "$ref": "#/components/schemas/TicketTimeBucketModel"
          }
        },
        "additionalProperties": false,
        "description": "A ticket's time split by billable state. An entry stays in its billable-state bucket\r\nwhatever its position in the billing pipeline — approved or invoiced time is not moved\r\nelsewhere — so the buckets do not overlap."
      },
      "TicketTimeBucketModel": {
        "type": "object",
        "properties": {
          "ActualHours": {
            "type": "number",
            "description": "Hours as the timer recorded them.",
            "format": "double"
          },
          "AdjustedHours": {
            "type": "number",
            "description": "Hours after any manual correction to the entry.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One bucket of a ticket's time, in decimal hours."
      },
      "TicketTimeModel": {
        "type": "object",
        "properties": {
          "ActualHours": {
            "type": "number",
            "description": "All time recorded against the ticket as timed, whatever its billable state.",
            "format": "double"
          },
          "AdjustedHours": {
            "type": "number",
            "description": "The same total after manual corrections to individual entries.",
            "format": "double"
          },
          "Breakdown": {
            "$ref": "#/components/schemas/TicketTimeBreakdownModel"
          }
        },
        "additionalProperties": false,
        "description": "Time logged against a ticket, in decimal hours, summed from the ticket's time entries.\r\n            \r\nEvery figure comes in two forms: the time as the timer actually recorded it, and the time as it\r\nstands after a technician corrected an entry by hand. An entry with no correction reports the\r\nsame value for both, so the two totals differ only on tickets where someone adjusted an entry.\r\n            \r\nAn entry still being timed, or one whose recorded end precedes its start, has no usable duration\r\nand contributes nothing. Each figure is rounded to four decimal places."
      },
      "TimeEntryAttachment": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "File name as it should be displayed.",
            "example": "switch-photo.jpg"
          },
          "Url": {
            "type": "string",
            "description": "Location the file can be fetched from.",
            "example": "https://files.example.com/switch-photo.jpg"
          }
        },
        "additionalProperties": false,
        "description": "A file attached to a time entry. Same shape as comment attachments."
      },
      "TimeEntryAttachmentModel": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "File name as it should be displayed.",
            "example": "switch-photo.jpg"
          },
          "Url": {
            "type": "string",
            "description": "Location the file can be fetched from.",
            "example": "https://files.example.com/switch-photo.jpg"
          }
        },
        "additionalProperties": false
      },
      "TimeEntryModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the time entry.",
            "format": "int64",
            "example": 88214
          },
          "Ticket": {
            "$ref": "#/components/schemas/NumberedReferenceModel"
          },
          "Task": {
            "$ref": "#/components/schemas/NumberedReferenceModel"
          },
          "User": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "StartedOn": {
            "type": "string",
            "description": "When the work started, in UTC.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-04-28T09:00:00.0000000+00:00"
          },
          "EndedOn": {
            "type": "string",
            "description": "When the work finished, in UTC.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-04-28T10:30:00.0000000+00:00"
          },
          "ActualHours": {
            "type": "number",
            "description": "Duration actually logged, in decimal hours — simply the span between StartedOn and EndedOn.",
            "format": "double",
            "nullable": true,
            "example": 1.5
          },
          "AdjustedHours": {
            "type": "number",
            "description": "Billed duration, in decimal hours: the logged duration after the work type's minimum and\r\nincrement rounding.\r\n            \r\nWhen no rounding applied — the logged duration already met the minimum and landed on a\r\nwhole increment — this equals `ActualHours`, so it is always the figure the\r\nentry is billed at. Null only when the entry has no StartedOn and EndedOn to bill from.",
            "format": "double",
            "nullable": true,
            "example": 1.75
          },
          "BillableStatus": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "BillingRole": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "WorkType": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "ServiceLine": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Comment": {
            "type": "string",
            "description": "Free-text note describing the work.",
            "nullable": true,
            "example": "Replaced faulty NIC"
          },
          "Distance": {
            "type": "number",
            "description": "Distance travelled for this work, when the service provider bills mileage.",
            "format": "double",
            "nullable": true,
            "example": 12.5
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeEntryAttachment"
            },
            "description": "Files attached to this entry."
          },
          "CreatedOn": {
            "type": "string",
            "description": "When the entry was created, in UTC.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "When the entry was last changed, in UTC. Null if it has never been changed.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Time logged against a ticket."
      },
      "TimeEntryModelBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/TimeEntryModel"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TimeEntryModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeEntryModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "TypeListItemModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Type identifier.",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "Type display name."
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Type description."
          },
          "IsAiType": {
            "type": "boolean",
            "description": "Whether the type is AI-generated."
          }
        },
        "additionalProperties": false,
        "description": "A ticket type configured for the service provider. Timestamps are UTC."
      },
      "TypeListItemModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TypeListItemModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UnlimitedHoursDetailsModel": {
        "type": "object",
        "properties": {
          "AutoApprove": {
            "type": "boolean",
            "description": "Whether time logged against this line is approved automatically.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateClientCommand": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "New client display name. Leave null to keep the current value. Maximum 150 characters.",
            "nullable": true
          },
          "StatusId": {
            "type": "integer",
            "description": "New status id: 1 Active, 3 Credit hold, 4 Archived. Leave null to keep the current value.\r\nAny other value is a 400; to delete a client use DELETE /v1/clients/{clientId}.",
            "format": "int32",
            "nullable": true
          },
          "BillingName": {
            "type": "string",
            "description": "New billing name. Leave null or empty to keep the current value. Maximum 150 characters.",
            "nullable": true
          },
          "AlternateName": {
            "type": "string",
            "description": "New alternate / trading name. Leave null to keep the current value; send an empty string to clear it. Maximum 500 characters.",
            "nullable": true
          },
          "CustomProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomPropertyUpdate"
            },
            "description": "Custom field values to upsert. Identified by `Id`\r\n(the custom field id) only - an entry present updates that field's value, one absent from the array\r\nis left untouched, and omitting `CustomProperties` entirely leaves all custom properties\r\nuntouched. A `null``Value` clears the saved value so the field falls back to its\r\ndefault; an empty string saves an empty value. On a required field, either is rejected when it\r\nwould leave the field with no value. Each custom field id may appear once; a repeated id is a 400.",
            "nullable": true
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Group ids (from `GET /v1/organization/groups`) the client is subscribed to. Replaces the list;\r\n[] clears it; omit to leave unchanged. At most 100; every id must be an active group. Changing an\r\nexisting client's groups changes which technicians can see it, so open Gorelo web sessions reload.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating a client. Only the supplied (non-null) fields are changed;\r\n`Id`, bound from the route, identifies the client to update."
      },
      "UpdateContactCommand": {
        "required": [
          "ClientId",
          "FirstName",
          "LastName",
          "PrimaryEmail"
        ],
        "type": "object",
        "properties": {
          "FirstName": {
            "minLength": 1,
            "type": "string",
            "description": "Contact first name. Required. Maximum 150 characters.",
            "example": "Jane"
          },
          "LastName": {
            "minLength": 1,
            "type": "string",
            "description": "Contact last name. Required. Maximum 150 characters.",
            "example": "Doe"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the contact belongs to. Required.",
            "format": "int64"
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the contact belongs to. Omit to keep the current location.",
            "format": "int64",
            "nullable": true
          },
          "PrimaryEmail": {
            "minLength": 1,
            "type": "string",
            "description": "Primary email address. Required. Maximum 200 characters.",
            "example": "jane.doe@contoso.com"
          },
          "SecondaryEmail": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional (secondary) email addresses, replacing the current set. Omit to keep the current secondary\r\nemails; send an empty array to clear them. Maximum 200 characters each.",
            "nullable": true
          },
          "MobilePhone": {
            "type": "string",
            "description": "Mobile phone number, as dialled within its country, e.g. 021 123 4567 for NZ; an international +64 21 123 4567 is accepted too. A number sent without its leading 0 (21 123 4567) is stored with it. Maximum 20 characters."
          },
          "MobilePhoneCountryCode": {
            "type": "string",
            "description": "Mobile phone ISO 3166-1 alpha-2 region code (e.g. US). Maximum 100 characters."
          },
          "OfficePhone": {
            "type": "string",
            "description": "Office phone number, as dialled within its country, e.g. 021 123 4567 for NZ; an international +64 21 123 4567 is accepted too. A number sent without its leading 0 (21 123 4567) is stored with it. Maximum 20 characters."
          },
          "OfficePhoneCountryCode": {
            "type": "string",
            "description": "Office phone ISO 3166-1 alpha-2 region code (e.g. US). Maximum 25 characters."
          },
          "JobTitle": {
            "type": "string",
            "description": "Contact job title. Maximum 100 characters."
          },
          "Department": {
            "type": "string",
            "description": "Contact department. Maximum 150 characters."
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the contact (e.g. America/New_York). Maximum 50 characters."
          },
          "Description": {
            "type": "string",
            "description": "Free-text description / notes for the contact. Maximum 2000 characters."
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating an existing contact. `ContactId`, bound from the route,\r\nidentifies the contact. MobilePhone, MobilePhoneCountryCode, OfficePhone, OfficePhoneCountryCode,\r\nJobTitle, Department, TimeZone and Description are replaced as sent: a field left out is cleared.\r\nLocationId and SecondaryEmail left out keep their current values."
      },
      "UpdateCustomAssetCommand": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "Display name of the asset. Max 300 characters, cannot be blank. Null leaves it unchanged.",
            "nullable": true,
            "example": "Reception printer"
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the asset belongs to; must be an active client. A different client\r\nmoves the asset, and its location and contact must then belong to the new client. Null\r\nleaves it unchanged.",
            "format": "int64",
            "nullable": true,
            "example": 3521
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the asset sits at; must be an active location of the\r\nasset's client. Null leaves it unchanged.",
            "format": "int64",
            "nullable": true,
            "example": 4410
          },
          "HardwareTypeId": {
            "type": "integer",
            "description": "Identifier of the asset's hardware type, one of the service provider's active custom asset\r\ntypes. Null leaves it unchanged.",
            "format": "int64",
            "nullable": true,
            "example": 118
          },
          "Description": {
            "type": "string",
            "description": "Free-text description, max 1000 characters. Send null to clear it.",
            "nullable": true,
            "example": "HP LaserJet on the front desk"
          },
          "ContactId": {
            "type": "integer",
            "description": "Identifier of the contact the asset is assigned to; must be an active contact of the asset's\r\nclient. Send null to unassign it.",
            "format": "int64",
            "nullable": true,
            "example": 7962
          },
          "WarrantyEndDate": {
            "type": "string",
            "description": "Date the warranty ends, a calendar date in the form yyyy-MM-dd. A value with a time or a time zone is rejected. Send null to clear it.",
            "format": "date",
            "nullable": true,
            "example": "2027-03-31"
          },
          "LocalIPAddress": {
            "type": "string",
            "description": "IPv4 address of the asset, such as 192.168.1.20. Send null to clear it. The same name an agent asset publishes.",
            "nullable": true,
            "example": "192.168.1.20"
          },
          "IpAddress": {
            "type": "string",
            "description": "IPv4 address of the asset. Send null to clear it. <b>Deprecated:</b> use `LocalIPAddress`.\r\nStill accepted; sending both with different values is a 400.",
            "nullable": true,
            "example": "192.168.1.20",
            "deprecated": true
          },
          "SerialNumber": {
            "type": "string",
            "description": "Hardware serial number, max 250 characters. Send null to clear it.",
            "nullable": true,
            "example": "CNB1K23456"
          },
          "WarrantyStartDate": {
            "type": "string",
            "description": "Date the warranty starts, a calendar date in the form yyyy-MM-dd. A value with a time or a time zone is rejected. Send null to clear it.",
            "format": "date",
            "nullable": true,
            "example": "2024-03-31"
          },
          "Manufacturer": {
            "type": "string",
            "description": "Manufacturer, max 300 characters. Send null to clear it.",
            "nullable": true,
            "example": "Ubiquiti"
          },
          "Model": {
            "type": "string",
            "description": "Model, max 300 characters. Send null to clear it.",
            "nullable": true,
            "example": "UniFi Dream Machine Pro"
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating a custom asset. Every field is optional - send only what should\r\nchange. An omitted field keeps the value the asset already holds."
      },
      "UpdateCustomAssetResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the updated custom asset."
      },
      "UpdateCustomAssetResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UpdateCustomAssetResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UpdateDocumentCommand": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "description": "Title, max 200 characters. Cannot be blank.",
            "nullable": true
          },
          "Body": {
            "type": "string",
            "description": "The body, as HTML. A changed title or body is saved as a new version.",
            "nullable": true
          },
          "IsStarred": {
            "type": "boolean",
            "description": "Star or unstar. A star is shared by everyone in the account.",
            "nullable": true
          },
          "PublicLinkEnabled": {
            "type": "boolean",
            "description": "Turn the public link on or off.",
            "nullable": true
          },
          "PublishToPortalEnabled": {
            "type": "boolean",
            "description": "Publish to or withdraw from the client portal.",
            "nullable": true
          },
          "AlternateName": {
            "type": "string",
            "description": "The name shown in the client portal, max 200 characters. An empty string clears it.",
            "nullable": true
          },
          "StatusId": {
            "type": "integer",
            "description": "2 archives the document and every document below it, at any depth; 1 restores an archived\r\ndocument to the top level, and the documents below it stay archived.",
            "format": "int64",
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentAttachmentModel"
            },
            "description": "The whole attachment list, replacing the current one; an empty array removes every\r\nattachment. Each url must be one returned by `POST /v1/attachments`.",
            "nullable": true
          },
          "Move": {
            "$ref": "#/components/schemas/UpdateDocumentMove"
          }
        },
        "additionalProperties": false,
        "description": "Partial update of a document. Every field is optional; an omitted or null field is left as it\r\nis. Clearing, per field: `AlternateName` clears with an empty string; `Attachments`\r\nclears with an empty array; `Title` cannot be cleared."
      },
      "UpdateDocumentMove": {
        "type": "object",
        "properties": {
          "ParentDocumentId": {
            "type": "string",
            "description": "The new parent; null moves the document to the top level.",
            "format": "uuid",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "The client, when moving to the top level; null there means internal. Under a parent the\r\ndocument takes the parent's client, and a different value here is rejected.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Where to move a document."
      },
      "UpdateItemCommand": {
        "type": "object",
        "properties": {
          "TypeId": {
            "type": "integer",
            "description": "Rejected (400) if present at all - TypeId cannot be changed once an item is created.",
            "format": "int32",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "description": "Not clearable. Omit or send null to leave unchanged; a supplied blank is a 400.",
            "nullable": true
          },
          "Number": {
            "type": "string",
            "description": "Not clearable. Omit or send null to leave unchanged; a supplied blank is a 400.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Free text. Empty string clears it; null/omitted leaves it unchanged.",
            "nullable": true
          },
          "CategoryId": {
            "type": "integer",
            "description": "0 clears it; null/omitted leaves it unchanged.",
            "format": "int64",
            "nullable": true
          },
          "SubcategoryId": {
            "type": "integer",
            "description": "0 clears it; null/omitted leaves it unchanged. Must belong to the item's (new or existing) CategoryId when non-zero.",
            "format": "int64",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "0 clears it; null/omitted leaves it unchanged.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "0 clears it; null/omitted leaves it unchanged. Must belong to the item's (new or existing) ClientId when non-zero.",
            "format": "int64",
            "nullable": true
          },
          "Sku": {
            "type": "string",
            "description": "Product-only. Free text. Empty string clears it; null/omitted leaves it unchanged.",
            "nullable": true
          },
          "PartNumber": {
            "type": "string",
            "description": "Product-only. Free text. Empty string clears it; null/omitted leaves it unchanged.",
            "nullable": true
          },
          "Manufacturer": {
            "type": "string",
            "description": "Product-only. Free text. Empty string clears it; null/omitted leaves it unchanged.",
            "nullable": true
          },
          "Vendor": {
            "type": "string",
            "description": "Free text. Empty string clears it; null/omitted leaves it unchanged.",
            "nullable": true
          },
          "UnitCost": {
            "type": "number",
            "description": "Product-only. Rejected (400) if sent while the item is a bundle. Not clearable - omit or\r\nsend null to leave unchanged; a supplied negative value is a 400.",
            "format": "double",
            "nullable": true
          },
          "UnitPrice": {
            "type": "number",
            "description": "Not clearable. Omit or send null to leave unchanged. May be negative, for a discount or credit line.",
            "format": "double",
            "nullable": true
          },
          "TaxId": {
            "type": "integer",
            "description": "0 clears it; null/omitted leaves it unchanged.",
            "format": "int64",
            "nullable": true
          },
          "ExternalProductId": {
            "type": "string",
            "description": "Free text. Empty string clears it; null/omitted leaves it unchanged.",
            "nullable": true
          },
          "StatusId": {
            "type": "integer",
            "description": "Not clearable. 1 (Active) or 2 (Archived); omit or send null to leave unchanged.",
            "format": "int32",
            "nullable": true
          },
          "SubItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateItemSubItemModel"
            },
            "description": "Bundle-only. Rejected (400) if sent while the item is a product. An empty array clears the\r\nbundle down to no sub-items; null/omitted leaves the current sub-items unchanged; a\r\nnon-empty array fully replaces them (and recomputes UnitCost - the whole bundle's cost\r\ndepends on the whole list, so a partial patch of the list is not offered).",
            "nullable": true
          },
          "ShowSubItemsOnInvoice": {
            "type": "boolean",
            "description": "Bundle-only. Rejected (400) if sent while the item is a product.",
            "nullable": true
          },
          "ShowSubItemDescriptionsOnInvoice": {
            "type": "boolean",
            "description": "Bundle-only. Rejected (400) if sent while the item is a product.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Partial update of an item. Every field is optional and only the fields present in the body are\r\napplied. Per-field clearing conventions:\r\n<list type=\"bullet\"><item>Name, Number, UnitPrice, UnitCost, StatusId — not clearable: a supplied blank/invalid\r\nvalue is a 400, omit or send null to leave unchanged.</item><item>Description, Sku, PartNumber, Manufacturer, Vendor, ExternalProductId — free text: an\r\nempty string clears it, null/omitted leaves it unchanged.</item><item>CategoryId, SubcategoryId, ClientId, LocationId, TaxId — id fields: 0 clears it,\r\nnull/omitted leaves it unchanged.</item><item>SubItems — an empty array clears the bundle's sub-items, null/omitted leaves them\r\nunchanged, a non-empty array fully replaces them.</item></list>\r\nTypeId is not accepted at all - present in the body (any value, including null) is a 400."
      },
      "UpdateItemResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the updated item.",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "UpdateItemResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UpdateItemResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UpdateItemSubItemModel": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "string",
            "format": "uuid"
          },
          "Quantity": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "UpdateProjectCommand": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "description": "New project title.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "New description. Send an empty string to remove it.",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Move the project to a different client. **Clears the shared contacts**, because a contact\r\nbelongs to the client it came from - the app does the same.\r\nSend `LocationId` with it: a location belongs to a client.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "New client location.",
            "format": "int64",
            "nullable": true
          },
          "SharedWithContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Replaces the contacts the project is shared with. Empty array clears them.",
            "nullable": true
          },
          "TypeId": {
            "type": "string",
            "description": "New project type.",
            "format": "uuid",
            "nullable": true
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the tags. Empty array clears them.",
            "nullable": true
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "New lead assignee. Send 0 to remove the lead.",
            "format": "int64",
            "nullable": true
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Replaces the watchers. Empty array clears them.",
            "nullable": true
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Replaces the technician groups the project belongs to.",
            "nullable": true
          },
          "TargetDate": {
            "type": "string",
            "description": "New target date (UTC). To remove it, send `ClearTargetDate`.",
            "format": "date-time",
            "nullable": true
          },
          "ClearTargetDate": {
            "type": "boolean",
            "description": "Set true to remove the due date.",
            "nullable": true
          },
          "StatusId": {
            "type": "integer",
            "description": "New status: 1 Not started, 2 In progress, 3 On hold, 4 Completed, 5 Closed. Completed is\r\nnormally reached automatically once every task is Done; Closed is the manual end state\r\nand stamps `ClosedOn`. Moving a Closed project to any other status clears it.",
            "format": "int64",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Free-text reason recorded with the status. Only read when `StatusId` is sent.",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "The date the project was closed (UTC), for recording the real close date of a project\r\nmigrated from another system. The project must already be Closed, or be moved into that\r\nstatus by this same request. Must not be in the future or earlier than the project's\r\n`CreatedOn`. A supplied date also becomes the project's `UpdatedOn`. Omit it to\r\nleave the date untouched - closing a project normally stamps it with the time of the change.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedByName": {
            "type": "string",
            "description": "Display name to record as the actor. An API key is not a person, so when it is\r\nomitted or blank the actor is recorded as `API`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating a project. Every field is optional - send only what you want to\r\nchange. An omitted field leaves the stored value alone; sending nothing at all is a 400."
      },
      "UpdateProjectResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the updated project.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the updated project."
      },
      "UpdateProjectResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UpdateProjectResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UpdateSectionCommand": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "description": "New section title. Omit to leave unchanged.",
            "nullable": true
          },
          "Color": {
            "type": "string",
            "description": "New colour, as the app stores it. Omit to leave unchanged.",
            "nullable": true,
            "example": "#56A0F9"
          },
          "UpdatedByName": {
            "type": "string",
            "description": "Display name to record as the author of this change. Omitted or blank, it is recorded as `API`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating a section. Both fields are optional; send only what you want to\r\nchange.\r\n            \r\nNeither field is clearable: a section always has a title and a colour, so an omitted field\r\nleaves the stored value alone and a supplied blank is rejected."
      },
      "UpdateSectionResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the updated section.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the updated section."
      },
      "UpdateSectionResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UpdateSectionResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UpdateTaskCommand": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "description": "New task title.",
            "nullable": true
          },
          "SectionId": {
            "type": "string",
            "description": "Section to move the task to. Must be an active section of the same project.",
            "format": "uuid",
            "nullable": true
          },
          "StatusId": {
            "type": "integer",
            "description": "New status: 1 Not started, 2 Working on it, 3 On hold, 4 Done.",
            "format": "int64",
            "nullable": true
          },
          "StatusReason": {
            "type": "string",
            "description": "Free-text reason recorded with the status. Only read when `StatusId` is sent.",
            "nullable": true
          },
          "PriorityId": {
            "type": "integer",
            "description": "New priority: None=0, Urgent=1, High=2, Normal=3, Low=4 - the ticket scale.",
            "format": "int64",
            "nullable": true
          },
          "DueDate": {
            "type": "string",
            "description": "New due date (UTC). Send null to leave it alone; to clear it, send `ClearDueDate`.",
            "format": "date-time",
            "nullable": true
          },
          "ClearDueDate": {
            "type": "boolean",
            "description": "Set true to remove the due date. A task's due date is otherwise never cleared by omission.",
            "nullable": true
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "New lead assignee. Send 0 to remove the lead.",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Replaces the assisting assignees outright. Send an empty array to remove them all.",
            "nullable": true
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Replaces the watchers outright. Send an empty array to remove them all.",
            "nullable": true
          },
          "BlockedByTaskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the tasks that must finish before this one can.",
            "nullable": true
          },
          "BlockingTaskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the tasks this one is blocking.",
            "nullable": true
          },
          "AgentAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the linked agent-managed assets.",
            "nullable": true
          },
          "CustomAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the linked custom assets.",
            "nullable": true
          },
          "UptimeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replaces the linked uptime checks.",
            "nullable": true
          },
          "Banner": {
            "type": "string",
            "description": "New banner text. Send an empty string to remove it.",
            "nullable": true
          },
          "UpdatedByName": {
            "type": "string",
            "description": "Display name to record as the actor. An API key is not a person, so when it is\r\nomitted or blank the actor is recorded as `API`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating a task. Every field is optional - send only what you want to\r\nchange. An omitted field leaves the stored value alone; sending nothing at all is a 400\r\nrather than a no-op write."
      },
      "UpdateTaskResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the updated task.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the updated task."
      },
      "UpdateTaskResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UpdateTaskResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UpdateTicketCommand": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "description": "Ticket title. Maximum 250 characters.",
            "nullable": true
          },
          "UpdatedByName": {
            "type": "string",
            "description": "Display name recorded as the author of this update. Source is always stamped as Public API. Omitted or blank, it is recorded as `API`.",
            "nullable": true
          },
          "ClosedOn": {
            "type": "string",
            "description": "The date the ticket was closed, for correcting the close date of a ticket migrated from\r\nanother system. The ticket must already be in a closed status, or be moved into one by this\r\nsame request. Must not be in the future or earlier than the ticket's CreatedOn. Omit to leave\r\nan already-closed ticket's close date untouched. Sending null is the same as omitting it -\r\nthe close date is not clearable here, since a closed ticket always has one. A close that\r\ncarries ClosedOn is treated as history: it is recorded on the timeline but sends no\r\nstatus-changed email to the contact and triggers no automation rules.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Timestamp to record as the ticket's last activity instead of the current time, for a\r\ncaller replaying historical changes. Must not be in the future or earlier than the\r\nticket's CreatedOn. Applies to whichever fields this request changes; it is not an\r\nupdate on its own. Defaults to the ClosedOn supplied by the same request, otherwise to the\r\ncurrent time. A caller migrating a ticket sends CreatedOn on create, and ClosedOn and\r\nUpdatedOn together here, so the ticket keeps the dates it had in the other system. Sending\r\nnull is the same as omitting it.",
            "format": "date-time",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Client the ticket belongs to. Changing it clears the ticket's contact, assets, uptime checks and billing override.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Client location the ticket belongs to. Requires the ticket to have a client.",
            "format": "int64",
            "nullable": true
          },
          "ContactId": {
            "type": "integer",
            "description": "Primary contact on the ticket. A ticket with a client (the ClientId sent, otherwise the one\r\nthe ticket has) takes a contact of any client; a ticket with no client takes a temporary\r\ncontact (IsTemporaryContact true).",
            "format": "int64",
            "nullable": true
          },
          "CcContactIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Cc contacts on the ticket. At most 100. Same rule as ContactId: contacts of any client, or\r\ntemporary contacts when the ticket has no client. Replaces the list; [] clears\r\nit; omit to leave unchanged.",
            "nullable": true
          },
          "StatusId": {
            "type": "integer",
            "description": "Ticket status id.",
            "format": "int64",
            "nullable": true
          },
          "GroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Technician groups subscribed to the ticket. Replaces the list; [] clears it; omit to leave unchanged.",
            "nullable": true
          },
          "PriorityId": {
            "$ref": "#/components/schemas/TicketPriority"
          },
          "TypeId": {
            "type": "integer",
            "description": "Ticket type id.",
            "format": "int64",
            "nullable": true
          },
          "LeadAssigneeId": {
            "type": "integer",
            "description": "Lead assignee technician id. Send 0 to unassign; omit to leave unchanged.",
            "format": "int64",
            "nullable": true
          },
          "AssistingAssigneeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Assisting assignee technician ids. Replaces the list; [] clears it; omit to leave unchanged.",
            "nullable": true
          },
          "WatcherIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Watcher technician ids. Replaces the list; [] clears it; omit to leave unchanged.",
            "nullable": true
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Tag ids on the ticket. Replaces the list; [] clears it; omit to leave unchanged.",
            "nullable": true
          },
          "AgentAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Agent (managed device) asset ids to link. Replaces the current set; omit to leave unchanged.",
            "nullable": true
          },
          "CustomAssetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Custom asset ids to link. Replaces the current set; omit to leave unchanged.",
            "nullable": true
          },
          "UptimeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Uptime check ids to link. Replaces the current set; omit to leave unchanged.",
            "nullable": true
          },
          "BillingOverride": {
            "$ref": "#/components/schemas/TicketBillingOverride"
          }
        },
        "additionalProperties": false,
        "description": "Unified partial update for a ticket. Every field is optional; only the fields present in the\r\nrequest body are applied. Each change has the same effects (notifications, timeline entries)\r\nas making it in the app."
      },
      "UpdateTicketResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier of the updated ticket.",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateTicketResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UpdateTicketResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UpdateTimeEntryCommand": {
        "type": "object",
        "properties": {
          "StartedOn": {
            "type": "string",
            "description": "When the work started, as a single UTC instant.\r\n            \r\nThe three time fields are merged with the entry's current values before the same\r\nany-two-of-three rule the create applies. Send two of them and the third is derived from\r\nthose two alone; send all three and they must agree. Send StartedOn or EndedOn alone and the\r\nother instant is kept, so the duration changes with it. Send ActualHours alone and StartedOn\r\nis kept and EndedOn moves, so the duration is exactly what was sent. Sending null is the same\r\nas omitting it - neither instant is clearable, since an entry always has an interval.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-04-28T09:00:00.0000000+00:00"
          },
          "EndedOn": {
            "type": "string",
            "description": "When the work finished, as a single UTC instant. Must be later than the StartedOn in force\r\nafter the merge. See `StartedOn` for how the three time fields combine. Sending null is\r\nthe same as omitting it.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-04-28T10:30:00.0000000+00:00"
          },
          "ActualHours": {
            "type": "number",
            "description": "Duration worked, in decimal hours. Must be greater than 0. The work type's minimum and\r\nincrement rounding is applied on top of it, as on create. See `StartedOn` for how the\r\nthree time fields combine.",
            "format": "double",
            "nullable": true,
            "example": 1.5
          },
          "BillableStatusId": {
            "type": "integer",
            "description": "Billable status for this entry: 1 = Billable, 2 = No charge, 3 = Non-billable; any other\r\nvalue is rejected.",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "UserId": {
            "type": "integer",
            "description": "User whose time this is. Validated against the service provider. Changing it re-stamps the\r\nentry's cost rate from the new user's own rate, as the app does.",
            "format": "int64",
            "nullable": true,
            "example": 8842
          },
          "BillingRoleId": {
            "type": "integer",
            "description": "Billing role to charge at. Validated against the service provider's active roles. Get valid\r\nids from GET /v1/billing-roles.",
            "format": "int64",
            "nullable": true,
            "example": 1742
          },
          "WorkTypeId": {
            "type": "integer",
            "description": "Work type to apply. Determines the rate multiplier and the minimum/increment rounding applied\r\nto the logged duration. Validated against the service provider's active work types. Get\r\nvalid ids from GET /v1/work-types.",
            "format": "int64",
            "nullable": true,
            "example": 2432
          },
          "ServiceLineId": {
            "type": "integer",
            "description": "Service line to bill this time against.\r\n            \r\nOmit it and the entry keeps the service line it has. Send it as null to take the entry off\r\nits contract outright, which also suppresses the automatic contract assignment that would\r\notherwise happen when the time is approved. When supplied, the service line must belong to\r\nthe entry's client, and its contract must be active today and cover labour. Moving an entry\r\nbetween contracts returns the hours it consumed to the old one and draws them from the new.",
            "format": "int64",
            "nullable": true,
            "example": 4720
          },
          "Comment": {
            "type": "string",
            "description": "Free-text note describing the work. Send an empty string to clear it.",
            "nullable": true,
            "example": "Replaced faulty NIC"
          },
          "Distance": {
            "type": "number",
            "description": "Distance travelled for this work, when the service provider bills mileage.",
            "format": "double",
            "nullable": true,
            "example": 12.5
          }
        },
        "additionalProperties": false,
        "description": "Partial update of a time entry. Every field is optional and only the fields present in the body\r\nare applied; a field left out keeps its current value. The ticket an entry is logged against and\r\nits attachments cannot be changed here, so neither is a member: a body carrying either is\r\nrejected as malformed, the same way every other endpoint treats a field it does not know."
      },
      "UpdateUptimeCommand": {
        "type": "object",
        "properties": {
          "TypeId": {
            "type": "integer",
            "description": "What the check does: 1 ICMP, 2 HTTP, 3 TCP. Changing this requires sending a\r\n`Target` valid for the new type, because the two are stored together.",
            "format": "int32",
            "nullable": true
          },
          "Target": {
            "$ref": "#/components/schemas/UptimeTarget"
          },
          "AdoptClientAssets": {
            "type": "boolean",
            "description": "Move matching unassigned devices to the check's client. See the create request.",
            "nullable": true
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the check belongs to. Sending this without\r\n`LocationId` is rejected, because a location belongs to a client and moving\r\none without the other would file the check at the old client's site.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the check belongs to.",
            "format": "int64",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "What the check watches, free text. Max 250 characters.",
            "nullable": true
          },
          "Frequency": {
            "type": "integer",
            "description": "How often the check runs, in minutes.",
            "format": "int32",
            "nullable": true
          },
          "NumberOfRetriesAfterFailure": {
            "type": "integer",
            "description": "How many times a failure is rechecked before the check counts as down.",
            "format": "int32",
            "nullable": true
          },
          "RegionId": {
            "type": "integer",
            "description": "Which monitoring region runs the check. Changing it cancels the check's schedule in the\r\nold region and schedules it in the new one.",
            "format": "int32",
            "nullable": true
          },
          "IspConnectionLink": {
            "type": "string",
            "description": "Link to the ISP or provider status page for this endpoint.",
            "nullable": true
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Replaces the check's tags outright. An empty array clears them; omitting the field leaves\r\nthem alone.",
            "nullable": true
          },
          "MaintenanceMode": {
            "$ref": "#/components/schemas/UptimeMaintenanceMode"
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating an uptime check. Every field is optional - send only what should\r\nchange. An omitted field keeps the value the check already holds."
      },
      "UpdateUptimeResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "The identifier of the updated uptime check."
      },
      "UpdateUptimeResultBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UpdateUptimeResult"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UptimeMaintenanceMode": {
        "type": "object",
        "properties": {
          "Enabled": {
            "type": "boolean",
            "description": "Whether the check is currently in maintenance mode. When false, the remaining fields\r\nare null."
          },
          "StartDateTime": {
            "type": "string",
            "description": "When the maintenance window starts (UTC). Null when Enabled is false. On update,\r\nrequired when Enabled is true; omit it when Enabled is false.",
            "format": "date-time",
            "nullable": true
          },
          "DurationInMinutes": {
            "type": "integer",
            "description": "How long the window lasts, in minutes. Zero means the window does not expire on its own.\r\nNull when Enabled is false. On update, required when Enabled is true; omit it when Enabled is false.",
            "format": "int32",
            "nullable": true
          },
          "Reason": {
            "type": "string",
            "description": "Why the check was put into maintenance. Max 500 characters. Null when Enabled is\r\nfalse. On update, required when Enabled is true; omit it when Enabled is false.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A check's maintenance window - the period its failures are suppressed for.\r\n\n\r\nField names match the ones the update request takes.\r\n"
      },
      "UptimeResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Uptime check identifier.",
            "format": "uuid"
          },
          "Description": {
            "type": "string",
            "description": "Free-text description of what the check watches. Max 250 characters.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Target": {
            "$ref": "#/components/schemas/UptimeTarget"
          },
          "AdoptClientAssets": {
            "type": "boolean",
            "description": "Whether unassigned devices whose public IP matches this check's address are moved to the\r\ncheck's client. Not part of `Target`. Only acted on for ICMP checks that\r\ncarry both a client and a location."
          },
          "ClientId": {
            "type": "integer",
            "description": "Identifier of the client the check belongs to.",
            "format": "int64",
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "description": "Identifier of the client location the check belongs to.",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "Frequency": {
            "type": "integer",
            "description": "How often the check runs, in minutes.",
            "format": "int32"
          },
          "NumberOfRetriesAfterFailure": {
            "type": "integer",
            "description": "How many times a failure is rechecked before the check is treated as down.",
            "format": "int32"
          },
          "RegionId": {
            "type": "integer",
            "description": "Which monitoring region runs the check: 1 Seattle, 2 Sydney, 3 UK, 4 Frankfurt.",
            "format": "int32"
          },
          "IspConnectionLink": {
            "type": "string",
            "description": "Link to the ISP or provider status page for this endpoint. Max 500 characters.",
            "nullable": true
          },
          "TagIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Identifiers of the tags applied to the check."
          },
          "MaintenanceMode": {
            "$ref": "#/components/schemas/UptimeMaintenanceMode"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An uptime check. Timestamps are UTC."
      },
      "UptimeResponseBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "$ref": "#/components/schemas/UptimeResponse"
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UptimeResponseListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UptimeResponse"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "UptimeTarget": {
        "type": "object",
        "properties": {
          "Ip": {
            "type": "string",
            "description": "Host to ping, for ICMP and TCP checks. ICMP accepts a hostname as well as an address;\r\nTCP requires a parseable address.",
            "nullable": true,
            "example": "8.8.8.8"
          },
          "Port": {
            "type": "integer",
            "description": "Port to connect to, for TCP checks.",
            "format": "int32",
            "nullable": true,
            "example": 443
          },
          "Url": {
            "type": "string",
            "description": "Address to request, for HTTP checks.",
            "nullable": true,
            "example": "https://www.google.com"
          }
        },
        "additionalProperties": false,
        "description": "What an uptime check points at. Which fields are populated depends on the check type:\r\nICMP uses `Ip`, TCP uses `Ip` and `Port`, HTTP uses\r\n`Url`. The others are null."
      },
      "UserModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "User identifier.",
            "format": "int64"
          },
          "FirstName": {
            "type": "string",
            "description": "User first name."
          },
          "LastName": {
            "type": "string",
            "description": "User last name."
          },
          "Status": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation timestamp (UTC).",
            "format": "date-time"
          },
          "UpdatedOn": {
            "type": "string",
            "description": "Last-updated timestamp (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "description": "User email address."
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the user."
          }
        },
        "additionalProperties": false,
        "description": "A user (technician) in the service provider organization. Timestamps are UTC."
      },
      "UserModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserModel"
            },
            "nullable": true
          },
          "DataContext": {
            "$ref": "#/components/schemas/PaginationDataContext"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "WorkTypeModel": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Identifier of the work type. Send this as WorkTypeId when logging time.",
            "format": "int64",
            "example": 5
          },
          "Name": {
            "type": "string",
            "description": "Display name of the work type.",
            "example": "After Hours"
          },
          "HourlyMultiplier": {
            "type": "number",
            "description": "Multiplier applied to the billing role's hourly rate for this work type.",
            "format": "double",
            "example": 1.5
          },
          "IsDefaultOutsideBusinessHours": {
            "type": "boolean",
            "description": "Whether this is the work type applied by default to off-hours time."
          },
          "BillableStatus": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "CoaCode": {
            "type": "string",
            "description": "Chart-of-accounts code this work type posts to, when one is configured.",
            "nullable": true,
            "example": "4010"
          },
          "Tax": {
            "$ref": "#/components/schemas/CodeModel"
          },
          "MinimumTimeInMinutes": {
            "type": "integer",
            "description": "Shortest billable duration, in minutes. An entry shorter than this is rounded up to it.",
            "format": "int32",
            "example": 15
          },
          "IncrementTimeInMinutes": {
            "type": "integer",
            "description": "Billing increment, in minutes. An entry longer than the minimum is rounded up to the next\r\nwhole increment. Zero means no rounding is applied.",
            "format": "int32",
            "example": 15
          }
        },
        "additionalProperties": false,
        "description": "A work type configured for the service provider."
      },
      "WorkTypeModelListBaseResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "$ref": "#/components/schemas/HttpStatusCode"
          },
          "IsSuccess": {
            "type": "boolean"
          },
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkTypeModel"
            },
            "nullable": true
          },
          "DataContext": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "example": null
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "description": "API Key required for authentication",
        "name": "X-API-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": [ ]
    }
  ],
  "tags": [
    {
      "name": "Attachments",
      "description": "Uploading a file, for anything that can carry one. One endpoint rather than one per record\r\ntype, because the upload itself is identical - only the record it is checked against differs."
    },
    {
      "name": "Alerts",
      "description": "Alerts management operations"
    },
    {
      "name": "Assets",
      "description": "Assets management operations"
    },
    {
      "name": "Billing",
      "description": "Billing management operations"
    },
    {
      "name": "Tickets",
      "description": "Tickets management operations"
    },
    {
      "name": "Clients",
      "description": "Clients management operations"
    },
    {
      "name": "Contacts",
      "description": "Contacts management operations"
    },
    {
      "name": "Deletions",
      "description": "Deletions management operations"
    },
    {
      "name": "Documents",
      "description": "Documents management operations"
    },
    {
      "name": "Forms",
      "description": "Forms management operations"
    },
    {
      "name": "Organization",
      "description": "Organization management operations"
    },
    {
      "name": "Projects",
      "description": "Projects management operations"
    }
  ]
}