{
    "openapi": "3.0.0",
    "info": {
      "description": "Welcome to the maintainsoft API documentation!\u003Cbr/\u003E\u003Cbr/\u003EYou can use the maintainsoft API to programmatically interact with all the entities in maintainsoft. Use it to retrieve and manage data of Work Orders, Work Requests, Assets, and more!\u003Cbr/\u003E\u003Cbr/\u003ETo get started, in your maintainsoft account go to \u003Ca href=\"https://app.getmaintainsoft.com/settings/integrations\"\u003E\"Settings &gt; Integrations\"\u003C/a\u003E and click \"&plus; New Key\" button to generate a new Rest API key.\u003Cbr/\u003E\u003Cbr/\u003E\u003Cb\u003EMissing something?\u003C/b\u003E\u003Cbr/\u003EDon't hesitate to reach out \u003Ca href=\"mailto:info@getmaintainsoft.com\"\u003Einfo@getmaintainsoft.com\u003C/a\u003E\u003Cbr/\u003E\u003Cbr/\u003E",
      "version": "1",
      "title": "maintainsoft API",
      "contact": {
        "url": "https://www.getmaintainsoft.com/",
        "name": "Support",
        "email": "info@getmaintainsoft.com"
      },
      "x-logo": {
        "url": "https://maintainsoft-static.s3-us-west-2.amazonaws.com/img/default-org-logo.png",
        "backgroundColor": "#FFFFFF",
        "altText": "maintainsoft logo"
      }
    },
    "servers": [
      {
        "url": "https://api.getmaintainsoft.com/v1",
        "description": "Endpoint"
      }
    ],
    "tags": [
      {
        "name": "Getting Started",
        "description": "\n\u003Ch1\u003EUsing Postman to test your requests\u003C/h1\u003E\n\u003Col style=\"padding-left: 16px\"\u003E\n  \u003Cli\u003EDownload the \u003Ca href=\"https://www.postman.com/\" target=\"_blank\"\u003EPostman\u003C/a\u003E application from the web. (You can also use \u003Ca href=\"https://insomnia.rest/\" target=\"_blank\"\u003EInsomnia\u003C/a\u003E if wanted)\u003C/li\u003E\n  \u003Cli\u003EOpen the Postman application and click the \u003Cb\u003EEnvironment\u003C/b\u003E tab on the left side of the application.\u003C/li\u003E\n  \u003Cli\u003ESelect the \u003Cb\u003EGlobals\u003C/b\u003E option in the newly shown panel located to the right of the \u003Cb\u003EEnvironment\u003C/b\u003E tab. \u003C/li\u003E\n  \u003Cli\u003ENow, we will add two variables, these two variables will be globals throughout Postman and help you do the operations that you need to do with the API. You can refer to the table at the end of this section or just follow the steps below.\u003C/li\u003E\n  \u003Col style=\"padding-left: 16px\"\u003E\n    \u003Cli\u003EAdd a new variable and name it \u003Cb\u003EbaseUrl\u003C/b\u003E, which will be used to link your Postman to the maintainsoft's API. Copy-paste the URL, \u003Ca\u003Ehttps://api.getmaintainsoft.com/v1\u003C/a\u003E, into the \u003Cb\u003EInitial Value\u003C/b\u003E column.\u003C/li\u003E\n    \u003Cli\u003EAdd another variable named \u003Cb\u003EbearerToken\u003C/b\u003E, you will need this one in a following step. This variable is used to authenticate you to be allowed to send requests to our API via what we call a Bearer Token. To retrieve a key, go to \u003Ca href=\"https://app.getmaintainsoft.com/settings/integrations\" target=\"_blank\"\u003ESettings \u003E API Keys\u003C/a\u003E, generate a key and paste it into the \u003Cb\u003EInitial Value\u003C/b\u003E column.\u003C/li\u003E\n    \u003Cli\u003EBe sure that you click on the \u003Cb\u003ESave\u003C/b\u003E button at the top right corner of the \u003Cb\u003EGlobals\u003C/b\u003E panel.\u003C/li\u003E\n    \u003Ctable\u003E\n      \u003Ctr\u003E\n        \u003Cth\u003EVARIABLE\u003C/th\u003E\n        \u003Cth\u003EINITIAL VALUE\u003C/th\u003E\n        \u003Cth\u003ECURRENT VALUE\u003C/th\u003E\n      \u003C/tr\u003E\n      \u003Ctr\u003E\n        \u003Ctd\u003EbaseUrl\u003C/td\u003E\n        \u003Ctd\u003Ehttps://api.getmaintainsoft.com/v1\u003C/td\u003E\n        \u003Ctd\u003Ehttps://api.getmaintainsoft.com/v1\u003C/td\u003E\n      \u003C/tr\u003E\n      \u003Ctr\u003E\n        \u003Ctd\u003EbearerToken\u003C/td\u003E\n        \u003Ctd\u003E{GENERATED_KEY}\u003C/td\u003E\n        \u003Ctd\u003E{GENERATED_KEY}\u003C/td\u003E\n      \u003C/tr\u003E\n    \u003C/table\u003E\n  \u003C/ol\u003E\n  \u003Cli\u003ENow press the \u003Cb\u003EImport\u003C/b\u003E button which is located above the panel where you just added the global variables.\u003C/li\u003E\n  \u003Col style=\"padding-left: 16px\"\u003E\n    \u003Cli\u003EIn the newly shown window, click the \u003Cb\u003ELink\u003C/b\u003E tab and copy the URL (or all of its content), \u003Ca href=\"https://api.getmaintainsoft.com/v1/openapi.json\" target=\"_blank\"\u003Ehttps://api.getmaintainsoft.com/v1/openapi.json\u003C/a\u003E, into the \u003Cb\u003EEnter a URL\u003C/b\u003E field and then click Continue and follow the steps to proceed to the importation.\u003C/li\u003E\n    \u003Cli\u003ENow, a new collection named \u003Cb\u003Emaintainsoft API\u003C/b\u003E should be imported giving you access to all our API endpoints.\u003C/li\u003E\n  \u003C/ol\u003E\n  \u003Cli\u003EBefore testing any endpoint, please make sure the API key is defined in the \u003Cb\u003EBearer Token\u003C/b\u003E area. \u003Cb\u003EBearer Token\u003C/b\u003E allows requests to authenticate using an access key.\u003C/li\u003E\n  \u003Col style=\"padding-left: 16px\"\u003E\n    \u003Cli\u003ESelect the root of the \u003Cb\u003Emaintainsoft API\u003C/b\u003E collection and then click the \u003Cb\u003EAuthorization\u003C/b\u003E tab and select \u003Cb\u003EBearer Token\u003C/b\u003E in the dropdown list named \u003Cb\u003EType\u003C/b\u003E.\u003C/li\u003E\n    \u003Cli\u003EIn the \u003Cb\u003EToken\u003C/b\u003E field, write the name of the second global variable (\u003Cb\u003EbearerToken\u003C/b\u003E) you have created in a previous step and surround it with two curly braces like this: \u003Ccode\u003E\u003Cb\u003E{{bearerToken}}\u003C/b\u003E\u003C/code\u003E.\u003C/li\u003E\n  \u003C/ol\u003E\n\u003C/ol\u003E\n\u003Ch1\u003EHere's how to test your Postman configuration\u003C/h1\u003E\n\u003Cp\u003EYou should now be all set up but, just to be sure, we'll do one simple request to the API to verify if all the previous steps were done properly. If anything went wrong, just contact our support team and they will help you with the steps.\u003C/p\u003E\n\u003Col style=\"padding-left: 16px\"\u003E\n  \u003Cli\u003EExpand the \u003Cb\u003Emaintainsoft API\u003C/b\u003E collection.\u003C/li\u003E\n  \u003Cli\u003EExpand the \u003Cb\u003Elocations\u003C/b\u003E node.\u003C/li\u003E\n  \u003Cli\u003EClick on the one named \u003Cb\u003EList locations\u003C/b\u003E and in the GET section, just remove all the parameters to have the following: \u003Ccode\u003E{{baseUrl}}/locations\u003C/code\u003E and click the \u003Cb\u003ESend\u003C/b\u003E button.\u003C/li\u003E\n  \u003Cli\u003EIn the \u003Cb\u003EResponse\u003C/b\u003E part of the screen, normally at the bottom, you should have a JSON response containing your organization's locations.\u003C/li\u003E\n\u003C/ol\u003E\n    ",
        "x-traitTag": true
      },
      {
        "name": "Authentication",
        "description": "\n\u003Cp\u003EIn order to be able to send requests to our API to fetch and modify data, you will need to authenticate every request you make on it.\u003C/p\u003E\n\u003Ch2\u003EBearer\u003C/h2\u003E\n\n\u003Cp\u003EAuthenticate by adding the following HTTP header to your requests:\u003C/p\u003E\n\u003Cpre\u003EAuthorization: bearer {{token}}\u003C/pre\u003E\n\u003Cp\u003EThe \u003Ccode\u003Etoken\u003C/code\u003E can be generated in your maintainsoft account. Go to \u003Ca href=\"https://app.getmaintainsoft.com/settings/integrations\"\u003E\"Settings &gt; Integrations &gt; API Keys\"\u003C/a\u003E to generate a key for your user.\u003C/p\u003E\n\n\u003Ctable\u003E\n  \u003Ctr\u003E\n    \u003Cth\u003ESecurity Scheme Type\u003C/th\u003E\n    \u003Cth\u003EHTTP Authorization Scheme\u003C/th\u003E\n    \u003Cth\u003EBearer Format\u003C/th\u003E\n  \u003C/tr\u003E\n  \u003Ctr\u003E\n    \u003Ctd\u003EHTTP\u003C/td\u003E\n    \u003Ctd\u003EBearer\u003C/td\u003E\n    \u003Ctd\u003EJWT\u003C/td\u003E\n  \u003C/tr\u003E\n\u003C/table\u003E\n\n\u003Ch2\u003EMulti-Organization Token\u003C/h2\u003E\n\u003Cp\u003EWhen using a token that can be used on multiple organizations, you will need to pass a header to indicate the organization you are referring to in all your calls:\u003C/p\u003E\n\u003Cpre\u003Ex-organization-id: {{organizationId}}\u003C/pre\u003E\n\u003Cp\u003EThe header is required for multi-organization tokens. A 400 code will be returned if you're using a token for multiple organizations but didn't pass the required header.\u003C/p\u003E\n",
        "x-traitTag": true
      },
      {
        "name": "Rate Limiting",
        "description": "\n\u003Cp\u003Emaintainsoft's API has some rate limits to protect its infrastructure and to allow everybody to use the API fairly in respect to other users. When it comes to rate limiting with maintainsoft you can check the data returned by the three rate limiting headers included in each response from our API. We highly recommend doing this because it keeps you compatible and ensures you will automatically benefit from any limit increase we can give you.\u003C/p\u003E\n\n\u003Cp\u003EHere are the details on those headers and how to use them:\u003C/p\u003E\n\u003Cul style=\"padding-left: 16px\"\u003E\n        \u003Cli\u003EThe \u003Ccode\u003EX-Rate-Limit-Limit\u003C/code\u003E header shows your cap allowed for the current timeframe (this usually doesn't change unless we increase your cap).\u003C/li\u003E\n        \u003Cli\u003EThe \u003Ccode\u003EX-Rate-Limit-Remaining\u003C/code\u003E header shows the number of remaining requests you have within the current timeframe. When it reaches 0, every requests from that point forward will receive a rate limiting error 429. For example, if the last request you made returned you 1 in that field, you can still make another one before receiving errors.\u003C/li\u003E\n        \u003Cli\u003EThe \u003Ccode\u003EX-Rate-Limit-Reset\u003C/code\u003E header shows the amount of time left in seconds before starting a new timeframe and resetting your remaining requests to the cap limit (when the \u003Ccode\u003EReset\u003C/code\u003E reaches 0, \u003Ccode\u003ERemaining\u003C/code\u003E will go back to the amount defined by your cap).\u003C/li\u003E\n    \u003C/ul\u003E\n\n\u003Cp\u003ETo optimize your HTTP client, use \u003Ccode\u003EX-Rate-Limit-Remaining\u003C/code\u003E to automatically wait before sending a new request to our API when the header value reaches 0. Then, use the \u003Ccode\u003EX-Rate-Limit-Reset\u003C/code\u003E header value to schedule when you'll start sending requests again. Following this solution should allow you to always benefit from the maximum allowed number of requests for your organization or user.\u003C/p\u003E\n\n\u003Cb\u003EHowever, make sure to still handle the scenario of receiving a \u003Ccode\u003E429 Too Many Requests\u003C/code\u003E HTTP status code in your code.\u003C/b\u003E This could still happen if you run into a concurrency edge case. In those scenarios, make your client wait for the \u003Ccode\u003EX-Rate-Limit-Remaining\u003C/code\u003E period in seconds, and add a small time buffer as a security measure.\n\n\n\u003Ch3\u003EDefault Rate Limits\u003C/h3\u003E\n\u003Cli\u003EFor a user across all his organizations: 100 requests / 60 seconds\u003C/li\u003E\n\u003Cli\u003EFor a user on a single organization: 100 requests / 60 seconds\u003C/li\u003E\n\u003Cli\u003EFor all users within one organization: 500 requests / 60 seconds\u003C/li\u003E\n",
        "x-traitTag": true
      },
      {
        "name": "Assets",
        "description": "Operations on Assets",
        "x-traitTag": false
      },
      {
        "name": "Asset Criticalities",
        "description": "Operations on Asset Criticalities",
        "x-traitTag": false
      },
      {
        "name": "Asset Statuses",
        "description": "Operations on Asset Statuses",
        "x-traitTag": false
      },
      {
        "name": "Asset Custom Statuses",
        "description": "Operations on Asset Custom Statuses",
        "x-traitTag": false
      },
      {
        "name": "Categories",
        "description": "Operations on Categories",
        "x-traitTag": false
      },
      {
        "name": "Conversations",
        "description": "Operations on Conversations",
        "x-traitTag": false
      },
      {
        "name": "Custom Fields",
        "description": "Operations on Custom Fields",
        "x-traitTag": false
      },
      {
        "name": "Locations",
        "description": "Operations on Locations",
        "x-traitTag": false
      },
      {
        "name": "Meters",
        "description": "Operations on Meters",
        "x-traitTag": false
      },
      {
        "name": "Meter Readings",
        "description": "Operations on Meter Readings",
        "x-traitTag": false
      },
      {
        "name": "Meter Triggers",
        "description": "Operations on Meter Triggers",
        "x-traitTag": false
      },
      {
        "name": "Parts",
        "description": "Operations on Parts",
        "x-traitTag": false
      },
      {
        "name": "Part Transfer Requests",
        "description": "Operations on Part Transfer Requests",
        "x-traitTag": false
      },
      {
        "name": "Procedure Templates",
        "description": "Operations on Procedure Templates",
        "x-traitTag": false
      },
      {
        "name": "Procedure Template Rows",
        "description": "Operations on Procedure Template Rows",
        "x-traitTag": false
      },
      {
        "name": "Purchase Orders",
        "description": "Operations on Purchase Orders",
        "x-traitTag": false
      },
      {
        "name": "Subscriptions & Webhooks",
        "description": "\n\u003Cb\u003EPlease note that webhooks that do not work may be deleted after a certain number of unsuccessful attempts.\u003C/b\u003E An email will be sent upon deletion of the subscriptions to the email linked to the requesting user account.\n\u003Ch1\u003EVerifying the event that maintainsoft sends to your webhook endpoints\u003C/h1\u003E\n\u003Cp\u003EAll webhooks HTTP requests sent by maintainsoft have 2 headers containing a timestamp and an HMAC signature to be validated by the client.\u003C/p\u003E\n\u003Col style=\"padding-left: 16px\"\u003E\n  \u003Cul\u003E\u003Ccode\u003Ex-maintainsoft-webhook-body-signature\u003C/code\u003E\u003C/ul\u003E\n  \u003Cul\u003E\u003Ccode\u003Ex-maintainsoft-webhook-uri-signature\u003C/code\u003E\u003C/ul\u003E\n  \u003C/o\u003E\n\u003Cp\u003EThe timestamp is prefixed by \u003Ccode\u003Et=\u003C/code\u003E, and each signature is prefixed by a scheme version. Scheme versions start with \u003Ccode\u003Ev\u003C/code\u003E, followed by an integer. Currently, the only valid live signature version is \u003Ccode\u003Ev1\u003C/code\u003E.\u003C/p\u003E\n\u003Cpre\u003Ex-maintainsoft-webhook-body-signature: t=\u003Cb\u003E&lt;timestamp&gt;\u003C/b\u003E,v1=\u003Cb\u003E&lt;signature&gt;\u003C/b\u003E\u003C/pre\u003E\n\u003Cp\u003Emaintainsoft generates signatures using a hash-based message authentication code (HMAC) with SHA-256. \u003C/p\u003E\n\u003Cp\u003ETo ensure proper security and to avoid potential replay attacks when consuming a triggered webhook HTTP call from maintainsoft, the consuming client should validate that the signature is valid using the secret provided on the webhook creation. Here are the steps that should be taken by the client to avoid potentially detrimental scenarios:\u003C/p\u003E\n\u003Col style=\"padding-left: 16px\"\u003E\n  \u003Cli\u003E\u003Cb\u003EExtract the timestamp and signatures from the header\u003C/b\u003E\u003C/li\u003E\n    \u003Col style=\"padding-left: 16px\"\u003E\n        \u003Cli\u003ESplit the header, using the \u003Ccode\u003E,\u003C/code\u003E character as the separator, to get a list of elements\u003C/li\u003E\n        \u003Cli\u003EThen split each element, using the \u003Ccode\u003E=\u003C/code\u003E character as the separator, to get a prefix and value pair.\u003C/li\u003E\n        \u003Cli\u003EThe value for the prefix \u003Ccode\u003Et\u003C/code\u003E corresponds to the timestamp, and \u003Ccode\u003Ev1\u003C/code\u003E corresponds to the signature. You can discard all other elements.\u003C/li\u003E\n    \u003C/ol\u003E\n    \u003Cli\u003E\u003Cb\u003EPrepare the \u003Ccode\u003Esigned_payload\u003C/code\u003E string\u003C/b\u003E\u003C/li\u003E\n    The \u003Ccode\u003Esigned_payload\u003C/code\u003E string is created by concatenating:\n    \u003Col style=\"padding-left: 16px\"\u003E\n        \u003Cli\u003EThe timestamp (as a string)\u003C/li\u003E\n        \u003Cli\u003EThe character \u003Ccode\u003E.\u003C/code\u003E\u003C/li\u003E\n        \u003Cli\u003EThe actual JSON payload (that is, the request body, or the full URI)\u003C/li\u003E\n    \u003C/ol\u003E\n    \u003Cpre\u003E\u003Cb\u003E&lt;timestamp&gt;\u003C/b\u003E.\u003Cb\u003E&lt;stringified payload&gt;\u003C/b\u003E\u003C/pre\u003E\n    \u003Cli\u003E\u003Cb\u003EDetermine the expected signature\u003C/b\u003E\u003C/li\u003E\n    \u003Col style=\"padding-left: 16px\"\u003E\n        \u003Cli\u003ERetrieve the secret for your endpoint by visiting the page \u003Ccode\u003Ehttps://app.getmaintainsoft.com/settings/integrations\u003C/code\u003E and clicking \u003Cb\u003ECopy secret\u003C/b\u003E for the desired endpoint.\u003C/li\u003E\n        \u003Cli\u003ECompute an HMAC with the SHA256 hash function. Use the endpoint’s signing secret as the key, and use the \u003Ccode\u003Esigned_payload\u003C/code\u003E string as the message.\u003C/li\u003E\n    \u003C/ol\u003E\n    \u003Cp\u003ENote that the secret is also provided upon webhook creation and that it could already be stored on the client side to avoid this step.\u003C/p\u003E\n    \u003Cpre\u003Ecrypto.createHmac(\"sha256\", secret).update('\u003Cb\u003E&lt;timestamp&gt;\u003C/b\u003E.\u003Cb\u003E&lt;stringified payload&gt;\u003C/b\u003E', \"utf8\").digest(\"hex\")\u003C/pre\u003E\n    \u003Cli\u003E\u003Cb\u003ECompare the signatures\u003C/b\u003E\u003C/li\u003E\n    \u003Col style=\"padding-left: 16px\"\u003E\n        \u003Cli\u003ECompare the signature in the header to the expected signature. For an equality match, compute the difference between the current timestamp and the received timestamp, then decide if the difference is within your tolerance.\u003C/li\u003E\n    \u003C/ol\u003E\n\u003C/ol\u003E\n\u003Cbr/\u003E\n",
        "x-traitTag": false
      },
      {
        "name": "Teams",
        "description": "Operations on Teams",
        "x-traitTag": false
      },
      {
        "name": "Users",
        "description": "Operations on Users",
        "x-traitTag": false
      },
      {
        "name": "Vendors",
        "description": "Operations on Vendors",
        "x-traitTag": false
      },
      {
        "name": "Work Orders",
        "description": "Operations on Work Orders",
        "x-traitTag": false
      },
      {
        "name": "Work Requests",
        "description": "Operations on Work Requests",
        "x-traitTag": false
      },
      {
        "name": "Work Request Portals",
        "description": "Operations on Work Request Portals",
        "x-traitTag": false
      },
      {
        "name": "OpenAPI Documentation",
        "description": "OpenAPI Specification Documentation",
        "x-traitTag": false
      }
    ],
    "paths": {
      "/assets": {
        "post": {
          "summary": "Create new asset",
          "requestBody": {
            "description": "Asset to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Forklift"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "example": "Forklift that is used to to move heavy equipments around the warehouse"
                    },
                    "barcode": {
                      "type": "string",
                      "nullable": true,
                      "example": "BWFPBNRHAW54CG",
                      "description": "String encoded barcode"
                    },
                    "criticalityId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 150,
                      "description": "ID of the criticality of the asset"
                    },
                    "parentId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the parent asset"
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the location where the asset is located"
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of teams responsible for the asset",
                      "example": [123, 456]
                    },
                    "assetTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "manual",
                        "tool"
                      ],
                      "description": "List of asset types"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Serial Number\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Serial Number": "000000000"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "description": "Vendor IDs",
                      "items": {
                        "type": "number",
                        "example": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created asset",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the asset"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Assets"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List assets",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Assets returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "locationId",
              "schema": {
                "type": "integer",
                "description": "Will only show assets that are related to the location"
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=barcode&expand=team_ids`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "barcode",
                    "team_ids",
                    "asset_types",
                    "extra_fields",
                    "vendor_ids"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Assets list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assets"
                    ],
                    "properties": {
                      "assets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "description",
                            "parentId",
                            "criticalityId",
                            "locationId",
                            "createdAt",
                            "updatedAt",
                            "creatorId"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the asset"
                            },
                            "name": {
                              "type": "string",
                              "example": "Forklift"
                            },
                            "description": {
                              "type": "string",
                              "nullable": true,
                              "example": "Forklift that is used to to move heavy equipments around the warehouse"
                            },
                            "parentId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 852,
                              "description": "ID of the parent asset"
                            },
                            "criticalityId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 150,
                              "description": "ID of the criticality of the asset"
                            },
                            "locationId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 852,
                              "description": "ID of the location where the asset is located"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset was created",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset was last updated. This doesn't include comments",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "creatorId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 851,
                              "description": "ID of the asset creator"
                            },
                            "barcode": {
                              "type": "string",
                              "nullable": false,
                              "example": "BWFPBNRHAW54CG",
                              "description": "String encoded barcode (expand with query parameter)"
                            },
                            "teamIds": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "description": "List of teams responsible for the asset (expand with query parameter)",
                              "example": [123, 456],
                              "nullable": false
                            },
                            "assetTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "example": [
                                "manual",
                                "tool"
                              ],
                              "description": "List of asset types (expand with query parameter)",
                              "nullable": false
                            },
                            "extraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Serial Number\") (expand with query parameter)",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Serial Number": "000000000"
                              },
                              "nullable": false
                            },
                            "vendorIds": {
                              "type": "array",
                              "description": "Vendor IDs (expand with query parameter)",
                              "items": {
                                "type": "number",
                                "example": 1
                              },
                              "nullable": false
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Assets.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Assets.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Assets"
          ]
        }
      },
      "/assets/{assetId}/status": {
        "post": {
          "summary": "Create a new asset status",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "assetId",
              "in": "path",
              "required": true,
              "description": "ID of the asset",
              "example": "5678"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Asset Status to set",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "OFFLINE",
                      "description": "Asset status value.",
                      "enum": [
                        "IGNORE",
                        "OFFLINE",
                        "ONLINE"
                      ]
                    },
                    "customStatusId": {
                      "type": "number",
                      "description": "Id of the custom status assigned to asset.",
                      "nullable": true,
                      "example": 53
                    },
                    "downtimeType": {
                      "type": "string",
                      "nullable": true,
                      "example": "PLANNED",
                      "enum": [
                        "PLANNED",
                        "UNPLANNED"
                      ]
                    },
                    "startedAt": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-01-01T12:34:56.123Z",
                      "description": "Asset status effective start date."
                    },
                    "endedAt": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-01-01T12:34:56.123Z",
                      "description": "Asset status effective end date.",
                      "nullable": true
                    },
                    "description": {
                      "type": "string",
                      "example": "Overheated - needs servicing.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully set a new asset status",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assetStatus"
                    ],
                    "properties": {
                      "assetStatus": {
                        "type": "object",
                        "required": [
                          "id",
                          "status",
                          "startedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 42,
                            "description": "Global ID of the asset status."
                          },
                          "downtimeType": {
                            "type": "string",
                            "nullable": true,
                            "example": "PLANNED",
                            "enum": [
                              "PLANNED",
                              "UNPLANNED"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "example": "OFFLINE",
                            "description": "Asset status value.",
                            "enum": [
                              "IGNORE",
                              "OFFLINE",
                              "ONLINE"
                            ]
                          },
                          "startedAt": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z",
                            "description": "Asset status effective start date."
                          },
                          "customStatusId": {
                            "type": "number",
                            "description": "Id of the custom status assigned to asset.",
                            "nullable": true,
                            "example": 53
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z",
                            "readOnly": true,
                            "description": "Date & time at which the asset status was last updated."
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified asset.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "asset Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Assets"
          ]
        }
      },
      "/assets/{id}": {
        "get": {
          "summary": "Get asset",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the asset",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved asset's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "asset"
                    ],
                    "properties": {
                      "asset": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the asset"
                          },
                          "name": {
                            "type": "string",
                            "example": "Forklift"
                          },
                          "barcode": {
                            "type": "string",
                            "nullable": true,
                            "example": "BWFPBNRHAW54CG",
                            "description": "String encoded barcode"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": "Forklift that is used to to move heavy equipments around the warehouse"
                          },
                          "criticalityId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 150,
                            "description": "ID of the criticality of the asset"
                          },
                          "teamIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of teams responsible for the asset",
                            "example": [123, 456]
                          },
                          "assetTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "manual",
                              "tool"
                            ],
                            "description": "List of asset types"
                          },
                          "parentId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the parent asset"
                          },
                          "childrenIds": {
                            "type": "array",
                            "nullable": true,
                            "items": {
                              "type": "number"
                            },
                            "example": [321, 987],
                            "description": "IDs of the asset's children"
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the location where the asset is located"
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the asset",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Serial Number\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Serial Number": "000000000"
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "description": "Vendor IDs",
                            "items": {
                              "type": "number",
                              "example": 1
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "Date at which the asset was deleted",
                            "format": "date-time"
                          },
                          "status": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 42,
                                "description": "Global ID of the asset status."
                              },
                              "customStatus": {
                                "type": "object",
                                "required": [
                                  "label"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "example": "Global ID of the custom asset status."
                                  },
                                  "label": {
                                    "type": "string",
                                    "example": "Decommissioned"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Date & time at which the asset custom status was created.",
                                    "example": "2022-01-01T12:34:56.123Z"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Date & time at which the asset custom status was last updated.",
                                    "example": "2022-01-01T12:34:56.123Z"
                                  },
                                  "deletedAt": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Date at which the asset custom status was deleted.",
                                    "format": "date-time",
                                    "example": "2022-01-01T12:34:56.123Z"
                                  },
                                  "downtimeType": {
                                    "type": "string",
                                    "nullable": true,
                                    "example": null,
                                    "enum": [
                                      "PLANNED",
                                      "UNPLANNED"
                                    ],
                                    "deprecated": true,
                                    "description": "Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead."
                                  }
                                },
                                "description": "Custom status assigned to asset.",
                                "nullable": true
                              },
                              "customStatusId": {
                                "type": "number",
                                "description": "Id of the custom status assigned to asset.",
                                "nullable": true,
                                "example": 53
                              },
                              "status": {
                                "type": "string",
                                "example": "OFFLINE",
                                "description": "Asset status value.",
                                "enum": [
                                  "IGNORE",
                                  "OFFLINE",
                                  "ONLINE"
                                ]
                              },
                              "downtimeType": {
                                "type": "string",
                                "nullable": true,
                                "example": "PLANNED",
                                "enum": [
                                  "PLANNED",
                                  "UNPLANNED"
                                ]
                              },
                              "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "description": "Asset status effective start date."
                              },
                              "endedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "description": "Asset status effective end date.",
                                "nullable": true
                              },
                              "description": {
                                "type": "string",
                                "example": "Overheated - needs servicing.",
                                "nullable": true
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "readOnly": true,
                                "description": "Date & time at which the asset status was created."
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "readOnly": true,
                                "description": "Date & time at which the asset status was last updated."
                              },
                              "deletedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "readOnly": true,
                                "description": "Date & time at which the asset status was deleted.",
                                "nullable": true
                              }
                            }
                          },
                          "creatorId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 851,
                            "description": "ID of the asset creator"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified asset or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Assets"
          ]
        },
        "patch": {
          "summary": "Update asset information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the asset",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Asset to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Forklift"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "example": "Forklift that is used to to move heavy equipments around the warehouse"
                    },
                    "barcode": {
                      "type": "string",
                      "nullable": true,
                      "example": "BWFPBNRHAW54CG",
                      "description": "String encoded barcode"
                    },
                    "criticalityId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 150,
                      "description": "ID of the criticality of the asset"
                    },
                    "parentId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the parent asset"
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the location where the asset is located"
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of teams responsible for the asset",
                      "example": [123, 456]
                    },
                    "assetTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "manual",
                        "tool"
                      ],
                      "description": "List of asset types"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Serial Number\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Serial Number": "000000000"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "description": "Vendor IDs",
                      "items": {
                        "type": "number",
                        "example": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited asset",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "asset"
                    ],
                    "properties": {
                      "asset": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the asset"
                          },
                          "name": {
                            "type": "string",
                            "example": "Forklift"
                          },
                          "barcode": {
                            "type": "string",
                            "nullable": true,
                            "example": "BWFPBNRHAW54CG",
                            "description": "String encoded barcode"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": "Forklift that is used to to move heavy equipments around the warehouse"
                          },
                          "criticalityId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 150,
                            "description": "ID of the criticality of the asset"
                          },
                          "teamIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of teams responsible for the asset",
                            "example": [123, 456]
                          },
                          "assetTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "manual",
                              "tool"
                            ],
                            "description": "List of asset types"
                          },
                          "parentId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the parent asset"
                          },
                          "childrenIds": {
                            "type": "array",
                            "nullable": true,
                            "items": {
                              "type": "number"
                            },
                            "example": [321, 987],
                            "description": "IDs of the asset's children"
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the location where the asset is located"
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the asset",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Serial Number\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Serial Number": "000000000"
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "description": "Vendor IDs",
                            "items": {
                              "type": "number",
                              "example": 1
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "Date at which the asset was deleted",
                            "format": "date-time"
                          },
                          "status": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 42,
                                "description": "Global ID of the asset status."
                              },
                              "customStatus": {
                                "type": "object",
                                "required": [
                                  "label"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "example": "Global ID of the custom asset status."
                                  },
                                  "label": {
                                    "type": "string",
                                    "example": "Decommissioned"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Date & time at which the asset custom status was created.",
                                    "example": "2022-01-01T12:34:56.123Z"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Date & time at which the asset custom status was last updated.",
                                    "example": "2022-01-01T12:34:56.123Z"
                                  },
                                  "deletedAt": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Date at which the asset custom status was deleted.",
                                    "format": "date-time",
                                    "example": "2022-01-01T12:34:56.123Z"
                                  },
                                  "downtimeType": {
                                    "type": "string",
                                    "nullable": true,
                                    "example": null,
                                    "enum": [
                                      "PLANNED",
                                      "UNPLANNED"
                                    ],
                                    "deprecated": true,
                                    "description": "Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead."
                                  }
                                },
                                "description": "Custom status assigned to asset.",
                                "nullable": true
                              },
                              "customStatusId": {
                                "type": "number",
                                "description": "Id of the custom status assigned to asset.",
                                "nullable": true,
                                "example": 53
                              },
                              "status": {
                                "type": "string",
                                "example": "OFFLINE",
                                "description": "Asset status value.",
                                "enum": [
                                  "IGNORE",
                                  "OFFLINE",
                                  "ONLINE"
                                ]
                              },
                              "downtimeType": {
                                "type": "string",
                                "nullable": true,
                                "example": "PLANNED",
                                "enum": [
                                  "PLANNED",
                                  "UNPLANNED"
                                ]
                              },
                              "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "description": "Asset status effective start date."
                              },
                              "endedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "description": "Asset status effective end date.",
                                "nullable": true
                              },
                              "description": {
                                "type": "string",
                                "example": "Overheated - needs servicing.",
                                "nullable": true
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "readOnly": true,
                                "description": "Date & time at which the asset status was created."
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "readOnly": true,
                                "description": "Date & time at which the asset status was last updated."
                              },
                              "deletedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2022-01-01T12:34:56.123Z",
                                "readOnly": true,
                                "description": "Date & time at which the asset status was deleted.",
                                "nullable": true
                              }
                            }
                          },
                          "creatorId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 851,
                            "description": "ID of the asset creator"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the asset",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "parentId is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified asset.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "asset Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Assets"
          ]
        },
        "delete": {
          "summary": "Delete asset",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the asset",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the asset"
            },
            "400": {
              "description": "Failed to Delete the asset",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified asset.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "asset Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Assets"
          ]
        }
      },
      "/assets/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update asset attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the asset.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated asset's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified asset.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "asset Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Assets"
          ]
        },
        "delete": {
          "summary": "Remove asset attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the asset.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed asset's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Assets"
          ]
        }
      },
      "/assets/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update asset's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the asset.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the asset thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated asset's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Asset.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Asset Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Assets"
          ]
        }
      },
      "/assetstatuses": {
        "get": {
          "summary": "List asset statuses",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Asset Statuses returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "assetId",
              "schema": {
                "type": "array",
                "title": "assetId ID filters",
                "description": "To filter by multiple assetId IDs: `assetIds=630`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "sort",
              "schema": {
                "description": "Attribute on which to sort the list. (for descending order, prefix attribute with '-'). The default sorting key is : created_at and direction descending",
                "type": "string",
                "enum": [
                  "createdAt",
                  "updatedAt",
                  "startedAt",
                  "endedAt",
                  "-createdAt",
                  "-updatedAt",
                  "-startedAt",
                  "-endedAt"
                ]
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Asset Statuses list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assetStatuses"
                    ],
                    "properties": {
                      "assetStatuses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 42,
                              "description": "Global ID of the asset status."
                            },
                            "customStatusId": {
                              "type": "number",
                              "description": "Id of the custom status assigned to asset.",
                              "nullable": true,
                              "example": 53
                            },
                            "assetId": {
                              "type": "number",
                              "example": 51,
                              "description": "Global Parent asset ID of the asset status."
                            },
                            "status": {
                              "type": "string",
                              "example": "OFFLINE",
                              "description": "Asset status value.",
                              "enum": [
                                "IGNORE",
                                "OFFLINE",
                                "ONLINE"
                              ]
                            },
                            "downtimeType": {
                              "type": "string",
                              "nullable": true,
                              "example": "PLANNED",
                              "enum": [
                                "PLANNED",
                                "UNPLANNED"
                              ],
                              "description": "Downtime type of the asset status."
                            },
                            "startedAt": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2022-01-01T12:34:56.123Z",
                              "description": "Date & time at which the asset status was started at."
                            },
                            "endedAt": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2022-01-01T12:34:56.123Z",
                              "description": "Date & time at which the asset status ended at. Null means this status is still active, and is the current one.",
                              "nullable": true
                            },
                            "organizationId": {
                              "type": "number",
                              "example": 51,
                              "description": "The Organization ID of the asset status."
                            },
                            "creatorId": {
                              "type": "number",
                              "example": 51,
                              "description": "The Creator ID of the asset status."
                            },
                            "updaterId": {
                              "type": "number",
                              "example": 51,
                              "description": "The Updater ID of the asset status."
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2022-01-01T12:34:56.123Z",
                              "description": "Date & time at which the asset status was created. This is the default sort by field, by descending (newest firsts)"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2022-01-01T12:34:56.123Z",
                              "description": "Date & time at which the asset status was last updated."
                            },
                            "deletedAt": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2022-01-01T12:34:56.123Z",
                              "nullable": true,
                              "description": "Date & time at which the asset status was deleted."
                            },
                            "description": {
                              "type": "string",
                              "example": "Overheated - needs servicing.",
                              "nullable": true,
                              "description": "Description of the asset status."
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Asset Statuses.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Asset Statuses.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Asset Statuses"
          ]
        }
      },
      "/assetstatuses/{id}": {
        "patch": {
          "summary": "Update asset status information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the asset status",
              "example": "5678"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Asset status to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "OFFLINE",
                      "description": "Asset status value.",
                      "enum": [
                        "IGNORE",
                        "OFFLINE",
                        "ONLINE"
                      ]
                    },
                    "customStatusId": {
                      "type": "number",
                      "description": "Id of the custom status assigned to asset.",
                      "nullable": true,
                      "example": 53
                    },
                    "downtimeType": {
                      "type": "string",
                      "nullable": true,
                      "example": "PLANNED",
                      "enum": [
                        "PLANNED",
                        "UNPLANNED"
                      ]
                    },
                    "startedAt": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-01-01T12:34:56.123Z",
                      "description": "Asset status effective start date."
                    },
                    "endedAt": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-01-01T12:34:56.123Z",
                      "description": "Asset status effective end date.",
                      "nullable": true
                    },
                    "description": {
                      "type": "string",
                      "example": "Overheated - needs servicing.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited asset status",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assetStatus"
                    ],
                    "properties": {
                      "assetStatus": {
                        "type": "object",
                        "required": [
                          "id",
                          "startedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 42,
                            "description": "Global ID of the asset status."
                          },
                          "customStatusId": {
                            "type": "number",
                            "description": "Id of the custom status assigned to asset.",
                            "nullable": true,
                            "example": 53
                          },
                          "status": {
                            "type": "string",
                            "example": "OFFLINE",
                            "description": "Asset status value.",
                            "enum": [
                              "IGNORE",
                              "OFFLINE",
                              "ONLINE"
                            ]
                          },
                          "downtimeType": {
                            "type": "string",
                            "nullable": true,
                            "example": "PLANNED",
                            "enum": [
                              "PLANNED",
                              "UNPLANNED"
                            ]
                          },
                          "startedAt": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z",
                            "description": "Asset status effective start date."
                          },
                          "endedAt": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z",
                            "description": "Asset status effective end date.",
                            "nullable": true
                          },
                          "description": {
                            "type": "string",
                            "example": "Overheated - needs servicing.",
                            "nullable": true
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z",
                            "readOnly": true,
                            "description": "Date & time at which the asset status was created."
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z",
                            "readOnly": true,
                            "description": "Date & time at which the asset status was last updated."
                          },
                          "deletedAt": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z",
                            "readOnly": true,
                            "description": "Date & time at which the asset status was deleted.",
                            "nullable": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to edit the asset status",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User don't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified assetstatus.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "assetstatus Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Asset Statuses"
          ]
        }
      },
      "/assetcriticalities": {
        "get": {
          "summary": "List asset criticalities",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Asset Criticalities returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Asset Criticalities list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assetCriticalities"
                    ],
                    "properties": {
                      "assetCriticalities": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "label",
                            "level"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the criticality"
                            },
                            "label": {
                              "type": "string",
                              "example": "Normal"
                            },
                            "level": {
                              "type": "integer",
                              "example": 3
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Asset Criticalities.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Asset Criticalities.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Asset Criticalities"
          ]
        }
      },
      "/assetcriticalities/{id}": {
        "get": {
          "summary": "Get asset criticality",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the assetCriticality",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved assetCriticality's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assetCriticality"
                    ],
                    "properties": {
                      "assetCriticality": {
                        "type": "object",
                        "required": [
                          "id",
                          "label",
                          "level"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the criticality"
                          },
                          "label": {
                            "type": "string",
                            "example": "Normal"
                          },
                          "level": {
                            "type": "integer",
                            "example": 3
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified assetCriticality or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Asset Criticalities"
          ]
        }
      },
      "/assetcustomstatuses": {
        "post": {
          "summary": "Create new asset custom status type",
          "requestBody": {
            "description": "AssetCustomStatus to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "baseAssetStatus",
                    "label"
                  ],
                  "properties": {
                    "label": {
                      "type": "string",
                      "example": "Decommissioned"
                    },
                    "baseAssetStatus": {
                      "type": "string",
                      "example": "OFFLINE",
                      "enum": [
                        "IGNORE",
                        "OFFLINE",
                        "ONLINE"
                      ]
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created asset custom status",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": "Global ID of the custom asset status."
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Asset Custom Statuses"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List asset custom statuses",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Asset Custom Statuses returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Asset Custom Statuses list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assetCustomStatuses"
                    ],
                    "properties": {
                      "assetCustomStatuses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "label",
                            "baseAssetStatus"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": "Global ID of the custom asset status."
                            },
                            "label": {
                              "type": "string",
                              "example": "Decommissioned"
                            },
                            "baseAssetStatus": {
                              "type": "string",
                              "example": "OFFLINE",
                              "enum": [
                                "IGNORE",
                                "OFFLINE",
                                "ONLINE"
                              ]
                            },
                            "downtimeType": {
                              "type": "string",
                              "nullable": true,
                              "example": null,
                              "enum": [
                                "PLANNED",
                                "UNPLANNED"
                              ],
                              "deprecated": true,
                              "description": "Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead."
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset custom status was created.",
                              "example": "2022-01-01T12:34:56.123Z"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset custom status was last updated.",
                              "example": "2022-01-01T12:34:56.123Z"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Asset Custom Statuses.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Asset Custom Statuses.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Asset Custom Statuses"
          ]
        }
      },
      "/assetcustomstatuses/{id}": {
        "get": {
          "summary": "Get asset custom status",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the assetCustomStatus",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved assetCustomStatus's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "assetCustomStatus"
                    ],
                    "properties": {
                      "assetCustomStatus": {
                        "type": "object",
                        "required": [
                          "baseAssetStatus",
                          "label"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": "Global ID of the custom asset status."
                          },
                          "baseAssetStatus": {
                            "type": "string",
                            "example": "OFFLINE",
                            "enum": [
                              "IGNORE",
                              "OFFLINE",
                              "ONLINE"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "example": "Decommissioned"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset custom status was created.",
                            "example": "2022-01-01T12:34:56.123Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset custom status was last updated.",
                            "example": "2022-01-01T12:34:56.123Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "Date at which the asset custom status was deleted.",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z"
                          },
                          "downtimeType": {
                            "type": "string",
                            "nullable": true,
                            "example": null,
                            "enum": [
                              "PLANNED",
                              "UNPLANNED"
                            ],
                            "deprecated": true,
                            "description": "Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead."
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified assetCustomStatus or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Asset Custom Statuses"
          ]
        },
        "patch": {
          "summary": "Update asset custom status information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the assetCustomStatus",
              "example": "4242"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "AssetCustomStatus to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "label"
                  ],
                  "properties": {
                    "label": {
                      "type": "string",
                      "example": "Decommissioned"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited asset custom status",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "assetcustomstatus": {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": "Global ID of the custom asset status."
                          },
                          "baseAssetStatus": {
                            "type": "string",
                            "example": "OFFLINE",
                            "enum": [
                              "IGNORE",
                              "OFFLINE",
                              "ONLINE"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "example": "Decommissioned"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset custom status was created.",
                            "example": "2022-01-01T12:34:56.123Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the asset custom status was last updated.",
                            "example": "2022-01-01T12:34:56.123Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "Date at which the asset custom status was deleted.",
                            "format": "date-time",
                            "example": "2022-01-01T12:34:56.123Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified assetcustomstatus.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "assetcustomstatus Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Asset Custom Statuses"
          ]
        },
        "delete": {
          "summary": "Delete asset custom status",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the assetCustomStatus",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the assetCustomStatus"
            },
            "400": {
              "description": "Failed to Delete the assetCustomStatus",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified assetCustomStatus.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "assetCustomStatus Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Asset Custom Statuses"
          ]
        }
      },
      "/categories": {
        "post": {
          "summary": "Create new category",
          "requestBody": {
            "description": "Category to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "label"
                  ],
                  "properties": {
                    "label": {
                      "type": "string",
                      "example": "Safety",
                      "description": "Label used when displaying the category."
                    },
                    "description": {
                      "type": "string",
                      "example": "Used for everything related to Safety",
                      "description": "Description field for additional information."
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created category",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the category."
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Categories"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List categories",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Categories returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Categories list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "categories"
                    ],
                    "properties": {
                      "categories": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "label"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the category."
                            },
                            "label": {
                              "type": "string",
                              "example": "Safety",
                              "description": "Label used when displaying the category."
                            },
                            "description": {
                              "type": "string",
                              "example": "Used for everything related to Safety",
                              "description": "Description field for additional information."
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Categories.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Categories.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Categories"
          ]
        }
      },
      "/categories/{id}": {
        "get": {
          "summary": "Get category",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the category",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved category's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "category"
                    ],
                    "properties": {
                      "category": {
                        "type": "object",
                        "required": [
                          "id",
                          "label"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the category."
                          },
                          "label": {
                            "type": "string",
                            "example": "Safety",
                            "description": "Label used when displaying the category."
                          },
                          "description": {
                            "type": "string",
                            "example": "Used for everything related to Safety",
                            "description": "Description field for additional information."
                          },
                          "workOrderCount": {
                            "type": "integer",
                            "example": 3,
                            "description": "The amount of work order using that category in your organization."
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the category was last updated.",
                            "example": "2022-01-01T00:00:00.000Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified category or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Categories"
          ]
        },
        "patch": {
          "summary": "Update category information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the category",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Category to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "example": "Safety",
                      "description": "Label used when displaying the category."
                    },
                    "description": {
                      "type": "string",
                      "example": "Used for everything related to Safety",
                      "description": "Description field for additional information."
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited category",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "category"
                    ],
                    "properties": {
                      "category": {
                        "type": "object",
                        "required": [
                          "label"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the category."
                          },
                          "label": {
                            "type": "string",
                            "example": "Safety",
                            "description": "Label used when displaying the category."
                          },
                          "description": {
                            "type": "string",
                            "example": "Used for everything related to Safety",
                            "description": "Description field for additional information."
                          },
                          "workOrderCount": {
                            "type": "integer",
                            "example": 3,
                            "description": "The amount of work order using that category in your organization."
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the category was last updated.",
                            "example": "2022-01-01T00:00:00.000Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the category",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "parentId is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified category.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "category Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Categories"
          ]
        },
        "delete": {
          "summary": "Delete category",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the category",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the category"
            },
            "400": {
              "description": "Failed to Delete the category",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified category.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "category Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Categories"
          ]
        }
      },
      "/conversations": {
        "get": {
          "summary": "List conversations",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Conversations returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "type",
              "schema": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "GROUP",
                    "DM",
                    "TEAM"
                  ],
                  "title": "conversation type filters",
                  "description": "To filter by multiple type: `type=GROUP&type=TEAM`"
                }
              },
              "in": "query"
            },
            {
              "name": "onlyNamed",
              "schema": {
                "type": "boolean",
                "description": "Will only show named group conversations and team conversation"
              },
              "in": "query"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Conversations list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "conversations"
                    ],
                    "properties": {
                      "conversations": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Global ID of the conversation"
                            },
                            "type": {
                              "type": "string",
                              "description": "Type of conversation",
                              "enum": [
                                "GROUP",
                                "DM",
                                "TEAM"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "nullable": true,
                              "description": "Display name of the conversation"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Conversations.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Conversations.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Conversations"
          ]
        }
      },
      "/conversations/{id}/messages": {
        "post": {
          "summary": "Create new message in a conversation",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the conversation",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Message to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "content"
                  ],
                  "properties": {
                    "content": {
                      "type": "string",
                      "description": "Content of the message to post"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the message",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Global ID of the message"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the message",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "should have required property 'content'",
                          "fieldPath": "content"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified conversation.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "conversation Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Conversations"
          ]
        }
      },
      "/versions": {
        "get": {
          "summary": "Get list of available API versions",
          "responses": {
            "200": {
              "description": "Successfully retrieved list of available versions",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "version"
                      ],
                      "properties": {
                        "version": {
                          "type": "string",
                          "example": "1"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "security": [],
          "tags": [
            "OpenAPI Documentation"
          ],
          "servers": [
            {
              "url": "https://api.getmaintainsoft.com",
              "description": "Endpoint"
            }
          ]
        }
      },
      "/locations": {
        "post": {
          "summary": "Create new location",
          "requestBody": {
            "description": "Location to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Warehouses"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "example": "The warehouse where we store the forklifts"
                    },
                    "address": {
                      "type": "string",
                      "nullable": true,
                      "example": "1090 main street, Franklin",
                      "description": "Postal address of the location"
                    },
                    "barcode": {
                      "type": "string",
                      "nullable": true,
                      "example": "BWFPBNRHAW54CG",
                      "description": "String encoded barcode"
                    },
                    "parentId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the parent location"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Department": "Electrical"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "description": "Vendor IDs",
                      "items": {
                        "type": "number",
                        "example": 2
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully created location",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the location"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Locations"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List locations",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Locations returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "name",
              "schema": {
                "type": "string",
                "description": "Will only show locations that have a name starting with this."
              },
              "in": "query"
            },
            {
              "name": "customFieldName",
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter locations by custom field value. Your query parameter should be your custom field name. (ie: To filter by a custom field named \"Industry\" with the value \"Construction\", you would do this \"/locations?Industry=Construction\").\n                    \u003Cbr\u003E\u003Cbr\u003EAdding multiple instance of the same custom field act as an \u003Ccode\u003EOR\u003C/code\u003E and adding a different custom field act as an \u003Ccode\u003EAND\u003C/code\u003E. (ie: To filter by a custom field named \u003Ccode\u003EIndustry\u003C/code\u003E with the value \u003Ccode\u003EConstruction\u003C/code\u003E OR \u003Ccode\u003ETransportation\u003C/code\u003E AND the custom field \u003Ccode\u003EManufacturer\u003C/code\u003E with the value \u003Ccode\u003EACME\u003C/code\u003E, you would do this \u003Ccode\u003E/locations?Industry=Construction&Industry=Transportation&Manufacturer=ACME\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003EIf your custom field label is the same as a reserved query parameter such as \u003Ccode\u003Elimit\u003C/code\u003E, \u003Ccode\u003Esort\u003C/code\u003E, \u003Ccode\u003Eexpand\u003C/code\u003E, etc, you can add \u003Ccode\u003E__c\u003C/code\u003E to your custom field filtering (ie: To filter by a custom field named \u003Ccode\u003Elimit\u003C/code\u003E with the value \u003Ccode\u003Eten\u003C/code\u003E, you would do this \u003Ccode\u003E/locations?limit__c=ten\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003ENote that your custom field needs to be created beforehand. Only number and single line text custom field types are supported."
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=extra_fields&expand=team_ids`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "extra_fields",
                    "team_ids",
                    "vendor_ids",
                    "barcode"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Locations list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "locations"
                    ],
                    "properties": {
                      "locations": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the location"
                            },
                            "name": {
                              "type": "string",
                              "example": "Warehouses"
                            },
                            "description": {
                              "type": "string",
                              "nullable": true,
                              "example": "The warehouse where we store the forklifts"
                            },
                            "address": {
                              "type": "string",
                              "nullable": true,
                              "example": "1090 main street, Franklin",
                              "description": "Postal address of the location"
                            },
                            "parentId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 852,
                              "description": "ID of the parent location"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the location was created",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the location was last updated. This doesn't include comments",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "extraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\") (expand with query parameter)",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Department": "Electrical"
                              },
                              "nullable": false
                            },
                            "teamIds": {
                              "type": "array",
                              "description": "Team IDs (expand with query parameter)",
                              "items": {
                                "type": "number",
                                "example": 2
                              },
                              "nullable": false
                            },
                            "vendorIds": {
                              "type": "array",
                              "description": "Vendor IDs (expand with query parameter)",
                              "items": {
                                "type": "number",
                                "example": 2
                              },
                              "nullable": false
                            },
                            "barcode": {
                              "type": "string",
                              "nullable": false,
                              "example": "BWFPBNRHAW54CG",
                              "description": "String encoded barcode (expand with query parameter)"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Locations.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Locations.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Locations"
          ]
        }
      },
      "/locations/{id}": {
        "get": {
          "summary": "Get location",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the location",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved location's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "location"
                    ],
                    "properties": {
                      "location": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the location"
                          },
                          "name": {
                            "type": "string",
                            "example": "Warehouses"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": "The warehouse where we store the forklifts"
                          },
                          "address": {
                            "type": "string",
                            "nullable": true,
                            "example": "1090 main street, Franklin",
                            "description": "Postal address of the location"
                          },
                          "barcode": {
                            "type": "string",
                            "nullable": true,
                            "example": "BWFPBNRHAW54CG",
                            "description": "String encoded barcode"
                          },
                          "parentId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the parent location"
                          },
                          "childrenIds": {
                            "type": "array",
                            "nullable": true,
                            "items": {
                              "type": "number"
                            },
                            "example": [342, 521],
                            "description": "IDs of the location's children"
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the location",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Department": "Electrical"
                            }
                          },
                          "teamIds": {
                            "type": "array",
                            "description": "Team IDs",
                            "items": {
                              "type": "number",
                              "example": 2
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "description": "Vendor IDs",
                            "items": {
                              "type": "number",
                              "example": 2
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the location was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the location was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "Date at which the location was deleted",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified location or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Locations"
          ]
        },
        "patch": {
          "summary": "Update location information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the location",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Location to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Warehouses"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "example": "The warehouse where we store the forklifts"
                    },
                    "address": {
                      "type": "string",
                      "nullable": true,
                      "example": "1090 main street, Franklin",
                      "description": "Postal address of the location"
                    },
                    "barcode": {
                      "type": "string",
                      "nullable": true,
                      "example": "BWFPBNRHAW54CG",
                      "description": "String encoded barcode"
                    },
                    "parentId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the parent location"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Department": "Electrical"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "description": "Vendor IDs",
                      "items": {
                        "type": "number",
                        "example": 2
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited location",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "location"
                    ],
                    "properties": {
                      "location": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the location"
                          },
                          "name": {
                            "type": "string",
                            "example": "Warehouses"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": "The warehouse where we store the forklifts"
                          },
                          "address": {
                            "type": "string",
                            "nullable": true,
                            "example": "1090 main street, Franklin",
                            "description": "Postal address of the location"
                          },
                          "barcode": {
                            "type": "string",
                            "nullable": true,
                            "example": "BWFPBNRHAW54CG",
                            "description": "String encoded barcode"
                          },
                          "parentId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the parent location"
                          },
                          "childrenIds": {
                            "type": "array",
                            "nullable": true,
                            "items": {
                              "type": "number"
                            },
                            "example": [342, 521],
                            "description": "IDs of the location's children"
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the location",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Department": "Electrical"
                            }
                          },
                          "teamIds": {
                            "type": "array",
                            "description": "Team IDs",
                            "items": {
                              "type": "number",
                              "example": 2
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "description": "Vendor IDs",
                            "items": {
                              "type": "number",
                              "example": 2
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the location was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the location was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "Date at which the location was deleted",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the location",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "parentId is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified location.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "location Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Locations"
          ]
        },
        "delete": {
          "summary": "Delete location",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the location",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the location"
            },
            "400": {
              "description": "Failed to Delete the location",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified location.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "location Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Locations"
          ]
        }
      },
      "/locations/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update location attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the location.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated location's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified location.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "location Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Locations"
          ]
        },
        "delete": {
          "summary": "Remove location attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the location.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed location's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Locations"
          ]
        }
      },
      "/locations/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update location's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the location.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the location thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated location's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Location.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Location Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Locations"
          ]
        }
      },
      "/meterreadings": {
        "post": {
          "summary": "Create new meter readings",
          "requestBody": {
            "description": "Meter readings to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "meterId",
                      "value"
                    ],
                    "properties": {
                      "meterId": {
                        "type": "number",
                        "example": 53,
                        "description": "Global ID of the meter."
                      },
                      "value": {
                        "type": "number",
                        "description": "The reading value given by the meter.",
                        "example": 120
                      },
                      "readingDate": {
                        "type": "string",
                        "example": "2022-01-01T00:00:00.000Z",
                        "description": "Date at which the meter was read. This date can be set in the past, but cannot be further than 3 days for IoT meters.",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created meter readings",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "meterId",
                        "value",
                        "createdAt"
                      ],
                      "properties": {
                        "meterId": {
                          "type": "number",
                          "example": 53,
                          "description": "Global ID of the meter."
                        },
                        "value": {
                          "type": "number",
                          "description": "The reading value given by the meter.",
                          "example": 120
                        },
                        "createdAt": {
                          "type": "string",
                          "example": "2022-01-01T00:00:00.000Z",
                          "description": "Meter Reading creation/processing date."
                        },
                        "readingDate": {
                          "type": "string",
                          "example": "2022-01-01T00:00:00.000Z",
                          "description": "Date at which the meter was read. This date can be set in the past, but cannot be further than 3 days for IoT meters.",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error occurred trying to insert a meter reading",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Unexpected error"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "You are forbidden to perform the requested action or to access this resource",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Forbidden"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified meter.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "meter Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Readings"
          ]
        }
      },
      "/meters": {
        "post": {
          "summary": "Create new meter",
          "requestBody": {
            "description": "Asset to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "unit"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string",
                      "example": "A meter sample description"
                    },
                    "measurementType": {
                      "type": "string",
                      "default": "MANUAL",
                      "enum": [
                        "MANUAL",
                        "IOT_DEVICE"
                      ]
                    },
                    "readingFrequency": {
                      "type": "object",
                      "nullable": true,
                      "example": {
                        "type": "WEEKLY",
                        "interval": 3,
                        "days": [
                          "MONDAY",
                          "WEDNESDAY",
                          "FRIDAY"
                        ]
                      },
                      "anyOf": [
                        {
                          "type": "object",
                          "title": "Secondly",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "SECONDLY",
                              "enum": [
                                "SECONDLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of seconds between readings. Minimum 10s for IOT_DEVICE, 21600s for MANUAL",
                              "minimum": 10,
                              "default": 10
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Minutly",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "MINUTLY",
                              "enum": [
                                "MINUTLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of minutes between readings",
                              "minimum": 1,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Hourly",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "HOURLY",
                              "enum": [
                                "HOURLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of hours between readings",
                              "minimum": 1,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Daily",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "DAILY",
                              "enum": [
                                "DAILY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of days between readings",
                              "minimum": 1,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Weekly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "WEEKLY",
                              "enum": [
                                "WEEKLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of weeks between readings",
                              "minimum": 1,
                              "maximum": 52,
                              "default": 1
                            },
                            "days": {
                              "type": "array",
                              "description": "Days of the week the event will occur",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "SUNDAY",
                                  "MONDAY",
                                  "TUESDAY",
                                  "WEDNESDAY",
                                  "THURSDAY",
                                  "FRIDAY",
                                  "SATURDAY"
                                ]
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Monthly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "MONTHLY",
                              "enum": [
                                "MONTHLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of months between readings",
                              "minimum": 1,
                              "maximum": 12,
                              "default": 1
                            },
                            "day": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 31,
                              "description": "Day of the month the event will occur"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Yearly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "YEARLY",
                              "enum": [
                                "YEARLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of years between readings",
                              "minimum": 1,
                              "maximum": 1000,
                              "default": 1
                            }
                          }
                        }
                      ]
                    },
                    "unit": {
                      "type": "string",
                      "description": "Measurement unit for the readings"
                    },
                    "assetId": {
                      "type": "integer",
                      "nullable": true
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created asset",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": 963,
                        "description": "Global ID of the meter."
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Meters"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List meters",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Meters returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "measurementType",
              "schema": {
                "type": "string",
                "description": "The measurement type of the meter to filter by",
                "enum": [
                  "MANUAL",
                  "IOT_DEVICE"
                ],
                "example": "MANUAL"
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=asset&expand=location`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "location",
                    "last_reading"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Meters list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "meters"
                    ],
                    "properties": {
                      "meters": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "unit",
                            "measurementType"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 963,
                              "description": "Global ID of the meter."
                            },
                            "name": {
                              "type": "string"
                            },
                            "unit": {
                              "type": "string",
                              "description": "Measurement unit for the readings"
                            },
                            "measurementType": {
                              "type": "string",
                              "default": "MANUAL",
                              "enum": [
                                "MANUAL",
                                "IOT_DEVICE"
                              ]
                            },
                            "asset": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "description",
                                "parentId",
                                "criticalityId",
                                "locationId",
                                "createdAt",
                                "updatedAt",
                                "creatorId"
                              ],
                              "description": "Asset linked to the element (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 963,
                                  "description": "Global ID of the asset"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Forklift"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "Forklift that is used to to move heavy equipments around the warehouse"
                                },
                                "parentId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the parent asset"
                                },
                                "criticalityId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 150,
                                  "description": "ID of the criticality of the asset"
                                },
                                "locationId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the location where the asset is located"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the asset was created",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the asset was last updated. This doesn't include comments",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "creatorId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 851,
                                  "description": "ID of the asset creator"
                                }
                              },
                              "nullable": true
                            },
                            "location": {
                              "type": "object",
                              "required": [
                                "id",
                                "name"
                              ],
                              "description": "Location linked to the element (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 963,
                                  "description": "Global ID of the location"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Warehouses"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "The warehouse where we store the forklifts"
                                },
                                "address": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "1090 main street, Franklin",
                                  "description": "Postal address of the location"
                                },
                                "parentId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the parent location"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the location was created",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the location was last updated. This doesn't include comments",
                                  "example": "2022-01-01T00:00:00.000Z"
                                }
                              },
                              "nullable": true
                            },
                            "lastReading": {
                              "type": "object",
                              "required": [
                                "id",
                                "createdAt",
                                "meterId",
                                "readingDate",
                                "value"
                              ],
                              "description": "Last reading of a meter (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "example": 963,
                                  "description": "Global ID of the reading.\nIoT meters will produce IDs with the format '{meterId}-{uuid}', while manual meters will produce numbered IDs."
                                },
                                "meterId": {
                                  "type": "number",
                                  "example": 53,
                                  "description": "Global ID of the meter."
                                },
                                "createdAt": {
                                  "type": "string",
                                  "example": "2022-01-01T00:00:00.000Z",
                                  "description": "Meter Reading creation/processing date."
                                },
                                "readingDate": {
                                  "type": "string",
                                  "example": "2022-01-01T00:00:00.000Z",
                                  "description": "Date at which the meter was read. This date can be set in the past, but cannot be further than 3 days for IoT meters.",
                                  "nullable": true
                                },
                                "value": {
                                  "type": "number",
                                  "description": "The reading value given by the meter.",
                                  "example": 120
                                }
                              },
                              "nullable": true
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Meters.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Meters.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Meters"
          ]
        }
      },
      "/meters/{id}": {
        "get": {
          "summary": "Get meter",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meter",
              "example": "1"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=asset&expand=location`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "location",
                    "last_reading"
                  ]
                }
              }
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved meter's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "meter"
                    ],
                    "properties": {
                      "meter": {
                        "type": "object",
                        "required": [
                          "id",
                          "assetId",
                          "locationId",
                          "creatorId",
                          "updaterId",
                          "name",
                          "uuid",
                          "description",
                          "measurementType",
                          "readingFrequency",
                          "unit",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 963,
                            "description": "Global ID of the meter."
                          },
                          "assetId": {
                            "type": "integer",
                            "nullable": true
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true
                          },
                          "creatorId": {
                            "type": "integer",
                            "description": "ID of the user who created the meter"
                          },
                          "updaterId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the last user who updated the meter"
                          },
                          "name": {
                            "type": "string"
                          },
                          "uuid": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string",
                            "example": "A meter sample description"
                          },
                          "measurementType": {
                            "type": "string",
                            "default": "MANUAL",
                            "enum": [
                              "MANUAL",
                              "IOT_DEVICE"
                            ]
                          },
                          "readingFrequency": {
                            "type": "object",
                            "nullable": true,
                            "example": {
                              "type": "WEEKLY",
                              "interval": 3,
                              "days": [
                                "MONDAY",
                                "WEDNESDAY",
                                "FRIDAY"
                              ]
                            },
                            "anyOf": [
                              {
                                "type": "object",
                                "title": "Secondly",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "SECONDLY",
                                    "enum": [
                                      "SECONDLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of seconds between readings. Minimum 10s for IOT_DEVICE, 21600s for MANUAL",
                                    "minimum": 10,
                                    "default": 10
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Minutly",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "MINUTLY",
                                    "enum": [
                                      "MINUTLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of minutes between readings",
                                    "minimum": 1,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Hourly",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "HOURLY",
                                    "enum": [
                                      "HOURLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of hours between readings",
                                    "minimum": 1,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Daily",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "DAILY",
                                    "enum": [
                                      "DAILY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of days between readings",
                                    "minimum": 1,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Weekly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "WEEKLY",
                                    "enum": [
                                      "WEEKLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of weeks between readings",
                                    "minimum": 1,
                                    "maximum": 52,
                                    "default": 1
                                  },
                                  "days": {
                                    "type": "array",
                                    "description": "Days of the week the event will occur",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "SUNDAY",
                                        "MONDAY",
                                        "TUESDAY",
                                        "WEDNESDAY",
                                        "THURSDAY",
                                        "FRIDAY",
                                        "SATURDAY"
                                      ]
                                    }
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Monthly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "MONTHLY",
                                    "enum": [
                                      "MONTHLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of months between readings",
                                    "minimum": 1,
                                    "maximum": 12,
                                    "default": 1
                                  },
                                  "day": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 31,
                                    "description": "Day of the month the event will occur"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Yearly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "YEARLY",
                                    "enum": [
                                      "YEARLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of years between readings",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "default": 1
                                  }
                                }
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "description": "Measurement unit for the readings"
                          },
                          "createdAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Meter creation date."
                          },
                          "updatedAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date that Meter was last modified."
                          },
                          "asset": {
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "description",
                              "parentId",
                              "criticalityId",
                              "locationId",
                              "createdAt",
                              "updatedAt",
                              "creatorId"
                            ],
                            "description": "Asset linked to the element (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the asset"
                              },
                              "name": {
                                "type": "string",
                                "example": "Forklift"
                              },
                              "description": {
                                "type": "string",
                                "nullable": true,
                                "example": "Forklift that is used to to move heavy equipments around the warehouse"
                              },
                              "parentId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the parent asset"
                              },
                              "criticalityId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 150,
                                "description": "ID of the criticality of the asset"
                              },
                              "locationId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the location where the asset is located"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the asset was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the asset was last updated. This doesn't include comments",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "creatorId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the asset creator"
                              }
                            },
                            "nullable": true
                          },
                          "location": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "Location linked to the element (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the location"
                              },
                              "name": {
                                "type": "string",
                                "example": "Warehouses"
                              },
                              "description": {
                                "type": "string",
                                "nullable": true,
                                "example": "The warehouse where we store the forklifts"
                              },
                              "address": {
                                "type": "string",
                                "nullable": true,
                                "example": "1090 main street, Franklin",
                                "description": "Postal address of the location"
                              },
                              "parentId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the parent location"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the location was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the location was last updated. This doesn't include comments",
                                "example": "2022-01-01T00:00:00.000Z"
                              }
                            },
                            "nullable": true
                          },
                          "lastReading": {
                            "type": "object",
                            "required": [
                              "id",
                              "createdAt",
                              "meterId",
                              "readingDate",
                              "value"
                            ],
                            "description": "Last reading of a meter (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": 963,
                                "description": "Global ID of the reading.\nIoT meters will produce IDs with the format '{meterId}-{uuid}', while manual meters will produce numbered IDs."
                              },
                              "meterId": {
                                "type": "number",
                                "example": 53,
                                "description": "Global ID of the meter."
                              },
                              "createdAt": {
                                "type": "string",
                                "example": "2022-01-01T00:00:00.000Z",
                                "description": "Meter Reading creation/processing date."
                              },
                              "readingDate": {
                                "type": "string",
                                "example": "2022-01-01T00:00:00.000Z",
                                "description": "Date at which the meter was read. This date can be set in the past, but cannot be further than 3 days for IoT meters.",
                                "nullable": true
                              },
                              "value": {
                                "type": "number",
                                "description": "The reading value given by the meter.",
                                "example": 120
                              }
                            },
                            "nullable": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified meter or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meters"
          ]
        },
        "patch": {
          "summary": "Update meter information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meter",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Meter to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "assetId": {
                      "type": "integer",
                      "nullable": true
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true
                    },
                    "description": {
                      "nullable": true,
                      "type": "string",
                      "example": "A meter sample description"
                    },
                    "name": {
                      "type": "string"
                    },
                    "readingFrequency": {
                      "type": "object",
                      "nullable": true,
                      "example": {
                        "type": "WEEKLY",
                        "interval": 3,
                        "days": [
                          "MONDAY",
                          "WEDNESDAY",
                          "FRIDAY"
                        ]
                      },
                      "anyOf": [
                        {
                          "type": "object",
                          "title": "Secondly",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "SECONDLY",
                              "enum": [
                                "SECONDLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of seconds between readings. Minimum 10s for IOT_DEVICE, 21600s for MANUAL",
                              "minimum": 10,
                              "default": 10
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Minutly",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "MINUTLY",
                              "enum": [
                                "MINUTLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of minutes between readings",
                              "minimum": 1,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Hourly",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "HOURLY",
                              "enum": [
                                "HOURLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of hours between readings",
                              "minimum": 1,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Daily",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "DAILY",
                              "enum": [
                                "DAILY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of days between readings",
                              "minimum": 1,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Weekly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "WEEKLY",
                              "enum": [
                                "WEEKLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of weeks between readings",
                              "minimum": 1,
                              "maximum": 52,
                              "default": 1
                            },
                            "days": {
                              "type": "array",
                              "description": "Days of the week the event will occur",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "SUNDAY",
                                  "MONDAY",
                                  "TUESDAY",
                                  "WEDNESDAY",
                                  "THURSDAY",
                                  "FRIDAY",
                                  "SATURDAY"
                                ]
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Monthly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "MONTHLY",
                              "enum": [
                                "MONTHLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of months between readings",
                              "minimum": 1,
                              "maximum": 12,
                              "default": 1
                            },
                            "day": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 31,
                              "description": "Day of the month the event will occur"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Yearly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "YEARLY",
                              "enum": [
                                "YEARLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of years between readings",
                              "minimum": 1,
                              "maximum": 1000,
                              "default": 1
                            }
                          }
                        }
                      ]
                    },
                    "unit": {
                      "type": "string",
                      "description": "Measurement unit for the readings"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited meter",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "meter"
                    ],
                    "properties": {
                      "meter": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 963,
                            "description": "Global ID of the meter."
                          },
                          "assetId": {
                            "type": "integer",
                            "nullable": true
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true
                          },
                          "creatorId": {
                            "type": "integer",
                            "description": "ID of the user who created the meter"
                          },
                          "updaterId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the last user who updated the meter"
                          },
                          "name": {
                            "type": "string"
                          },
                          "uuid": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string",
                            "example": "A meter sample description"
                          },
                          "measurementType": {
                            "type": "string",
                            "default": "MANUAL",
                            "enum": [
                              "MANUAL",
                              "IOT_DEVICE"
                            ]
                          },
                          "readingFrequency": {
                            "type": "object",
                            "nullable": true,
                            "example": {
                              "type": "WEEKLY",
                              "interval": 3,
                              "days": [
                                "MONDAY",
                                "WEDNESDAY",
                                "FRIDAY"
                              ]
                            },
                            "anyOf": [
                              {
                                "type": "object",
                                "title": "Secondly",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "SECONDLY",
                                    "enum": [
                                      "SECONDLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of seconds between readings. Minimum 10s for IOT_DEVICE, 21600s for MANUAL",
                                    "minimum": 10,
                                    "default": 10
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Minutly",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "MINUTLY",
                                    "enum": [
                                      "MINUTLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of minutes between readings",
                                    "minimum": 1,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Hourly",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "HOURLY",
                                    "enum": [
                                      "HOURLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of hours between readings",
                                    "minimum": 1,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Daily",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "DAILY",
                                    "enum": [
                                      "DAILY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of days between readings",
                                    "minimum": 1,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Weekly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "WEEKLY",
                                    "enum": [
                                      "WEEKLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of weeks between readings",
                                    "minimum": 1,
                                    "maximum": 52,
                                    "default": 1
                                  },
                                  "days": {
                                    "type": "array",
                                    "description": "Days of the week the event will occur",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "SUNDAY",
                                        "MONDAY",
                                        "TUESDAY",
                                        "WEDNESDAY",
                                        "THURSDAY",
                                        "FRIDAY",
                                        "SATURDAY"
                                      ]
                                    }
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Monthly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "MONTHLY",
                                    "enum": [
                                      "MONTHLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of months between readings",
                                    "minimum": 1,
                                    "maximum": 12,
                                    "default": 1
                                  },
                                  "day": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 31,
                                    "description": "Day of the month the event will occur"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Yearly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "YEARLY",
                                    "enum": [
                                      "YEARLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of years between readings",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "default": 1
                                  }
                                }
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "description": "Measurement unit for the readings"
                          },
                          "createdAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Meter creation date."
                          },
                          "updatedAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date that Meter was last modified."
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified location.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "location Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meters"
          ]
        },
        "delete": {
          "summary": "Delete meter",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meter",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the meter"
            },
            "400": {
              "description": "Failed to Delete the meter",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified meter.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "meter Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meters"
          ]
        }
      },
      "/meters/{meterId}/readings": {
        "post": {
          "summary": "Create new meter reading",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "meterId",
              "in": "path",
              "required": true,
              "description": "ID of the meter",
              "example": "123"
            }
          ],
          "requestBody": {
            "description": "Meter Reading to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "readingValue"
                  ],
                  "properties": {
                    "readingValue": {
                      "type": "number",
                      "description": "The reading value given by the meter.",
                      "example": 120
                    },
                    "readingDate": {
                      "type": "string",
                      "example": "2020-07-22T14:01:00Z",
                      "description": "Reading date when the meter was read. This date can be set in the past, but cannot go further than 3 days for IoT meters.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created reading",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id",
                      "readingValue"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": 963,
                        "description": "Global ID of the reading.\nIoT meters will produce IDs with the format '{meterId}-{uuid}', while manual meters will produce numbered IDs."
                      },
                      "createdAt": {
                        "type": "string",
                        "example": "2022-01-01T00:00:00.000Z",
                        "description": "Reading creation or processing date."
                      },
                      "readingDate": {
                        "type": "string",
                        "example": "2020-07-22T14:01:00Z",
                        "description": "Reading date when the meter was read. This date can be set in the past, but cannot go further than 3 days for IoT meters.",
                        "nullable": true
                      },
                      "readingValue": {
                        "type": "number",
                        "description": "The reading value given by the meter.",
                        "example": 120
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the reading",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "errors with request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "429": {
              "description": "Too many requests. Please retry in 10 seconds",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Too many requests. Please retry in 10 seconds"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meters"
          ]
        }
      },
      "/metertriggers": {
        "post": {
          "summary": "Create meter trigger",
          "requestBody": {
            "description": "The meter trigger to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The meter triger data",
                  "required": [
                    "meterTrigger"
                  ],
                  "properties": {
                    "meterTrigger": {
                      "required": [
                        "meterId",
                        "amount",
                        "condition",
                        "name"
                      ],
                      "type": "object",
                      "properties": {
                        "meterId": {
                          "type": "integer"
                        },
                        "workOrderTemplateId": {
                          "type": "integer",
                          "description": "Id of an existing work order template. Once this is set, the `workOrderTemplate` object will completely be ignored in favour of the work order template associated with the id. NOTE: If this is set, the name of the meter trigger will match the name of the linked work order template."
                        },
                        "amount": {
                          "type": "number"
                        },
                        "condition": {
                          "type": "string",
                          "enum": [
                            "DECREMENTED_BY",
                            "INCREMENTED_BY",
                            "IS_EQUAL",
                            "IS_GREATER",
                            "IS_LESS",
                            "INCREMENTED_BY_BASED_ON_LAST_READING",
                            "DECREMENTED_BY_BASED_ON_LAST_READING"
                          ]
                        },
                        "dataPoints": {
                          "type": "object",
                          "required": [
                            "numerator",
                            "denominator"
                          ],
                          "properties": {
                            "numerator": {
                              "type": "integer",
                              "description": "The number of data points out of \"denominator\" data points to trigger. E.g: 3 points out of 5 must be in a triggering state"
                            },
                            "denominator": {
                              "type": "integer",
                              "description": "The window of points where the condition gets checked"
                            }
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "minDateForProcessing": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date that the trigger will start to be active"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the trigger"
                        },
                        "nextTriggerValue": {
                          "type": "number",
                          "description": "Can be set to override the first trigger value"
                        },
                        "period": {
                          "type": "integer",
                          "description": "Window in seconds where the data points can be checked",
                          "nullable": true
                        }
                      }
                    },
                    "workOrderTemplate": {
                      "type": "object",
                      "properties": {
                        "procedureTemplateId": {
                          "nullable": true,
                          "type": "integer",
                          "description": "ID of the procedure template used"
                        },
                        "saveProcedureAsTemplate": {
                          "type": "boolean",
                          "nullable": true,
                          "description": "Save the procedure in data as a new procedure template"
                        },
                        "title": {
                          "deprecated": true,
                          "type": "string",
                          "description": "Title of the work order that will be generated. Use the meter trigger's name instead. If both `workOrderTemplate.title` and `meterTrigger.name` are provided, `meterTrigger.name` will be used."
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "assetId": {
                              "nullable": true,
                              "type": "integer"
                            },
                            "assigneeIds": {
                              "type": "array",
                              "description": "Users IDs assigned to the template",
                              "items": {
                                "type": "number",
                                "example": 1
                              }
                            },
                            "description": {
                              "nullable": true,
                              "type": "string",
                              "example": "A work order sample description"
                            },
                            "dueDate": {
                              "type": "object",
                              "nullable": true,
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "OFFSET"
                                  ]
                                },
                                "offset": {
                                  "type": "number"
                                }
                              }
                            },
                            "locationId": {
                              "nullable": true,
                              "type": "integer",
                              "description": "Global ID of the location assigned to the work order"
                            },
                            "partsUsed": {
                              "type": "array",
                              "nullable": true,
                              "items": {
                                "type": "object",
                                "properties": {
                                  "partId": {
                                    "type": "integer",
                                    "example": 963,
                                    "description": "Global ID of the part"
                                  },
                                  "quantityUsed": {
                                    "type": "integer",
                                    "description": "Quantity used in the work order.",
                                    "example": 120
                                  },
                                  "copyOnRecurring": {
                                    "type": "string",
                                    "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                    "default": "Default",
                                    "enum": [
                                      "NoCopy",
                                      "Copy",
                                      "Default"
                                    ]
                                  }
                                }
                              }
                            },
                            "priority": {
                              "type": "string",
                              "example": "MEDIUM",
                              "enum": [
                                "NONE",
                                "LOW",
                                "MEDIUM",
                                "HIGH"
                              ]
                            },
                            "procedure": {
                              "type": "object",
                              "nullable": true,
                              "required": [
                                "title",
                                "fields"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 1234,
                                  "deprecated": true,
                                  "description": "You should favor 'procedureTemplateId' to attach a procedure template."
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Title of the procedure",
                                  "example": "Control dashboard audit"
                                },
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "type",
                                      "label"
                                    ],
                                    "properties": {
                                      "label": {
                                        "type": "string",
                                        "example": "Metal Parts: broken, loose, dented, rusty, missing"
                                      },
                                      "type": {
                                        "type": "string",
                                        "example": "INSPECTION_CHECK",
                                        "enum": [
                                          "NUMBER",
                                          "AMOUNT",
                                          "TEXT",
                                          "UNSUPPORTED",
                                          "HEADING",
                                          "FILE",
                                          "SIGNATURE",
                                          "MULTIPLE_CHOICE",
                                          "INSPECTION_CHECK",
                                          "YES_NO_NA",
                                          "CHECKBOX",
                                          "CHECKLIST",
                                          "METER",
                                          "DATE"
                                        ]
                                      },
                                      "description": {
                                        "type": "string",
                                        "nullable": true
                                      },
                                      "choices": {
                                        "type": "array",
                                        "items": {
                                          "example": "Partially",
                                          "type": "string"
                                        }
                                      },
                                      "urls": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "required": [
                                            "link"
                                          ],
                                          "properties": {
                                            "label": {
                                              "type": "string",
                                              "description": "Label of the url",
                                              "example": "maintainsoft Website"
                                            },
                                            "link": {
                                              "type": "string",
                                              "description": "Link",
                                              "example": "www.getmaintainsoft.com"
                                            }
                                          }
                                        }
                                      },
                                      "meterId": {
                                        "type": "number",
                                        "example": 1,
                                        "nullable": true,
                                        "description": "Id of the meter"
                                      },
                                      "isDateAndTime": {
                                        "type": "boolean",
                                        "description": "Indicate if a DATE field also contains the time"
                                      },
                                      "index": {
                                        "type": "number",
                                        "example": 1,
                                        "description": "Order which the row is displayed"
                                      }
                                    }
                                  },
                                  "description": "Steps of a procedure"
                                }
                              }
                            },
                            "tagsIds": {
                              "type": "array",
                              "description": "Categories IDs",
                              "items": {
                                "type": "number",
                                "example": 1
                              }
                            },
                            "teamIds": {
                              "type": "array",
                              "description": "Teams IDs",
                              "items": {
                                "type": "number",
                                "example": 1
                              }
                            },
                            "title": {
                              "type": "string",
                              "deprecated": true,
                              "description": "Use the `title` field at the root level. If both `title` and `data.title` are provided, `title` will be used."
                            },
                            "vendorIds": {
                              "type": "array",
                              "description": "Vendor IDs",
                              "items": {
                                "type": "number",
                                "example": 1
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the meter trigger",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": 1,
                        "description": "Id of the meter trigger"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the meter trigger",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Unexpected error"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Meter Triggers"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List meter triggers",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Meter Triggers returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "meters",
              "schema": {
                "type": "array",
                "title": "meter ID filters",
                "description": "To filter by multiple meter IDs: `meters=630&meters=634`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Meter Triggers list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "meterTriggers"
                    ],
                    "properties": {
                      "meterTriggers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "meterId"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 963,
                              "description": "Global ID of the trigger."
                            },
                            "name": {
                              "type": "string",
                              "example": "Thermometer #4"
                            },
                            "meterId": {
                              "type": "number",
                              "example": 53,
                              "description": "Global ID of the meter."
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Meter Triggers.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Meter Triggers.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        }
      },
      "/metertriggers/{id}": {
        "get": {
          "summary": "Get meter trigger",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meterTrigger",
              "example": "1"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "work_order_template"
                  ]
                }
              }
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved meterTrigger's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "meterTrigger"
                    ],
                    "properties": {
                      "meterTrigger": {
                        "type": "object",
                        "required": [
                          "id",
                          "meterId",
                          "organizationId",
                          "amount",
                          "condition",
                          "createdAt",
                          "creatorId",
                          "dataPoints",
                          "deletedAt",
                          "description",
                          "minDateForProcessing",
                          "name",
                          "nextTriggerValue",
                          "period",
                          "state",
                          "updatedAt",
                          "workOrderTemplateId"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Global ID of the meter trigger"
                          },
                          "meterId": {
                            "type": "integer",
                            "description": "Global ID of the meter"
                          },
                          "organizationId": {
                            "type": "integer",
                            "description": "Global ID of the organization"
                          },
                          "amount": {
                            "type": "number",
                            "description": "Value used to trigger the condition"
                          },
                          "condition": {
                            "type": "string",
                            "description": "Condition of the trigger",
                            "enum": [
                              "DECREMENTED_BY",
                              "INCREMENTED_BY",
                              "IS_EQUAL",
                              "IS_GREATER",
                              "IS_LESS",
                              "INCREMENTED_BY_BASED_ON_LAST_READING",
                              "DECREMENTED_BY_BASED_ON_LAST_READING"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "Date at which the meter was created",
                            "format": "date-time"
                          },
                          "creatorId": {
                            "type": "integer",
                            "description": "Global ID of the meter trigger's creator"
                          },
                          "dataPoints": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "numerator": {
                                "type": "integer",
                                "description": "The number of data points out of \"denominator\" data points to trigger. E.g: 3 points out of 5 must be in a triggering state"
                              },
                              "denominator": {
                                "type": "integer",
                                "description": "The window of points where the condition gets checked"
                              }
                            }
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "Data at which the meter was delated",
                            "format": "date-time"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "minDateForProcessing": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date that the trigger will start to be active",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the trigger"
                          },
                          "nextTriggerValue": {
                            "type": "number",
                            "description": "Can be set to override the first trigger value",
                            "nullable": true
                          },
                          "period": {
                            "type": "integer",
                            "description": "Window in seconds where the data points can be checked",
                            "nullable": true
                          },
                          "state": {
                            "type": "string",
                            "description": "State of the trigger",
                            "enum": [
                              "INACTIVE",
                              "INSUFFICIENT_DATA",
                              "PENDING",
                              "STABLE",
                              "TRIGGERED"
                            ]
                          },
                          "updatedAt": {
                            "type": "string",
                            "description": "Date at which the meter was updated",
                            "format": "date-time"
                          },
                          "workOrderTemplateId": {
                            "type": "integer",
                            "description": "Global ID of the work order template used by the meter trigger",
                            "nullable": true
                          },
                          "workOrderTemplate": {
                            "type": "object",
                            "description": "Work Order template used by the meter trigger (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Global ID of the work order template"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the work order template was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "creatorId": {
                                "nullable": true,
                                "type": "integer",
                                "description": "ID of the user who created the work order"
                              },
                              "deletedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time",
                                "description": "Time at which the template was deleted",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "organizationId": {
                                "nullable": true,
                                "type": "integer",
                                "description": "ID of the organization"
                              },
                              "procedureTemplateId": {
                                "nullable": true,
                                "type": "integer",
                                "description": "ID of the procedure template used if in the library"
                              },
                              "title": {
                                "type": "string",
                                "deprecated": true,
                                "description": "Title of the work order that will be generated. Use the meter trigger's name instead"
                              },
                              "updatedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time",
                                "description": "Time at which the template was updated",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "data": {
                                "type": "object",
                                "properties": {
                                  "assetId": {
                                    "nullable": true,
                                    "type": "integer",
                                    "description": "Global ID of the asset assigned to the work order"
                                  },
                                  "assigneeIds": {
                                    "type": "array",
                                    "description": "Users IDs assigned to the template",
                                    "items": {
                                      "type": "number",
                                      "example": 1
                                    }
                                  },
                                  "attachmentIds": {
                                    "nullable": true,
                                    "type": "array",
                                    "items": {
                                      "type": "number",
                                      "example": 1
                                    },
                                    "description": "IDs of the attachments on the template"
                                  },
                                  "description": {
                                    "nullable": true,
                                    "type": "string",
                                    "example": "A work order sample description"
                                  },
                                  "dueDate": {
                                    "type": "object",
                                    "nullable": true,
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "OFFSET"
                                        ]
                                      },
                                      "offset": {
                                        "type": "number"
                                      }
                                    }
                                  },
                                  "locationId": {
                                    "nullable": true,
                                    "type": "integer",
                                    "description": "Global ID of the location assigned to the work order"
                                  },
                                  "partsUsed": {
                                    "type": "array",
                                    "nullable": true,
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "integer",
                                          "example": 963,
                                          "description": "Global ID of the part"
                                        },
                                        "name": {
                                          "type": "string",
                                          "example": "Locknut - 1/8"
                                        },
                                        "description": {
                                          "type": "string",
                                          "nullable": true,
                                          "example": ""
                                        },
                                        "area": {
                                          "type": "string",
                                          "example": "tool room",
                                          "nullable": true
                                        },
                                        "unitCost": {
                                          "type": "integer",
                                          "nullable": true,
                                          "description": "Cost in cents. For example, for $1.20, put 120.",
                                          "example": 120
                                        },
                                        "availableQuantity": {
                                          "type": "integer",
                                          "description": "Quantity currently in stock",
                                          "example": 10
                                        },
                                        "minimumQuantity": {
                                          "type": "integer",
                                          "description": "Minimum quantity before you should restock",
                                          "example": 5
                                        },
                                        "barcode": {
                                          "type": "string",
                                          "nullable": true,
                                          "example": "bWFpbnRhaW54Cg==",
                                          "description": "String encoded barcode"
                                        },
                                        "quantityUsed": {
                                          "type": "integer",
                                          "description": "Quantity used in the work order.",
                                          "example": 120
                                        },
                                        "copyOnRecurring": {
                                          "type": "string",
                                          "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                          "default": "Default",
                                          "enum": [
                                            "NoCopy",
                                            "Copy",
                                            "Default"
                                          ]
                                        },
                                        "extraFields": {
                                          "type": "object",
                                          "additionalProperties": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "priority": {
                                    "type": "string",
                                    "example": "MEDIUM",
                                    "enum": [
                                      "NONE",
                                      "LOW",
                                      "MEDIUM",
                                      "HIGH"
                                    ]
                                  },
                                  "procedure": {
                                    "type": "object",
                                    "nullable": true,
                                    "required": [
                                      "title",
                                      "fields"
                                    ],
                                    "properties": {
                                      "title": {
                                        "example": "Control dashboard audit",
                                        "type": "string"
                                      },
                                      "fields": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "required": [
                                            "id",
                                            "label",
                                            "type"
                                          ],
                                          "properties": {
                                            "id": {
                                              "type": "number",
                                              "example": 1
                                            },
                                            "label": {
                                              "type": "string",
                                              "example": "Metal Parts: broken, loose, dented, rusty, missing"
                                            },
                                            "type": {
                                              "type": "string",
                                              "example": "INSPECTION_CHECK",
                                              "enum": [
                                                "NUMBER",
                                                "AMOUNT",
                                                "TEXT",
                                                "UNSUPPORTED",
                                                "HEADING",
                                                "FILE",
                                                "SIGNATURE",
                                                "MULTIPLE_CHOICE",
                                                "INSPECTION_CHECK",
                                                "YES_NO_NA",
                                                "CHECKBOX",
                                                "CHECKLIST",
                                                "METER",
                                                "DATE"
                                              ]
                                            },
                                            "description": {
                                              "type": "string",
                                              "nullable": true
                                            },
                                            "choices": {
                                              "type": "array",
                                              "nullable": true,
                                              "items": {
                                                "example": "Partially",
                                                "type": "string"
                                              }
                                            },
                                            "meterId": {
                                              "type": "number",
                                              "nullable": true,
                                              "items": {
                                                "example": 1,
                                                "type": "number"
                                              }
                                            },
                                            "isDateAndTime": {
                                              "type": "boolean",
                                              "nullable": true,
                                              "description": "Indicate if a DATE field also contains the time",
                                              "example": false
                                            },
                                            "attachmentId": {
                                              "type": "number",
                                              "nullable": true,
                                              "example": 1
                                            },
                                            "attachments": {
                                              "type": "array",
                                              "title": "attachment",
                                              "description": "List of attachments linked to the procedure row",
                                              "items": {
                                                "type": "object",
                                                "title": "attachment",
                                                "required": [
                                                  "id",
                                                  "mimeType",
                                                  "fileName",
                                                  "url",
                                                  "createdAt"
                                                ],
                                                "properties": {
                                                  "id": {
                                                    "type": "number",
                                                    "description": "Global ID of the attachment",
                                                    "example": 12345
                                                  },
                                                  "mimeType": {
                                                    "type": "string",
                                                    "description": "MIME type of the file",
                                                    "example": "image/png"
                                                  },
                                                  "fileName": {
                                                    "type": "string",
                                                    "description": "Attachment's file name",
                                                    "example": "image.png"
                                                  },
                                                  "url": {
                                                    "type": "string",
                                                    "description": "Url of the file",
                                                    "example": "http://example.com/image.png"
                                                  },
                                                  "createdAt": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "description": "Date & time at which the attachment was uploaded",
                                                    "example": "2022-01-01T00:00:00.000Z"
                                                  },
                                                  "width": {
                                                    "type": "number",
                                                    "description": "Width if the file is an image",
                                                    "nullable": true,
                                                    "example": 220
                                                  },
                                                  "height": {
                                                    "type": "number",
                                                    "description": "Height if the file is an image",
                                                    "nullable": true,
                                                    "example": 100
                                                  }
                                                }
                                              }
                                            },
                                            "urls": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "required": [
                                                  "link"
                                                ],
                                                "properties": {
                                                  "label": {
                                                    "type": "string",
                                                    "description": "Label of the url",
                                                    "example": "maintainsoft Website"
                                                  },
                                                  "link": {
                                                    "type": "string",
                                                    "description": "Link",
                                                    "example": "www.getmaintainsoft.com"
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "tagsIds": {
                                    "type": "array",
                                    "description": "Categories IDs",
                                    "items": {
                                      "type": "number",
                                      "example": 1
                                    }
                                  },
                                  "teamIds": {
                                    "type": "array",
                                    "description": "Teams IDs",
                                    "items": {
                                      "type": "number",
                                      "example": 1
                                    }
                                  },
                                  "thumbnailId": {
                                    "nullable": true,
                                    "type": "integer",
                                    "description": "ID of the attachment used as thumbnail"
                                  },
                                  "title": {
                                    "type": "string",
                                    "deprecated": true,
                                    "description": "Use the `title` field outside of the data object instead"
                                  },
                                  "vendorIds": {
                                    "type": "array",
                                    "description": "Vendor IDs",
                                    "items": {
                                      "type": "number",
                                      "example": 1
                                    }
                                  }
                                }
                              }
                            },
                            "nullable": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified meterTrigger or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        },
        "patch": {
          "summary": "Update meter trigger",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order template",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "The meter trigger to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The meter trigger update data",
                  "properties": {
                    "meterTrigger": {
                      "type": "object",
                      "properties": {
                        "meterId": {
                          "type": "integer"
                        },
                        "workOrderTemplateId": {
                          "type": "integer",
                          "description": "Id of an existing work order template. NOTE: If this changes, the name of the meter trigger will also changed to match the name of the linked work order template."
                        },
                        "amount": {
                          "type": "number"
                        },
                        "condition": {
                          "type": "string",
                          "enum": [
                            "DECREMENTED_BY",
                            "INCREMENTED_BY",
                            "IS_EQUAL",
                            "IS_GREATER",
                            "IS_LESS",
                            "INCREMENTED_BY_BASED_ON_LAST_READING",
                            "DECREMENTED_BY_BASED_ON_LAST_READING"
                          ]
                        },
                        "dataPoints": {
                          "type": "object",
                          "required": [
                            "numerator",
                            "denominator"
                          ],
                          "properties": {
                            "numerator": {
                              "type": "integer",
                              "description": "The number of data points out of \"denominator\" data points to trigger. E.g: 3 points out of 5 must be in a triggering state"
                            },
                            "denominator": {
                              "type": "integer",
                              "description": "The window of points where the condition gets checked"
                            }
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "minDateForProcessing": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date that the trigger will start to be active"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the trigger"
                        },
                        "nextTriggerValue": {
                          "type": "number",
                          "description": "Can be set to override the first trigger value"
                        },
                        "period": {
                          "type": "integer",
                          "description": "Window in seconds where the data points can be checked",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "204": {
              "description": "Successfully updated the meter trigger"
            },
            "400": {
              "description": "Failed to create the meter trigger",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Unexpected error"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified meter trigger.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "meter trigger Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        },
        "delete": {
          "summary": "Delete meterTrigger",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meterTrigger",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the meterTrigger"
            },
            "400": {
              "description": "Failed to Delete the meterTrigger",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified meterTrigger.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "meterTrigger Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        }
      },
      "/metertriggers/{id}/workordertemplates/attachments/{filename}": {
        "delete": {
          "summary": "Remove meter trigger's work order template attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meter trigger's work order template.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed meter trigger's work order template's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        },
        "put": {
          "summary": "Update meter trigger's work order template attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meter trigger's work order template.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated meter trigger's work order template's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified meter trigger's work order template.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "meter trigger's work order template Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        }
      },
      "/metertriggers/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update meter trigger's work order template's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the meter trigger's work order template.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the meter trigger's work order template thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated meter trigger's work order template's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Meter Trigger's Work Order Template.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Meter Trigger's Work Order Template Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        }
      },
      "/metertriggers/{id}/workordertemplates": {
        "patch": {
          "summary": "Update Meter Trigger's Work Order Template",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order template",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Data to update a work order template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "procedureTemplateId": {
                      "nullable": true,
                      "type": "integer",
                      "description": "ID of the procedure template used"
                    },
                    "saveProcedureAsTemplate": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "Save the procedure in data as a new procedure template"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title of the work order that will be generated. Same string for meter trigger's name. Setting this will also set the corresponding meter's trigger name."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "assetId": {
                          "nullable": true,
                          "type": "integer"
                        },
                        "assigneeIds": {
                          "type": "array",
                          "description": "Users IDs assigned to the template",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        },
                        "description": {
                          "nullable": true,
                          "type": "string",
                          "example": "A work order sample description"
                        },
                        "dueDate": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "OFFSET"
                              ]
                            },
                            "offset": {
                              "type": "number"
                            }
                          }
                        },
                        "locationId": {
                          "nullable": true,
                          "type": "integer",
                          "description": "Global ID of the location assigned to the work order"
                        },
                        "partsUsed": {
                          "type": "array",
                          "nullable": true,
                          "items": {
                            "type": "object",
                            "properties": {
                              "partId": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the part"
                              },
                              "quantityUsed": {
                                "type": "integer",
                                "description": "Quantity used in the work order.",
                                "example": 120
                              },
                              "copyOnRecurring": {
                                "type": "string",
                                "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                "default": "Default",
                                "enum": [
                                  "NoCopy",
                                  "Copy",
                                  "Default"
                                ]
                              }
                            }
                          }
                        },
                        "priority": {
                          "type": "string",
                          "example": "MEDIUM",
                          "enum": [
                            "NONE",
                            "LOW",
                            "MEDIUM",
                            "HIGH"
                          ]
                        },
                        "procedure": {
                          "type": "object",
                          "nullable": true,
                          "required": [
                            "title",
                            "fields"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 1234,
                              "deprecated": true,
                              "description": "You should favor 'procedureTemplateId' to attach a procedure template."
                            },
                            "title": {
                              "type": "string",
                              "description": "Title of the procedure",
                              "example": "Control dashboard audit"
                            },
                            "fields": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "type",
                                  "label"
                                ],
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "example": "Metal Parts: broken, loose, dented, rusty, missing"
                                  },
                                  "type": {
                                    "type": "string",
                                    "example": "INSPECTION_CHECK",
                                    "enum": [
                                      "NUMBER",
                                      "AMOUNT",
                                      "TEXT",
                                      "UNSUPPORTED",
                                      "HEADING",
                                      "FILE",
                                      "SIGNATURE",
                                      "MULTIPLE_CHOICE",
                                      "INSPECTION_CHECK",
                                      "YES_NO_NA",
                                      "CHECKBOX",
                                      "CHECKLIST",
                                      "METER",
                                      "DATE"
                                    ]
                                  },
                                  "description": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "choices": {
                                    "type": "array",
                                    "items": {
                                      "example": "Partially",
                                      "type": "string"
                                    }
                                  },
                                  "urls": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "link"
                                      ],
                                      "properties": {
                                        "label": {
                                          "type": "string",
                                          "description": "Label of the url",
                                          "example": "maintainsoft Website"
                                        },
                                        "link": {
                                          "type": "string",
                                          "description": "Link",
                                          "example": "www.getmaintainsoft.com"
                                        }
                                      }
                                    }
                                  },
                                  "meterId": {
                                    "type": "number",
                                    "example": 1,
                                    "nullable": true,
                                    "description": "Id of the meter"
                                  },
                                  "isDateAndTime": {
                                    "type": "boolean",
                                    "description": "Indicate if a DATE field also contains the time"
                                  },
                                  "index": {
                                    "type": "number",
                                    "example": 1,
                                    "description": "Order which the row is displayed"
                                  }
                                }
                              },
                              "description": "Steps of a procedure"
                            }
                          }
                        },
                        "tagsIds": {
                          "type": "array",
                          "description": "Categories IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        },
                        "teamIds": {
                          "type": "array",
                          "description": "Teams IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        },
                        "title": {
                          "type": "string",
                          "deprecated": true,
                          "description": "Use the `title` field at the root level. If both `title` and `data.title` are provided, `title` will be used."
                        },
                        "vendorIds": {
                          "type": "array",
                          "description": "Vendor IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "204": {
              "description": "Successfully edited the procedure template"
            },
            "400": {
              "description": "Bad request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Bad request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified work order template.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "work order template Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Meter Triggers"
          ]
        }
      },
      "/parts": {
        "post": {
          "summary": "Create new part",
          "requestBody": {
            "description": "Part to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Locknut - 1/8"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true
                    },
                    "area": {
                      "type": "string",
                      "example": "tool room",
                      "nullable": true
                    },
                    "unitCost": {
                      "type": "integer",
                      "description": "Cost in cents. For example, for $1.20, put 120.",
                      "example": 120,
                      "nullable": true
                    },
                    "availableQuantity": {
                      "type": "integer",
                      "description": "Quantity currently in stock",
                      "example": 10
                    },
                    "minimumQuantity": {
                      "type": "integer",
                      "description": "Minimum quantity before you should restock",
                      "example": 5
                    },
                    "barcode": {
                      "type": "string",
                      "nullable": true,
                      "example": "bWFpbnRhaW54Cg==",
                      "description": "String encoded barcode"
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the location where the part is located"
                    },
                    "partTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "List of part types"
                    },
                    "assetIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [12, 4561],
                      "description": "List of asset IDs"
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [1, 4],
                      "description": "List of team IDs in charge of the part"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Part Number": "000000000"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [23, 56],
                      "description": "List of vendor IDs"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created part",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the part"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Parts"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List parts",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Parts returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "customFieldName",
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter parts by custom field value. Your query parameter should be your custom field name. (ie: To filter by a custom field named \"Industry\" with the value \"Construction\", you would do this \"/parts?Industry=Construction\").\n                    \u003Cbr\u003E\u003Cbr\u003EAdding multiple instance of the same custom field act as an \u003Ccode\u003EOR\u003C/code\u003E and adding a different custom field act as an \u003Ccode\u003EAND\u003C/code\u003E. (ie: To filter by a custom field named \u003Ccode\u003EIndustry\u003C/code\u003E with the value \u003Ccode\u003EConstruction\u003C/code\u003E OR \u003Ccode\u003ETransportation\u003C/code\u003E AND the custom field \u003Ccode\u003EManufacturer\u003C/code\u003E with the value \u003Ccode\u003EACME\u003C/code\u003E, you would do this \u003Ccode\u003E/parts?Industry=Construction&Industry=Transportation&Manufacturer=ACME\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003EIf your custom field label is the same as a reserved query parameter such as \u003Ccode\u003Elimit\u003C/code\u003E, \u003Ccode\u003Esort\u003C/code\u003E, \u003Ccode\u003Eexpand\u003C/code\u003E, etc, you can add \u003Ccode\u003E__c\u003C/code\u003E to your custom field filtering (ie: To filter by a custom field named \u003Ccode\u003Elimit\u003C/code\u003E with the value \u003Ccode\u003Eten\u003C/code\u003E, you would do this \u003Ccode\u003E/parts?limit__c=ten\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003ENote that your custom field needs to be created beforehand. Only number and single line text custom field types are supported."
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "extra_fields"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Parts list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "parts"
                    ],
                    "properties": {
                      "parts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "description",
                            "barcode",
                            "locationId",
                            "area",
                            "unitCost",
                            "availableQuantity",
                            "minimumQuantity",
                            "partTypes",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the part"
                            },
                            "name": {
                              "type": "string",
                              "example": "Locknut - 1/8"
                            },
                            "description": {
                              "type": "string",
                              "nullable": true,
                              "example": ""
                            },
                            "barcode": {
                              "type": "string",
                              "nullable": true,
                              "example": "bWFpbnRhaW54Cg==",
                              "description": "String encoded barcode"
                            },
                            "locationId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 852,
                              "description": "ID of the location where the part is located"
                            },
                            "area": {
                              "type": "string",
                              "example": "tool room",
                              "nullable": true
                            },
                            "unitCost": {
                              "type": "integer",
                              "description": "Cost in cents. For example, for $1.20, put 120.",
                              "example": 120,
                              "nullable": true
                            },
                            "availableQuantity": {
                              "type": "integer",
                              "description": "Quantity currently in stock",
                              "example": 10
                            },
                            "minimumQuantity": {
                              "type": "integer",
                              "description": "Minimum quantity before you should restock",
                              "example": 5
                            },
                            "partTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "List of part types"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the part was created",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the part was last updated. This doesn't include comments",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "extraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\") (expand with query parameter)",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Part Number": "000000000"
                              },
                              "nullable": false
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Parts.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Parts.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Parts"
          ]
        }
      },
      "/parts/{id}": {
        "get": {
          "summary": "Get part",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the part",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved part's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "part"
                    ],
                    "properties": {
                      "part": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the part"
                          },
                          "name": {
                            "type": "string",
                            "example": "Locknut - 1/8"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": ""
                          },
                          "area": {
                            "type": "string",
                            "example": "tool room",
                            "nullable": true
                          },
                          "unitCost": {
                            "type": "integer",
                            "description": "Cost in cents. For example, for $1.20, put 120.",
                            "example": 120,
                            "nullable": true
                          },
                          "availableQuantity": {
                            "type": "integer",
                            "description": "Quantity currently in stock",
                            "example": 10
                          },
                          "minimumQuantity": {
                            "type": "integer",
                            "description": "Minimum quantity before you should restock",
                            "example": 5
                          },
                          "barcode": {
                            "type": "string",
                            "nullable": true,
                            "example": "bWFpbnRhaW54Cg==",
                            "description": "String encoded barcode"
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the location where the part is located"
                          },
                          "partTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List of part types"
                          },
                          "assetIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [12, 4561],
                            "description": "List of asset IDs"
                          },
                          "teamIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [1, 4],
                            "description": "List of team IDs in charge of the part"
                          },
                          "vendors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "vendorId": {
                                  "type": "integer",
                                  "example": "1",
                                  "description": "Id of the vendor"
                                },
                                "partNumber": {
                                  "type": "string",
                                  "example": "XC230",
                                  "description": "Part number given to the part by this vendor"
                                }
                              }
                            }
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Part Number": "000000000"
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [23, 56],
                            "description": "List of vendor IDs",
                            "deprecated": true
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the part",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the part was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the part was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date at which the part was deleted",
                            "example": "2022-01-01T00:00:00.000Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified part or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Parts"
          ]
        },
        "patch": {
          "summary": "Update part information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the part",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Part to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Locknut - 1/8"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true
                    },
                    "area": {
                      "type": "string",
                      "example": "tool room",
                      "nullable": true
                    },
                    "unitCost": {
                      "type": "integer",
                      "description": "Cost in cents. For example, for $1.20, put 120.",
                      "example": 120,
                      "nullable": true
                    },
                    "availableQuantity": {
                      "type": "integer",
                      "description": "Quantity currently in stock",
                      "example": 10
                    },
                    "minimumQuantity": {
                      "type": "integer",
                      "description": "Minimum quantity before you should restock",
                      "example": 5
                    },
                    "barcode": {
                      "type": "string",
                      "nullable": true,
                      "example": "bWFpbnRhaW54Cg==",
                      "description": "String encoded barcode"
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the location where the part is located"
                    },
                    "partTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "List of part types"
                    },
                    "assetIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [12, 4561],
                      "description": "List of asset IDs"
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [1, 4],
                      "description": "List of team IDs in charge of the part"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Part Number": "000000000"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [23, 56],
                      "description": "List of vendor IDs",
                      "deprecated": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the part was created",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the part was last updated. This doesn't include comments",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "description": "Date at which the part was deleted",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited part",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "part"
                    ],
                    "properties": {
                      "part": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the part"
                          },
                          "name": {
                            "type": "string",
                            "example": "Locknut - 1/8"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": ""
                          },
                          "area": {
                            "type": "string",
                            "example": "tool room",
                            "nullable": true
                          },
                          "unitCost": {
                            "type": "integer",
                            "description": "Cost in cents. For example, for $1.20, put 120.",
                            "example": 120,
                            "nullable": true
                          },
                          "availableQuantity": {
                            "type": "integer",
                            "description": "Quantity currently in stock",
                            "example": 10
                          },
                          "minimumQuantity": {
                            "type": "integer",
                            "description": "Minimum quantity before you should restock",
                            "example": 5
                          },
                          "barcode": {
                            "type": "string",
                            "nullable": true,
                            "example": "bWFpbnRhaW54Cg==",
                            "description": "String encoded barcode"
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the location where the part is located"
                          },
                          "partTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List of part types"
                          },
                          "assetIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [12, 4561],
                            "description": "List of asset IDs"
                          },
                          "teamIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [1, 4],
                            "description": "List of team IDs in charge of the part"
                          },
                          "vendors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "vendorId": {
                                  "type": "integer",
                                  "example": "1",
                                  "description": "Id of the vendor"
                                },
                                "partNumber": {
                                  "type": "string",
                                  "example": "XC230",
                                  "description": "Part number given to the part by this vendor"
                                }
                              }
                            }
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Part Number": "000000000"
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [23, 56],
                            "description": "List of vendor IDs",
                            "deprecated": true
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the part",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the part was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the part was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date at which the part was deleted",
                            "example": "2022-01-01T00:00:00.000Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified part.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "part Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Parts"
          ]
        },
        "delete": {
          "summary": "Delete part",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the part",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the part"
            },
            "400": {
              "description": "Failed to Delete the part",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified part.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "part Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Parts"
          ]
        }
      },
      "/parts/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update part attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the part.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated part's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified part.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "part Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Parts"
          ]
        },
        "delete": {
          "summary": "Remove part attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the part.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed part's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Parts"
          ]
        }
      },
      "/parts/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update part's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the part.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the part thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated part's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Part.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Part Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Parts"
          ]
        }
      },
      "/parttransferrequests": {
        "post": {
          "summary": "Create a part transfer request",
          "requestBody": {
            "description": "PartTransferRequest to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "quantityRequested",
                    "sourcePartId",
                    "destinationPartId"
                  ],
                  "properties": {
                    "quantityRequested": {
                      "type": "integer",
                      "example": 3,
                      "description": "Quantity of parts requested for transfer."
                    },
                    "sourcePartId": {
                      "type": "integer",
                      "format": "integer",
                      "description": "ID of the part that belongs to the organization receiving the request. (Sending stocks)",
                      "example": 843
                    },
                    "destinationPartId": {
                      "type": "integer",
                      "format": "integer",
                      "description": "ID of the part that belongs to the organization performing the request. (Receiving stocks)",
                      "example": 852
                    },
                    "requestMessage": {
                      "type": "string",
                      "example": "Would you please send us five ball screws for our cnc machine?",
                      "description": "Message to give context surrounding the part transfer request.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created part transfer request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the part transfer request."
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Part.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Part Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Part Transfer Requests"
          ]
        },
        "get": {
          "summary": "List part transfer requests",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Part Transfer Requests returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "statuses",
              "schema": {
                "type": "array",
                "title": "status filters",
                "description": "To filter by multiple status: `status=APPROVED&status=DECLINED`",
                "items": {
                  "type": "string",
                  "enum": [
                    "APPROVED",
                    "CANCELED",
                    "COMPLETED",
                    "DECLINED",
                    "PENDING"
                  ]
                }
              },
              "in": "query"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Part Transfer Requests list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "partTransferRequests"
                    ],
                    "properties": {
                      "partTransferRequests": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "destinationOrganizationId",
                            "sourceOrganizationId",
                            "sourcePartId",
                            "destinationPartId",
                            "quantityRequested"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the part transfer request."
                            },
                            "quantityReceived": {
                              "type": "integer",
                              "example": 2,
                              "description": "Quantity of parts received.",
                              "nullable": true
                            },
                            "quantityRequested": {
                              "type": "integer",
                              "example": 3,
                              "description": "Quantity of parts requested for transfer."
                            },
                            "quantityTransferred": {
                              "type": "integer",
                              "example": 2,
                              "description": "Quantity of parts transferred.",
                              "nullable": true
                            },
                            "requestMessage": {
                              "type": "string",
                              "example": "Would you please send us five ball screws for our cnc machine?",
                              "description": "Message to give context surrounding the part transfer request.",
                              "nullable": true
                            },
                            "responseMessage": {
                              "type": "string",
                              "example": "Sorry, we do not have enough extra ball screws to share them with you.",
                              "description": "Message to give context surrounding the transfer of the part transfer request.",
                              "nullable": true
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "APPROVED",
                                "CANCELED",
                                "COMPLETED",
                                "DECLINED",
                                "PENDING"
                              ],
                              "description": "Status of the part transfer request.",
                              "example": "PENDING"
                            },
                            "sourcePartId": {
                              "type": "integer",
                              "format": "integer",
                              "description": "ID of the part that belongs to the organization receiving the request. (Sending stocks)",
                              "example": 843
                            },
                            "destinationPartId": {
                              "type": "integer",
                              "format": "integer",
                              "description": "ID of the part that belongs to the organization performing the request. (Receiving stocks)",
                              "example": 852
                            },
                            "transferrerId": {
                              "type": "integer",
                              "format": "integer",
                              "description": "ID of the user performing the transfer. (Sending stocks)",
                              "example": 102,
                              "nullable": true
                            },
                            "requesterId": {
                              "type": "integer",
                              "format": "integer",
                              "description": "ID of the user performing the request. (Requesting/receiving stocks)",
                              "example": 201
                            },
                            "destinationOrganizationId": {
                              "type": "integer",
                              "format": "integer",
                              "description": "ID of the organization performing the request. (Requesting/receiving stocks)",
                              "example": 1001
                            },
                            "sourceOrganizationId": {
                              "type": "integer",
                              "format": "integer",
                              "description": "ID of the organization receiving the request. (Sending stocks)",
                              "example": 1002
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Part Transfer Requests.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Part Transfer Requests.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Part Transfer Requests"
          ]
        }
      },
      "/parttransferrequests/{id}": {
        "get": {
          "summary": "Get part transfer request",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the partTransferRequest",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved partTransferRequest's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "partTransferRequest"
                    ],
                    "properties": {
                      "partTransferRequest": {
                        "type": "object",
                        "required": [
                          "id",
                          "destinationOrganizationId",
                          "sourceOrganizationId",
                          "sourcePartId",
                          "destinationPartId",
                          "quantityRequested"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the part transfer request."
                          },
                          "quantityReceived": {
                            "type": "integer",
                            "example": 2,
                            "description": "Quantity of parts received.",
                            "nullable": true
                          },
                          "quantityRequested": {
                            "type": "integer",
                            "example": 3,
                            "description": "Quantity of parts requested for transfer."
                          },
                          "quantityTransferred": {
                            "type": "integer",
                            "example": 2,
                            "description": "Quantity of parts transferred.",
                            "nullable": true
                          },
                          "requestMessage": {
                            "type": "string",
                            "example": "Would you please send us five ball screws for our cnc machine?",
                            "description": "Message to give context surrounding the part transfer request.",
                            "nullable": true
                          },
                          "responseMessage": {
                            "type": "string",
                            "example": "Sorry, we do not have enough extra ball screws to share them with you.",
                            "description": "Message to give context surrounding the transfer of the part transfer request.",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "APPROVED",
                              "CANCELED",
                              "COMPLETED",
                              "DECLINED",
                              "PENDING"
                            ],
                            "description": "Status of the part transfer request.",
                            "example": "PENDING"
                          },
                          "sourcePartId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the part that belongs to the organization receiving the request. (Sending stocks)",
                            "example": 843
                          },
                          "destinationPartId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the part that belongs to the organization performing the request. (Receiving stocks)",
                            "example": 852
                          },
                          "transferrerId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the user performing the transfer. (Sending stocks)",
                            "example": 102,
                            "nullable": true
                          },
                          "requesterId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the user performing the request. (Requesting/receiving stocks)",
                            "example": 201
                          },
                          "destinationOrganizationId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the organization performing the request. (Requesting/receiving stocks)",
                            "example": 1001
                          },
                          "sourceOrganizationId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the organization receiving the request. (Sending stocks)",
                            "example": 1002
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified partTransferRequest or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Part Transfer Requests"
          ]
        },
        "patch": {
          "summary": "Update part transfer request",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the part transfer request",
              "example": "4242"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully updated part transfer request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "partTransferRequest"
                    ],
                    "properties": {
                      "partTransferRequest": {
                        "type": "object",
                        "required": [
                          "id",
                          "destinationOrganizationId",
                          "sourceOrganizationId",
                          "sourcePartId",
                          "destinationPartId",
                          "quantityRequested"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the part transfer request."
                          },
                          "quantityReceived": {
                            "type": "integer",
                            "example": 2,
                            "description": "Quantity of parts received.",
                            "nullable": true
                          },
                          "quantityRequested": {
                            "type": "integer",
                            "example": 3,
                            "description": "Quantity of parts requested for transfer."
                          },
                          "quantityTransferred": {
                            "type": "integer",
                            "example": 2,
                            "description": "Quantity of parts transferred.",
                            "nullable": true
                          },
                          "requestMessage": {
                            "type": "string",
                            "example": "Would you please send us five ball screws for our cnc machine?",
                            "description": "Message to give context surrounding the part transfer request.",
                            "nullable": true
                          },
                          "responseMessage": {
                            "type": "string",
                            "example": "Sorry, we do not have enough extra ball screws to share them with you.",
                            "description": "Message to give context surrounding the transfer of the part transfer request.",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "APPROVED",
                              "CANCELED",
                              "COMPLETED",
                              "DECLINED",
                              "PENDING"
                            ],
                            "description": "Status of the part transfer request.",
                            "example": "PENDING"
                          },
                          "sourcePartId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the part that belongs to the organization receiving the request. (Sending stocks)",
                            "example": 843
                          },
                          "destinationPartId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the part that belongs to the organization performing the request. (Receiving stocks)",
                            "example": 852
                          },
                          "transferrerId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the user performing the transfer. (Sending stocks)",
                            "example": 102,
                            "nullable": true
                          },
                          "requesterId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the user performing the request. (Requesting/receiving stocks)",
                            "example": 201
                          },
                          "destinationOrganizationId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the organization performing the request. (Requesting/receiving stocks)",
                            "example": 1001
                          },
                          "sourceOrganizationId": {
                            "type": "integer",
                            "format": "integer",
                            "description": "ID of the organization receiving the request. (Sending stocks)",
                            "example": 1002
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the part transfer request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "status is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified partTransferRequest.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "partTransferRequest Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "requestBody": {
            "description": "Part transfer request to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "APPROVED",
                        "CANCELED",
                        "COMPLETED",
                        "DECLINED",
                        "PENDING"
                      ],
                      "description": "Status of the part transfer request.",
                      "example": "PENDING"
                    },
                    "responseMessage": {
                      "type": "string",
                      "example": "Sorry, we do not have enough extra ball screws to share them with you.",
                      "description": "Message to give context surrounding the transfer of the part transfer request.",
                      "nullable": true
                    },
                    "quantity": {
                      "type": "integer",
                      "example": 42,
                      "description": "Quantity to update for the relevant status.",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Part Transfer Requests"
          ]
        }
      },
      "/purchaseorders": {
        "post": {
          "summary": "Create new purchase order",
          "requestBody": {
            "description": "Purchase Order to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "vendorId",
                    "items"
                  ],
                  "properties": {
                    "note": {
                      "type": "string",
                      "nullable": true,
                      "description": "Notes left for Purchase Orders"
                    },
                    "dueDate": {
                      "type": "string",
                      "example": "2022-01-01T00:00:00.000Z",
                      "description": "Due date of Purchase Order",
                      "nullable": true
                    },
                    "vendorId": {
                      "type": "number",
                      "example": 432,
                      "description": "ID of vendor that this Purchase Order is associated with",
                      "nullable": true
                    },
                    "overrideNumber": {
                      "type": "string",
                      "example": "A123",
                      "nullable": true,
                      "description": "Custom number/identifier for Purchase Order"
                    },
                    "vendorContactIds": {
                      "type": "array",
                      "description": "List of vendor contact IDs in the Purchase Order",
                      "items": {
                        "type": "number",
                        "example": 12
                      }
                    },
                    "shippingAddress": {
                      "type": "object",
                      "description": "Shipping address in the Purchase Order",
                      "required": [
                        "city",
                        "country",
                        "postalCode",
                        "state",
                        "street"
                      ],
                      "properties": {
                        "city": {
                          "type": "string",
                          "example": "Montreal"
                        },
                        "country": {
                          "type": "string",
                          "example": "Canada"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "H4B 5G0"
                        },
                        "state": {
                          "type": "string",
                          "example": "Quebec"
                        },
                        "street": {
                          "type": "string",
                          "example": "1909 Avenue des Canadiens-de-Montréal"
                        },
                        "label": {
                          "type": "string",
                          "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                          "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                          "nullable": true
                        }
                      },
                      "nullable": true
                    },
                    "shippingAddressId": {
                      "type": "number",
                      "description": "Shipping address Id in the Purchase Order",
                      "nullable": true
                    },
                    "billingAddress": {
                      "type": "object",
                      "description": "Billing address in the Purchase Order",
                      "required": [
                        "city",
                        "country",
                        "postalCode",
                        "state",
                        "street"
                      ],
                      "properties": {
                        "city": {
                          "type": "string",
                          "example": "Montreal"
                        },
                        "country": {
                          "type": "string",
                          "example": "Canada"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "H4B 5G0"
                        },
                        "state": {
                          "type": "string",
                          "example": "Quebec"
                        },
                        "street": {
                          "type": "string",
                          "example": "1909 Avenue des Canadiens-de-Montréal"
                        },
                        "label": {
                          "type": "string",
                          "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                          "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                          "nullable": true
                        }
                      },
                      "nullable": true
                    },
                    "billingAddressId": {
                      "type": "number",
                      "description": "Billing address Id in the Purchase Order",
                      "nullable": true
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Ordered Date": "2023-01-01"
                      }
                    },
                    "items": {
                      "type": "array",
                      "description": "List of items in the Purchase Order",
                      "items": {
                        "type": "object",
                        "required": [
                          "quantityOrdered"
                        ],
                        "properties": {
                          "partId": {
                            "type": "number",
                            "example": 43,
                            "description": "ID of the part this item is related to",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "nullable": true
                          },
                          "partNumber": {
                            "type": "string",
                            "nullable": true
                          },
                          "price": {
                            "type": "number",
                            "example": 25000,
                            "nullable": true,
                            "description": "Total price of items in cents"
                          },
                          "quantityOrdered": {
                            "type": "number",
                            "example": 4,
                            "description": "Represent the amount of units for this item that were ordered in the purchase order."
                          },
                          "quantityReceived": {
                            "type": "number",
                            "example": 3,
                            "nullable": true,
                            "description": "Represents the total amount of this specific item that has been received to date."
                          },
                          "unitCost": {
                            "type": "number",
                            "example": 125000,
                            "nullable": true,
                            "description": "Price of a single item in cents"
                          },
                          "extraFields": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` instead.",
                            "deprecated": true
                          },
                          "lineExtraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Ordered Date": "2023-01-01"
                            }
                          }
                        }
                      }
                    },
                    "costs": {
                      "type": "array",
                      "description": "List of costs in the Purchase Order",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "type",
                          "amount"
                        ],
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Sales Tax",
                            "description": "Description of the cost"
                          },
                          "type": {
                            "type": "string",
                            "example": "AMOUNT_TAXABLE",
                            "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                          },
                          "amount": {
                            "type": "number",
                            "example": 125000
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id",
                      "status",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": 135,
                        "description": "Global ID of the Purchase Order"
                      },
                      "note": {
                        "type": "string",
                        "nullable": true,
                        "description": "Notes left for Purchase Orders"
                      },
                      "reviewNote": {
                        "type": "string",
                        "nullable": true,
                        "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                      },
                      "status": {
                        "type": "string",
                        "nullable": true,
                        "example": "APPROVED",
                        "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                        "deprecated": true
                      },
                      "dueDate": {
                        "type": "string",
                        "example": "2022-01-01T00:00:00.000Z",
                        "description": "Due date of Purchase Order",
                        "nullable": true
                      },
                      "creatorId": {
                        "type": "number",
                        "example": 432,
                        "description": "ID of the user that created this Purchase Order"
                      },
                      "vendorId": {
                        "type": "number",
                        "example": 432,
                        "description": "ID of vendor that this Purchase Order is associated with",
                        "nullable": true
                      },
                      "autoGeneratedNumber": {
                        "type": "number",
                        "example": 987,
                        "nullable": true,
                        "description": "Autogenerated Purchase Order number"
                      },
                      "overrideNumber": {
                        "type": "string",
                        "example": "A123",
                        "nullable": true,
                        "description": "Custom number/identifier for Purchase Order"
                      },
                      "approverId": {
                        "type": "number",
                        "example": 135,
                        "description": "ID of the user who approved the Purchase Order",
                        "nullable": true
                      },
                      "approvalDate": {
                        "type": "string",
                        "example": "2022-01-01T00:00:00.000Z",
                        "description": "Date the Purchase Order was approved",
                        "nullable": true
                      },
                      "updatedAt": {
                        "type": "string",
                        "example": "2022-01-01T00:00:00.000Z",
                        "description": "Date the Purchase Order was last updated",
                        "nullable": true
                      },
                      "items": {
                        "type": "array",
                        "description": "List of items in the Purchase Order",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "quantityOrdered"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 23,
                              "description": "ID of the item"
                            },
                            "partId": {
                              "type": "number",
                              "example": 43,
                              "description": "ID of the part this item is related to",
                              "nullable": true
                            },
                            "name": {
                              "type": "string",
                              "nullable": true
                            },
                            "partNumber": {
                              "type": "string",
                              "nullable": true
                            },
                            "price": {
                              "type": "number",
                              "example": 25000,
                              "nullable": true,
                              "description": "Total price of items in cents"
                            },
                            "quantityOrdered": {
                              "type": "number",
                              "example": 4,
                              "description": "Represent the amount of units for this item that were ordered in the purchase order."
                            },
                            "quantityReceived": {
                              "type": "number",
                              "example": 3,
                              "nullable": true,
                              "description": "Represents the total amount of this specific item that has been received to date."
                            },
                            "unitCost": {
                              "type": "number",
                              "example": 125000,
                              "nullable": true,
                              "description": "Price of a single item in cents"
                            },
                            "extraFields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` instead.",
                              "deprecated": true
                            },
                            "lineExtraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Ordered Date": "2023-01-01"
                              }
                            },
                            "partExtraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Part Number": "321"
                              }
                            }
                          }
                        }
                      },
                      "costs": {
                        "type": "array",
                        "description": "List of costs in the Purchase Order",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "type",
                            "amount"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 123,
                              "description": "ID of the cost"
                            },
                            "name": {
                              "type": "string",
                              "example": "Sales Tax",
                              "description": "Description of the cost"
                            },
                            "type": {
                              "type": "string",
                              "example": "AMOUNT_TAXABLE",
                              "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                            },
                            "amount": {
                              "type": "number",
                              "example": 125000
                            }
                          }
                        }
                      },
                      "thumbnail": {
                        "type": "object",
                        "title": "attachment",
                        "required": [
                          "id",
                          "mimeType",
                          "fileName",
                          "url",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "description": "Global ID of the attachment",
                            "example": 12345
                          },
                          "mimeType": {
                            "type": "string",
                            "description": "MIME type of the file",
                            "example": "image/png"
                          },
                          "fileName": {
                            "type": "string",
                            "description": "Attachment's file name",
                            "example": "image.png"
                          },
                          "url": {
                            "type": "string",
                            "description": "Url of the file",
                            "example": "http://example.com/image.png"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the attachment was uploaded",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "width": {
                            "type": "number",
                            "description": "Width if the file is an image",
                            "nullable": true,
                            "example": 220
                          },
                          "height": {
                            "type": "number",
                            "description": "Height if the file is an image",
                            "nullable": true,
                            "example": 100
                          }
                        },
                        "nullable": true
                      },
                      "attachments": {
                        "type": "array",
                        "title": "attachment",
                        "description": "List of attachments linked to the Purchase Order",
                        "items": {
                          "type": "object",
                          "title": "attachment",
                          "required": [
                            "id",
                            "mimeType",
                            "fileName",
                            "url",
                            "createdAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Global ID of the attachment",
                              "example": 12345
                            },
                            "mimeType": {
                              "type": "string",
                              "description": "MIME type of the file",
                              "example": "image/png"
                            },
                            "fileName": {
                              "type": "string",
                              "description": "Attachment's file name",
                              "example": "image.png"
                            },
                            "url": {
                              "type": "string",
                              "description": "Url of the file",
                              "example": "http://example.com/image.png"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the attachment was uploaded",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "width": {
                              "type": "number",
                              "description": "Width if the file is an image",
                              "nullable": true,
                              "example": 220
                            },
                            "height": {
                              "type": "number",
                              "description": "Height if the file is an image",
                              "nullable": true,
                              "example": 100
                            }
                          }
                        }
                      },
                      "vendorContactIds": {
                        "type": "array",
                        "description": "List of vendor contact IDs in the Purchase Order",
                        "items": {
                          "type": "number",
                          "example": 12
                        }
                      },
                      "shippingAddress": {
                        "type": "object",
                        "description": "Shipping address in the Purchase Order",
                        "required": [
                          "city",
                          "country",
                          "postalCode",
                          "state",
                          "street"
                        ],
                        "properties": {
                          "city": {
                            "type": "string",
                            "example": "Montreal"
                          },
                          "country": {
                            "type": "string",
                            "example": "Canada"
                          },
                          "postalCode": {
                            "type": "string",
                            "example": "H4B 5G0"
                          },
                          "state": {
                            "type": "string",
                            "example": "Quebec"
                          },
                          "street": {
                            "type": "string",
                            "example": "1909 Avenue des Canadiens-de-Montréal"
                          },
                          "label": {
                            "type": "string",
                            "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                            "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                            "nullable": true
                          }
                        },
                        "nullable": true
                      },
                      "billingAddress": {
                        "type": "object",
                        "description": "Billing address in the Purchase Order",
                        "required": [
                          "city",
                          "country",
                          "postalCode",
                          "state",
                          "street"
                        ],
                        "properties": {
                          "city": {
                            "type": "string",
                            "example": "Montreal"
                          },
                          "country": {
                            "type": "string",
                            "example": "Canada"
                          },
                          "postalCode": {
                            "type": "string",
                            "example": "H4B 5G0"
                          },
                          "state": {
                            "type": "string",
                            "example": "Quebec"
                          },
                          "street": {
                            "type": "string",
                            "example": "1909 Avenue des Canadiens-de-Montréal"
                          },
                          "label": {
                            "type": "string",
                            "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                            "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                            "nullable": true
                          }
                        },
                        "nullable": true
                      },
                      "extraFields": {
                        "type": "object",
                        "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "example": {
                          "Ordered Date": "2023-01-01"
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "errors with request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to create the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User doesn't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified Purchase Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Purchase Order Not Found"
                      }
                    }
                  }
                }
              }
            },
            "429": {
              "description": "Too many requests. Please retry in 10 seconds",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Too many requests. Please retry in 10 seconds"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List purchase orders",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Purchase Orders returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "customFieldName",
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter purchase orders by custom field value. Your query parameter should be your custom field name. (ie: To filter by a custom field named \"Industry\" with the value \"Construction\", you would do this \"/purchaseorders?Industry=Construction\").\n                    \u003Cbr\u003E\u003Cbr\u003EAdding multiple instance of the same custom field act as an \u003Ccode\u003EOR\u003C/code\u003E and adding a different custom field act as an \u003Ccode\u003EAND\u003C/code\u003E. (ie: To filter by a custom field named \u003Ccode\u003EIndustry\u003C/code\u003E with the value \u003Ccode\u003EConstruction\u003C/code\u003E OR \u003Ccode\u003ETransportation\u003C/code\u003E AND the custom field \u003Ccode\u003EManufacturer\u003C/code\u003E with the value \u003Ccode\u003EACME\u003C/code\u003E, you would do this \u003Ccode\u003E/purchaseorders?Industry=Construction&Industry=Transportation&Manufacturer=ACME\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003EIf your custom field label is the same as a reserved query parameter such as \u003Ccode\u003Elimit\u003C/code\u003E, \u003Ccode\u003Esort\u003C/code\u003E, \u003Ccode\u003Eexpand\u003C/code\u003E, etc, you can add \u003Ccode\u003E__c\u003C/code\u003E to your custom field filtering (ie: To filter by a custom field named \u003Ccode\u003Elimit\u003C/code\u003E with the value \u003Ccode\u003Eten\u003C/code\u003E, you would do this \u003Ccode\u003E/purchaseorders?limit__c=ten\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003ENote that your custom field needs to be created beforehand. Only number and single line text custom field types are supported."
              },
              "in": "query"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Purchase Orders list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "purchaseOrders"
                    ],
                    "properties": {
                      "purchaseOrders": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "status"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 135,
                              "description": "Global ID of the Purchase Order"
                            },
                            "status": {
                              "type": "string",
                              "nullable": true,
                              "example": "APPROVED",
                              "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                              "deprecated": true
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Purchase Orders.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Purchase Orders.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        }
      },
      "/purchaseorders/{id}/comments": {
        "post": {
          "summary": "Create new comment on a purchase order",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "Global ID of the purchase order",
              "example": "12345"
            }
          ],
          "requestBody": {
            "description": "Comment to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "content"
                  ],
                  "properties": {
                    "content": {
                      "type": "string",
                      "description": "Content of the comment to post"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the comment",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Global ID of the comment"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the comment",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "should have required property 'content'",
                          "fieldPath": "content"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Purchase Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Purchase Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        }
      },
      "/purchaseorders/{id}": {
        "get": {
          "summary": "Get purchase order",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the purchaseOrder",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved purchaseOrder's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "purchaseOrder"
                    ],
                    "properties": {
                      "purchaseOrder": {
                        "type": "object",
                        "required": [
                          "id",
                          "note",
                          "reviewNote",
                          "status",
                          "dueDate",
                          "creatorId",
                          "vendorId",
                          "autoGeneratedNumber",
                          "overrideNumber",
                          "approverId",
                          "approvalDate",
                          "updatedAt",
                          "items",
                          "costs",
                          "thumbnail",
                          "attachments",
                          "vendorContactIds",
                          "shippingAddress",
                          "billingAddress",
                          "extraFields"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 135,
                            "description": "Global ID of the Purchase Order"
                          },
                          "note": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes left for Purchase Orders"
                          },
                          "reviewNote": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                          },
                          "status": {
                            "type": "string",
                            "nullable": true,
                            "example": "APPROVED",
                            "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                            "deprecated": true
                          },
                          "dueDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Due date of Purchase Order",
                            "nullable": true
                          },
                          "creatorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of the user that created this Purchase Order"
                          },
                          "vendorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of vendor that this Purchase Order is associated with",
                            "nullable": true
                          },
                          "autoGeneratedNumber": {
                            "type": "number",
                            "example": 987,
                            "nullable": true,
                            "description": "Autogenerated Purchase Order number"
                          },
                          "overrideNumber": {
                            "type": "string",
                            "example": "A123",
                            "nullable": true,
                            "description": "Custom number/identifier for Purchase Order"
                          },
                          "approverId": {
                            "type": "number",
                            "example": 135,
                            "description": "ID of the user who approved the Purchase Order",
                            "nullable": true
                          },
                          "approvalDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was approved",
                            "nullable": true
                          },
                          "updatedAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was last updated",
                            "nullable": true
                          },
                          "items": {
                            "type": "array",
                            "description": "List of items in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "quantityOrdered"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 23,
                                  "description": "ID of the item"
                                },
                                "partId": {
                                  "type": "number",
                                  "example": 43,
                                  "description": "ID of the part this item is related to",
                                  "nullable": true
                                },
                                "name": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "partNumber": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "price": {
                                  "type": "number",
                                  "example": 25000,
                                  "nullable": true,
                                  "description": "Total price of items in cents"
                                },
                                "quantityOrdered": {
                                  "type": "number",
                                  "example": 4,
                                  "description": "Represent the amount of units for this item that were ordered in the purchase order."
                                },
                                "quantityReceived": {
                                  "type": "number",
                                  "example": 3,
                                  "nullable": true,
                                  "description": "Represents the total amount of this specific item that has been received to date."
                                },
                                "unitCost": {
                                  "type": "number",
                                  "example": 125000,
                                  "nullable": true,
                                  "description": "Price of a single item in cents"
                                },
                                "extraFields": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` instead.",
                                  "deprecated": true
                                },
                                "lineExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Ordered Date": "2023-01-01"
                                  }
                                },
                                "partExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Part Number": "321"
                                  }
                                }
                              }
                            }
                          },
                          "costs": {
                            "type": "array",
                            "description": "List of costs in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "type",
                                "amount"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 123,
                                  "description": "ID of the cost"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Sales Tax",
                                  "description": "Description of the cost"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "AMOUNT_TAXABLE",
                                  "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                                },
                                "amount": {
                                  "type": "number",
                                  "example": 125000
                                }
                              }
                            }
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the Purchase Order",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "vendorContactIds": {
                            "type": "array",
                            "description": "List of vendor contact IDs in the Purchase Order",
                            "items": {
                              "type": "number",
                              "example": 12
                            }
                          },
                          "shippingAddress": {
                            "type": "object",
                            "description": "Shipping address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "billingAddress": {
                            "type": "object",
                            "description": "Billing address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Ordered Date": "2023-01-01"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified purchaseOrder or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        },
        "patch": {
          "summary": "Update purchase order information",
          "parameters": [
            {
              "schema": {
                "type": "number"
              },
              "name": "id",
              "required": true,
              "in": "path",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully updated Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "purchaseOrder"
                    ],
                    "properties": {
                      "purchaseOrder": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 135,
                            "description": "Global ID of the Purchase Order"
                          },
                          "note": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes left for Purchase Orders"
                          },
                          "reviewNote": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                          },
                          "status": {
                            "type": "string",
                            "nullable": true,
                            "example": "APPROVED",
                            "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                            "deprecated": true
                          },
                          "dueDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Due date of Purchase Order",
                            "nullable": true
                          },
                          "creatorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of the user that created this Purchase Order"
                          },
                          "vendorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of vendor that this Purchase Order is associated with",
                            "nullable": true
                          },
                          "autoGeneratedNumber": {
                            "type": "number",
                            "example": 987,
                            "nullable": true,
                            "description": "Autogenerated Purchase Order number"
                          },
                          "overrideNumber": {
                            "type": "string",
                            "example": "A123",
                            "nullable": true,
                            "description": "Custom number/identifier for Purchase Order"
                          },
                          "approverId": {
                            "type": "number",
                            "example": 135,
                            "description": "ID of the user who approved the Purchase Order",
                            "nullable": true
                          },
                          "approvalDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was approved",
                            "nullable": true
                          },
                          "updatedAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was last updated",
                            "nullable": true
                          },
                          "items": {
                            "type": "array",
                            "description": "List of items in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "quantityOrdered"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 23,
                                  "description": "ID of the item"
                                },
                                "partId": {
                                  "type": "number",
                                  "example": 43,
                                  "description": "ID of the part this item is related to",
                                  "nullable": true
                                },
                                "name": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "partNumber": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "price": {
                                  "type": "number",
                                  "example": 25000,
                                  "nullable": true,
                                  "description": "Total price of items in cents"
                                },
                                "quantityOrdered": {
                                  "type": "number",
                                  "example": 4,
                                  "description": "Represent the amount of units for this item that were ordered in the purchase order."
                                },
                                "quantityReceived": {
                                  "type": "number",
                                  "example": 3,
                                  "nullable": true,
                                  "description": "Represents the total amount of this specific item that has been received to date."
                                },
                                "unitCost": {
                                  "type": "number",
                                  "example": 125000,
                                  "nullable": true,
                                  "description": "Price of a single item in cents"
                                },
                                "extraFields": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` instead.",
                                  "deprecated": true
                                },
                                "lineExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Ordered Date": "2023-01-01"
                                  }
                                },
                                "partExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Part Number": "321"
                                  }
                                }
                              }
                            }
                          },
                          "costs": {
                            "type": "array",
                            "description": "List of costs in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "type",
                                "amount"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 123,
                                  "description": "ID of the cost"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Sales Tax",
                                  "description": "Description of the cost"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "AMOUNT_TAXABLE",
                                  "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                                },
                                "amount": {
                                  "type": "number",
                                  "example": 125000
                                }
                              }
                            }
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the Purchase Order",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "vendorContactIds": {
                            "type": "array",
                            "description": "List of vendor contact IDs in the Purchase Order",
                            "items": {
                              "type": "number",
                              "example": 12
                            }
                          },
                          "shippingAddress": {
                            "type": "object",
                            "description": "Shipping address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "billingAddress": {
                            "type": "object",
                            "description": "Billing address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Ordered Date": "2023-01-01"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "items"
                        ]
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to update the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "error with the request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to update the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User doesn't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified Purchase Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Purchase Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "requestBody": {
            "description": "Purchase Order to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {
                      "type": "string",
                      "nullable": true,
                      "description": "Notes left for Purchase Orders"
                    },
                    "reviewNote": {
                      "type": "string",
                      "nullable": true,
                      "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                    },
                    "status": {
                      "type": "string",
                      "nullable": true,
                      "example": "APPROVED",
                      "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                      "deprecated": true
                    },
                    "dueDate": {
                      "type": "string",
                      "example": "2022-01-01T00:00:00.000Z",
                      "description": "Due date of Purchase Order",
                      "nullable": true
                    },
                    "vendorId": {
                      "type": "number",
                      "example": 432,
                      "description": "ID of vendor that this Purchase Order is associated with",
                      "nullable": true
                    },
                    "overrideNumber": {
                      "type": "string",
                      "example": "A123",
                      "nullable": true,
                      "description": "Custom number/identifier for Purchase Order"
                    },
                    "costs": {
                      "type": "array",
                      "description": "List of costs in the Purchase Order",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "type",
                          "amount"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 123,
                            "description": "ID of the cost"
                          },
                          "name": {
                            "type": "string",
                            "example": "Sales Tax",
                            "description": "Description of the cost"
                          },
                          "type": {
                            "type": "string",
                            "example": "AMOUNT_TAXABLE",
                            "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                          },
                          "amount": {
                            "type": "number",
                            "example": 125000
                          }
                        }
                      }
                    },
                    "vendorContactIds": {
                      "type": "array",
                      "description": "List of vendor contact IDs in the Purchase Order",
                      "items": {
                        "type": "number",
                        "example": 12
                      }
                    },
                    "shippingAddress": {
                      "type": "object",
                      "description": "Shipping address in the Purchase Order",
                      "required": [
                        "city",
                        "country",
                        "postalCode",
                        "state",
                        "street"
                      ],
                      "properties": {
                        "city": {
                          "type": "string",
                          "example": "Montreal"
                        },
                        "country": {
                          "type": "string",
                          "example": "Canada"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "H4B 5G0"
                        },
                        "state": {
                          "type": "string",
                          "example": "Quebec"
                        },
                        "street": {
                          "type": "string",
                          "example": "1909 Avenue des Canadiens-de-Montréal"
                        },
                        "label": {
                          "type": "string",
                          "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                          "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                          "nullable": true
                        }
                      },
                      "nullable": true
                    },
                    "shippingAddressId": {
                      "type": "number",
                      "description": "Shipping address Id in the Purchase Order",
                      "nullable": true
                    },
                    "billingAddress": {
                      "type": "object",
                      "description": "Billing address in the Purchase Order",
                      "required": [
                        "city",
                        "country",
                        "postalCode",
                        "state",
                        "street"
                      ],
                      "properties": {
                        "city": {
                          "type": "string",
                          "example": "Montreal"
                        },
                        "country": {
                          "type": "string",
                          "example": "Canada"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "H4B 5G0"
                        },
                        "state": {
                          "type": "string",
                          "example": "Quebec"
                        },
                        "street": {
                          "type": "string",
                          "example": "1909 Avenue des Canadiens-de-Montréal"
                        },
                        "label": {
                          "type": "string",
                          "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                          "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                          "nullable": true
                        }
                      },
                      "nullable": true
                    },
                    "billingAddressId": {
                      "type": "number",
                      "description": "Billing address Id in the Purchase Order",
                      "nullable": true
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Ordered Date": "2023-01-01"
                      }
                    },
                    "items": {
                      "type": "array",
                      "description": "List of items in the Purchase Order",
                      "items": {
                        "type": "object",
                        "required": [
                          "quantityOrdered"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 23,
                            "description": "ID of the item"
                          },
                          "partId": {
                            "type": "number",
                            "example": 43,
                            "description": "ID of the part this item is related to",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "nullable": true
                          },
                          "partNumber": {
                            "type": "string",
                            "nullable": true
                          },
                          "price": {
                            "type": "number",
                            "example": 25000,
                            "nullable": true,
                            "description": "Total price of items in cents"
                          },
                          "quantityOrdered": {
                            "type": "number",
                            "example": 4,
                            "description": "Represent the amount of units for this item that were ordered in the purchase order."
                          },
                          "unitCost": {
                            "type": "number",
                            "example": 125000,
                            "nullable": true,
                            "description": "Price of a single item in cents"
                          },
                          "extraFields": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` instead.",
                            "deprecated": true
                          },
                          "lineExtraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Ordered Date": "2023-01-01"
                            }
                          },
                          "quantityReceived": {
                            "type": "number",
                            "example": 3,
                            "nullable": true,
                            "description": "Represents the total amount of this specific item that has been received to date.",
                            "deprecated": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        },
        "delete": {
          "summary": "Delete purchaseOrder",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the purchaseOrder",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the purchaseOrder"
            },
            "400": {
              "description": "Failed to Delete the purchaseOrder",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified purchaseOrder.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "purchaseOrder Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        }
      },
      "/purchaseorders/{id}/fulfillment": {
        "patch": {
          "summary": "Fulfill purchase order",
          "parameters": [
            {
              "schema": {
                "type": "number"
              },
              "name": "id",
              "required": true,
              "in": "path",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully updated Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "purchaseOrder"
                    ],
                    "properties": {
                      "purchaseOrder": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 135,
                            "description": "Global ID of the Purchase Order"
                          },
                          "note": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes left for Purchase Orders"
                          },
                          "reviewNote": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                          },
                          "status": {
                            "type": "string",
                            "nullable": true,
                            "example": "APPROVED",
                            "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                            "deprecated": true
                          },
                          "dueDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Due date of Purchase Order",
                            "nullable": true
                          },
                          "creatorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of the user that created this Purchase Order"
                          },
                          "vendorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of vendor that this Purchase Order is associated with",
                            "nullable": true
                          },
                          "autoGeneratedNumber": {
                            "type": "number",
                            "example": 987,
                            "nullable": true,
                            "description": "Autogenerated Purchase Order number"
                          },
                          "overrideNumber": {
                            "type": "string",
                            "example": "A123",
                            "nullable": true,
                            "description": "Custom number/identifier for Purchase Order"
                          },
                          "approverId": {
                            "type": "number",
                            "example": 135,
                            "description": "ID of the user who approved the Purchase Order",
                            "nullable": true
                          },
                          "approvalDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was approved",
                            "nullable": true
                          },
                          "updatedAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was last updated",
                            "nullable": true
                          },
                          "items": {
                            "type": "array",
                            "description": "List of items in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "quantityOrdered"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 23,
                                  "description": "ID of the item"
                                },
                                "partId": {
                                  "type": "number",
                                  "example": 43,
                                  "description": "ID of the part this item is related to",
                                  "nullable": true
                                },
                                "name": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "partNumber": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "price": {
                                  "type": "number",
                                  "example": 25000,
                                  "nullable": true,
                                  "description": "Total price of items in cents"
                                },
                                "quantityOrdered": {
                                  "type": "number",
                                  "example": 4,
                                  "description": "Represent the amount of units for this item that were ordered in the purchase order."
                                },
                                "quantityReceived": {
                                  "type": "number",
                                  "example": 3,
                                  "nullable": true,
                                  "description": "Represents the total amount of this specific item that has been received to date."
                                },
                                "unitCost": {
                                  "type": "number",
                                  "example": 125000,
                                  "nullable": true,
                                  "description": "Price of a single item in cents"
                                },
                                "extraFields": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` instead.",
                                  "deprecated": true
                                },
                                "lineExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Ordered Date": "2023-01-01"
                                  }
                                },
                                "partExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Part Number": "321"
                                  }
                                }
                              }
                            }
                          },
                          "costs": {
                            "type": "array",
                            "description": "List of costs in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "type",
                                "amount"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 123,
                                  "description": "ID of the cost"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Sales Tax",
                                  "description": "Description of the cost"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "AMOUNT_TAXABLE",
                                  "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                                },
                                "amount": {
                                  "type": "number",
                                  "example": 125000
                                }
                              }
                            }
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the Purchase Order",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "vendorContactIds": {
                            "type": "array",
                            "description": "List of vendor contact IDs in the Purchase Order",
                            "items": {
                              "type": "number",
                              "example": 12
                            }
                          },
                          "shippingAddress": {
                            "type": "object",
                            "description": "Shipping address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "billingAddress": {
                            "type": "object",
                            "description": "Billing address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Ordered Date": "2023-01-01"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "items"
                        ]
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to update the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "error with the request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to update the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User doesn't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified Purchase Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Purchase Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "requestBody": {
            "description": "Purchase Order items to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "description": "List of items in the Purchase Order",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "quantityReceived"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 23,
                            "description": "ID of the item"
                          },
                          "quantityReceived": {
                            "type": "number",
                            "example": 3,
                            "description": "Represents the total amount of this specific item that has been received to date."
                          },
                          "unitCost": {
                            "type": "number",
                            "example": 125000,
                            "description": "Price of a single item in cents"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        }
      },
      "/purchaseorders/{id}/status": {
        "patch": {
          "summary": "Update purchase order status",
          "parameters": [
            {
              "schema": {
                "type": "number"
              },
              "name": "id",
              "required": true,
              "in": "path",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully updated Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "purchaseOrder"
                    ],
                    "properties": {
                      "purchaseOrder": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 135,
                            "description": "Global ID of the Purchase Order"
                          },
                          "note": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes left for Purchase Orders"
                          },
                          "reviewNote": {
                            "type": "string",
                            "nullable": true,
                            "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                          },
                          "status": {
                            "type": "string",
                            "nullable": true,
                            "example": "APPROVED",
                            "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                            "deprecated": true
                          },
                          "dueDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Due date of Purchase Order",
                            "nullable": true
                          },
                          "creatorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of the user that created this Purchase Order"
                          },
                          "vendorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of vendor that this Purchase Order is associated with",
                            "nullable": true
                          },
                          "autoGeneratedNumber": {
                            "type": "number",
                            "example": 987,
                            "nullable": true,
                            "description": "Autogenerated Purchase Order number"
                          },
                          "overrideNumber": {
                            "type": "string",
                            "example": "A123",
                            "nullable": true,
                            "description": "Custom number/identifier for Purchase Order"
                          },
                          "approverId": {
                            "type": "number",
                            "example": 135,
                            "description": "ID of the user who approved the Purchase Order",
                            "nullable": true
                          },
                          "approvalDate": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was approved",
                            "nullable": true
                          },
                          "updatedAt": {
                            "type": "string",
                            "example": "2022-01-01T00:00:00.000Z",
                            "description": "Date the Purchase Order was last updated",
                            "nullable": true
                          },
                          "items": {
                            "type": "array",
                            "description": "List of items in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "quantityOrdered"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 23,
                                  "description": "ID of the item"
                                },
                                "partId": {
                                  "type": "number",
                                  "example": 43,
                                  "description": "ID of the part this item is related to",
                                  "nullable": true
                                },
                                "name": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "partNumber": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "price": {
                                  "type": "number",
                                  "example": 25000,
                                  "nullable": true,
                                  "description": "Total price of items in cents"
                                },
                                "quantityOrdered": {
                                  "type": "number",
                                  "example": 4,
                                  "description": "Represent the amount of units for this item that were ordered in the purchase order."
                                },
                                "quantityReceived": {
                                  "type": "number",
                                  "example": 3,
                                  "nullable": true,
                                  "description": "Represents the total amount of this specific item that has been received to date."
                                },
                                "unitCost": {
                                  "type": "number",
                                  "example": 125000,
                                  "nullable": true,
                                  "description": "Price of a single item in cents"
                                },
                                "extraFields": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` instead.",
                                  "deprecated": true
                                },
                                "lineExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Ordered Date": "2023-01-01"
                                  }
                                },
                                "partExtraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Part Number": "321"
                                  }
                                }
                              }
                            }
                          },
                          "costs": {
                            "type": "array",
                            "description": "List of costs in the Purchase Order",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "type",
                                "amount"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 123,
                                  "description": "ID of the cost"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Sales Tax",
                                  "description": "Description of the cost"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "AMOUNT_TAXABLE",
                                  "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                                },
                                "amount": {
                                  "type": "number",
                                  "example": 125000
                                }
                              }
                            }
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the Purchase Order",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "vendorContactIds": {
                            "type": "array",
                            "description": "List of vendor contact IDs in the Purchase Order",
                            "items": {
                              "type": "number",
                              "example": 12
                            }
                          },
                          "shippingAddress": {
                            "type": "object",
                            "description": "Shipping address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "billingAddress": {
                            "type": "object",
                            "description": "Billing address in the Purchase Order",
                            "required": [
                              "city",
                              "country",
                              "postalCode",
                              "state",
                              "street"
                            ],
                            "properties": {
                              "city": {
                                "type": "string",
                                "example": "Montreal"
                              },
                              "country": {
                                "type": "string",
                                "example": "Canada"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "H4B 5G0"
                              },
                              "state": {
                                "type": "string",
                                "example": "Quebec"
                              },
                              "street": {
                                "type": "string",
                                "example": "1909 Avenue des Canadiens-de-Montréal"
                              },
                              "label": {
                                "type": "string",
                                "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                                "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                                "nullable": true
                              }
                            },
                            "nullable": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Ordered Date": "2023-01-01"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "items"
                        ]
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to update the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "error with the request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to update the Purchase Order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User doesn't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified Purchase Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Purchase Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "requestBody": {
            "description": "Purchase Order status to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "APPROVED",
                      "enum": [
                        "APPROVED",
                        "CANCELED",
                        "COMPLETED",
                        "DECLINED",
                        "PARTIALLY_FULFILLED",
                        "PENDING"
                      ],
                      "description": "Here is a list of valid options for each status:\n  | Status               | Available options                         |\n  |----------------------|-------------------------------------------|\n  | `REQUESTED`          | `CANCELED` `DECLINED` `PENDING`           |\n  | `PENDING`            | `APPROVED` `CANCELED` `DECLINED`          |\n  | `DECLINED`           | `CANCELED` `PENDING`                      |\n  | `APPROVED`           | `CANCELED` or start fulfilling the PO     |\n  | `PARTIALLY_FULFILLED`| `COMPLETED`                               |\n  | `CANCELED`           |  N/A                                      |\n  | `COMPLETED`          | `PARTIALLY_FULFILLED`                     |\n\n*Notes*:\n- It is also possible to register a webhook to get notified when the status of any purchase order changes. Please see the [Subscriptions](#tag/Subscriptions-and-Webhooks) section for more information.\n- The `DECLINED` status returned by the REST API is equivalent to the `Rejected` status displayed in the application frontend."
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        }
      },
      "/purchaseorders/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update purchase order attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the purchase order.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated purchase order's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified purchase order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "purchase order Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        },
        "delete": {
          "summary": "Remove purchase order attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the purchase order.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed purchase order's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        }
      },
      "/purchaseorders/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update purchase order's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the purchase order.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the purchase order thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated purchase order's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Purchase Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Purchase Order Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Purchase Orders"
          ]
        }
      },
      "/proceduretemplates": {
        "post": {
          "summary": "Create procedure template",
          "requestBody": {
            "description": "The procedure template to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The procedure template data",
                  "required": [
                    "title",
                    "fields"
                  ],
                  "properties": {
                    "title": {
                      "type": "string",
                      "example": "Ladder Inspection Checklist"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "label"
                        ],
                        "properties": {
                          "label": {
                            "type": "string",
                            "example": "Metal Parts: broken, loose, dented, rusty, missing"
                          },
                          "type": {
                            "type": "string",
                            "example": "INSPECTION_CHECK",
                            "enum": [
                              "NUMBER",
                              "AMOUNT",
                              "TEXT",
                              "UNSUPPORTED",
                              "HEADING",
                              "FILE",
                              "SIGNATURE",
                              "MULTIPLE_CHOICE",
                              "INSPECTION_CHECK",
                              "YES_NO_NA",
                              "CHECKBOX",
                              "CHECKLIST",
                              "METER",
                              "DATE"
                            ]
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "choices": {
                            "type": "array",
                            "items": {
                              "example": "Partially",
                              "type": "string"
                            }
                          },
                          "urls": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "link"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Label of the url",
                                  "example": "maintainsoft Website"
                                },
                                "link": {
                                  "type": "string",
                                  "description": "Link",
                                  "example": "www.getmaintainsoft.com"
                                }
                              }
                            }
                          },
                          "meterId": {
                            "type": "number",
                            "example": 1,
                            "nullable": true,
                            "description": "Id of the meter"
                          },
                          "isDateAndTime": {
                            "type": "boolean",
                            "description": "Indicate if a DATE field also contains the time"
                          },
                          "index": {
                            "type": "number",
                            "example": 1,
                            "description": "Order which the row is displayed"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the custom fields",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id",
                      "fields"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": 1,
                        "description": "Id of the procedure template"
                      },
                      "fields": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "label",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 1
                            },
                            "label": {
                              "type": "string",
                              "example": "Metal Parts: broken, loose, dented, rusty, missing"
                            },
                            "type": {
                              "type": "string",
                              "example": "INSPECTION_CHECK",
                              "enum": [
                                "NUMBER",
                                "AMOUNT",
                                "TEXT",
                                "UNSUPPORTED",
                                "HEADING",
                                "FILE",
                                "SIGNATURE",
                                "MULTIPLE_CHOICE",
                                "INSPECTION_CHECK",
                                "YES_NO_NA",
                                "CHECKBOX",
                                "CHECKLIST",
                                "METER",
                                "DATE"
                              ]
                            },
                            "description": {
                              "type": "string",
                              "nullable": true
                            },
                            "choices": {
                              "type": "array",
                              "nullable": true,
                              "items": {
                                "example": "Partially",
                                "type": "string"
                              }
                            },
                            "meterId": {
                              "type": "number",
                              "nullable": true,
                              "items": {
                                "example": 1,
                                "type": "number"
                              }
                            },
                            "isDateAndTime": {
                              "type": "boolean",
                              "nullable": true,
                              "description": "Indicate if a DATE field also contains the time",
                              "example": false
                            },
                            "attachmentId": {
                              "type": "number",
                              "nullable": true,
                              "example": 1
                            },
                            "attachments": {
                              "type": "array",
                              "title": "attachment",
                              "description": "List of attachments linked to the procedure row",
                              "items": {
                                "type": "object",
                                "title": "attachment",
                                "required": [
                                  "id",
                                  "mimeType",
                                  "fileName",
                                  "url",
                                  "createdAt"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "description": "Global ID of the attachment",
                                    "example": 12345
                                  },
                                  "mimeType": {
                                    "type": "string",
                                    "description": "MIME type of the file",
                                    "example": "image/png"
                                  },
                                  "fileName": {
                                    "type": "string",
                                    "description": "Attachment's file name",
                                    "example": "image.png"
                                  },
                                  "url": {
                                    "type": "string",
                                    "description": "Url of the file",
                                    "example": "http://example.com/image.png"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Date & time at which the attachment was uploaded",
                                    "example": "2022-01-01T00:00:00.000Z"
                                  },
                                  "width": {
                                    "type": "number",
                                    "description": "Width if the file is an image",
                                    "nullable": true,
                                    "example": 220
                                  },
                                  "height": {
                                    "type": "number",
                                    "description": "Height if the file is an image",
                                    "nullable": true,
                                    "example": 100
                                  }
                                }
                              }
                            },
                            "urls": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "link"
                                ],
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "description": "Label of the url",
                                    "example": "maintainsoft Website"
                                  },
                                  "link": {
                                    "type": "string",
                                    "description": "Link",
                                    "example": "www.getmaintainsoft.com"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Procedure Templates"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List procedure templates",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Procedure Templates returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "rows"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Procedure Templates list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "procedureTemplates"
                    ],
                    "properties": {
                      "procedureTemplates": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "title"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Global ID of the procedure template"
                            },
                            "title": {
                              "type": "string",
                              "description": "Title of the procedure template"
                            },
                            "rows": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label",
                                  "type"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "example": 1
                                  },
                                  "label": {
                                    "type": "string",
                                    "example": "Metal Parts: broken, loose, dented, rusty, missing"
                                  },
                                  "type": {
                                    "type": "string",
                                    "example": "INSPECTION_CHECK",
                                    "enum": [
                                      "NUMBER",
                                      "AMOUNT",
                                      "TEXT",
                                      "UNSUPPORTED",
                                      "HEADING",
                                      "FILE",
                                      "SIGNATURE",
                                      "MULTIPLE_CHOICE",
                                      "INSPECTION_CHECK",
                                      "YES_NO_NA",
                                      "CHECKBOX",
                                      "CHECKLIST",
                                      "METER",
                                      "DATE"
                                    ]
                                  },
                                  "description": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "choices": {
                                    "type": "array",
                                    "nullable": true,
                                    "items": {
                                      "example": "Partially",
                                      "type": "string"
                                    }
                                  },
                                  "meterId": {
                                    "type": "number",
                                    "nullable": true,
                                    "items": {
                                      "example": 1,
                                      "type": "number"
                                    }
                                  },
                                  "isDateAndTime": {
                                    "type": "boolean",
                                    "nullable": true,
                                    "description": "Indicate if a DATE field also contains the time",
                                    "example": false
                                  },
                                  "attachmentId": {
                                    "type": "number",
                                    "nullable": true,
                                    "example": 1
                                  },
                                  "attachments": {
                                    "type": "array",
                                    "title": "attachment",
                                    "description": "List of attachments linked to the procedure row",
                                    "items": {
                                      "type": "object",
                                      "title": "attachment",
                                      "required": [
                                        "id",
                                        "mimeType",
                                        "fileName",
                                        "url",
                                        "createdAt"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "number",
                                          "description": "Global ID of the attachment",
                                          "example": 12345
                                        },
                                        "mimeType": {
                                          "type": "string",
                                          "description": "MIME type of the file",
                                          "example": "image/png"
                                        },
                                        "fileName": {
                                          "type": "string",
                                          "description": "Attachment's file name",
                                          "example": "image.png"
                                        },
                                        "url": {
                                          "type": "string",
                                          "description": "Url of the file",
                                          "example": "http://example.com/image.png"
                                        },
                                        "createdAt": {
                                          "type": "string",
                                          "format": "date-time",
                                          "description": "Date & time at which the attachment was uploaded",
                                          "example": "2022-01-01T00:00:00.000Z"
                                        },
                                        "width": {
                                          "type": "number",
                                          "description": "Width if the file is an image",
                                          "nullable": true,
                                          "example": 220
                                        },
                                        "height": {
                                          "type": "number",
                                          "description": "Height if the file is an image",
                                          "nullable": true,
                                          "example": 100
                                        }
                                      }
                                    }
                                  },
                                  "urls": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "link"
                                      ],
                                      "properties": {
                                        "label": {
                                          "type": "string",
                                          "description": "Label of the url",
                                          "example": "maintainsoft Website"
                                        },
                                        "link": {
                                          "type": "string",
                                          "description": "Link",
                                          "example": "www.getmaintainsoft.com"
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "nullable": true,
                              "description": "(expand with query parameter)"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Procedure Templates.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Procedure Templates.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Procedure Templates"
          ]
        }
      },
      "/proceduretemplates/{id}": {
        "get": {
          "summary": "Get procedure template",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the procedureTemplate",
              "example": "1"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "rows"
                  ]
                }
              }
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved procedureTemplate's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "procedureTemplate"
                    ],
                    "properties": {
                      "procedureTemplate": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "createdAt",
                          "deletedAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "description": "Global ID of the procedure template"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title of the procedure template"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the procedure template was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the procedure template was deleted",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the procedure template was last updated",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "rows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "label",
                                "type"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 1
                                },
                                "label": {
                                  "type": "string",
                                  "example": "Metal Parts: broken, loose, dented, rusty, missing"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "INSPECTION_CHECK",
                                  "enum": [
                                    "NUMBER",
                                    "AMOUNT",
                                    "TEXT",
                                    "UNSUPPORTED",
                                    "HEADING",
                                    "FILE",
                                    "SIGNATURE",
                                    "MULTIPLE_CHOICE",
                                    "INSPECTION_CHECK",
                                    "YES_NO_NA",
                                    "CHECKBOX",
                                    "CHECKLIST",
                                    "METER",
                                    "DATE"
                                  ]
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "choices": {
                                  "type": "array",
                                  "nullable": true,
                                  "items": {
                                    "example": "Partially",
                                    "type": "string"
                                  }
                                },
                                "meterId": {
                                  "type": "number",
                                  "nullable": true,
                                  "items": {
                                    "example": 1,
                                    "type": "number"
                                  }
                                },
                                "isDateAndTime": {
                                  "type": "boolean",
                                  "nullable": true,
                                  "description": "Indicate if a DATE field also contains the time",
                                  "example": false
                                },
                                "attachmentId": {
                                  "type": "number",
                                  "nullable": true,
                                  "example": 1
                                },
                                "attachments": {
                                  "type": "array",
                                  "title": "attachment",
                                  "description": "List of attachments linked to the procedure row",
                                  "items": {
                                    "type": "object",
                                    "title": "attachment",
                                    "required": [
                                      "id",
                                      "mimeType",
                                      "fileName",
                                      "url",
                                      "createdAt"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "number",
                                        "description": "Global ID of the attachment",
                                        "example": 12345
                                      },
                                      "mimeType": {
                                        "type": "string",
                                        "description": "MIME type of the file",
                                        "example": "image/png"
                                      },
                                      "fileName": {
                                        "type": "string",
                                        "description": "Attachment's file name",
                                        "example": "image.png"
                                      },
                                      "url": {
                                        "type": "string",
                                        "description": "Url of the file",
                                        "example": "http://example.com/image.png"
                                      },
                                      "createdAt": {
                                        "type": "string",
                                        "format": "date-time",
                                        "description": "Date & time at which the attachment was uploaded",
                                        "example": "2022-01-01T00:00:00.000Z"
                                      },
                                      "width": {
                                        "type": "number",
                                        "description": "Width if the file is an image",
                                        "nullable": true,
                                        "example": 220
                                      },
                                      "height": {
                                        "type": "number",
                                        "description": "Height if the file is an image",
                                        "nullable": true,
                                        "example": 100
                                      }
                                    }
                                  }
                                },
                                "urls": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "link"
                                    ],
                                    "properties": {
                                      "label": {
                                        "type": "string",
                                        "description": "Label of the url",
                                        "example": "maintainsoft Website"
                                      },
                                      "link": {
                                        "type": "string",
                                        "description": "Link",
                                        "example": "www.getmaintainsoft.com"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "nullable": true,
                            "description": "(expand with query parameter)"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedureTemplate or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Procedure Templates"
          ]
        },
        "patch": {
          "summary": "Update Procedure Template",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the procedure template",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Procedure Template to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "description": "Title of the procedure template"
                    },
                    "description": {
                      "type": "string",
                      "description": "Description of the procedure template",
                      "nullable": true
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "anyOf": [
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label"
                            ],
                            "properties": {
                              "label": {
                                "type": "string",
                                "example": "Metal Parts: broken, loose, dented, rusty, missing"
                              },
                              "type": {
                                "type": "string",
                                "example": "INSPECTION_CHECK",
                                "enum": [
                                  "NUMBER",
                                  "AMOUNT",
                                  "TEXT",
                                  "UNSUPPORTED",
                                  "HEADING",
                                  "FILE",
                                  "SIGNATURE",
                                  "MULTIPLE_CHOICE",
                                  "INSPECTION_CHECK",
                                  "YES_NO_NA",
                                  "CHECKBOX",
                                  "CHECKLIST",
                                  "METER",
                                  "DATE"
                                ]
                              },
                              "description": {
                                "type": "string",
                                "nullable": true
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "example": "Partially",
                                  "type": "string"
                                }
                              },
                              "urls": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "link"
                                  ],
                                  "properties": {
                                    "label": {
                                      "type": "string",
                                      "description": "Label of the url",
                                      "example": "maintainsoft Website"
                                    },
                                    "link": {
                                      "type": "string",
                                      "description": "Link",
                                      "example": "www.getmaintainsoft.com"
                                    }
                                  }
                                }
                              },
                              "meterId": {
                                "type": "number",
                                "example": 1,
                                "nullable": true,
                                "description": "Id of the meter"
                              },
                              "isDateAndTime": {
                                "type": "boolean",
                                "description": "Indicate if a DATE field also contains the time"
                              },
                              "index": {
                                "type": "number",
                                "example": 1,
                                "description": "Order which the row is displayed"
                              }
                            },
                            "description": "Adds a new row to the template"
                          },
                          {
                            "type": "object",
                            "description": "Modify existing rows of the template",
                            "required": [
                              "id"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Id of an existing row",
                                "example": 1
                              },
                              "label": {
                                "type": "string",
                                "example": "Metal Parts: broken, loose, dented, rusty, missing"
                              },
                              "type": {
                                "type": "string",
                                "example": "INSPECTION_CHECK",
                                "enum": [
                                  "NUMBER",
                                  "AMOUNT",
                                  "TEXT",
                                  "UNSUPPORTED",
                                  "HEADING",
                                  "FILE",
                                  "SIGNATURE",
                                  "MULTIPLE_CHOICE",
                                  "INSPECTION_CHECK",
                                  "YES_NO_NA",
                                  "CHECKBOX",
                                  "CHECKLIST",
                                  "METER",
                                  "DATE"
                                ]
                              },
                              "description": {
                                "type": "string",
                                "nullable": true
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "example": "Partially",
                                  "type": "string"
                                }
                              },
                              "urls": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "link"
                                  ],
                                  "properties": {
                                    "label": {
                                      "type": "string",
                                      "description": "Label of the url",
                                      "example": "maintainsoft Website"
                                    },
                                    "link": {
                                      "type": "string",
                                      "description": "Link",
                                      "example": "www.getmaintainsoft.com"
                                    }
                                  }
                                }
                              },
                              "meterId": {
                                "type": "number",
                                "example": 1,
                                "nullable": true,
                                "description": "Id of the meter"
                              },
                              "isDateAndTime": {
                                "type": "boolean",
                                "description": "Indicate if a DATE field also contains the time"
                              },
                              "index": {
                                "type": "number",
                                "example": 1,
                                "description": "Order which the row is displayed"
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "204": {
              "description": "Successfully edited the procedure template"
            },
            "400": {
              "description": "Bad request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Bad request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedure template.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "procedure template Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Procedure Templates"
          ]
        },
        "delete": {
          "summary": "Delete procedure Template",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the procedure Template",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the procedureTemplate"
            },
            "400": {
              "description": "Failed to Delete the procedureTemplate",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedureTemplate.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "procedureTemplate Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Procedure Templates"
          ]
        }
      },
      "/proceduretemplaterows/{id}": {
        "patch": {
          "summary": "Update Procedure Template Row",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the procedure template row",
              "example": 1
            }
          ],
          "requestBody": {
            "description": "Procedure Template Row to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "example": "Metal Parts: broken, loose, dented, rusty, missing"
                    },
                    "type": {
                      "type": "string",
                      "example": "INSPECTION_CHECK",
                      "enum": [
                        "NUMBER",
                        "AMOUNT",
                        "TEXT",
                        "UNSUPPORTED",
                        "HEADING",
                        "FILE",
                        "SIGNATURE",
                        "MULTIPLE_CHOICE",
                        "INSPECTION_CHECK",
                        "YES_NO_NA",
                        "CHECKBOX",
                        "CHECKLIST",
                        "METER",
                        "DATE"
                      ]
                    },
                    "description": {
                      "type": "string",
                      "nullable": true
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "example": "Partially",
                        "type": "string"
                      }
                    },
                    "urls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "link"
                        ],
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "Label of the url",
                            "example": "maintainsoft Website"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link",
                            "example": "www.getmaintainsoft.com"
                          }
                        }
                      }
                    },
                    "meterId": {
                      "type": "number",
                      "example": 1,
                      "nullable": true,
                      "description": "Id of the meter"
                    },
                    "isDateAndTime": {
                      "type": "boolean",
                      "description": "Indicate if a DATE field also contains the time"
                    },
                    "index": {
                      "type": "number",
                      "example": 1,
                      "description": "Order which the row is displayed"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited the procedure template row",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "row"
                    ],
                    "properties": {
                      "row": {
                        "type": "object",
                        "required": [
                          "id",
                          "label",
                          "type"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 1
                          },
                          "label": {
                            "type": "string",
                            "example": "Metal Parts: broken, loose, dented, rusty, missing"
                          },
                          "type": {
                            "type": "string",
                            "example": "INSPECTION_CHECK",
                            "enum": [
                              "NUMBER",
                              "AMOUNT",
                              "TEXT",
                              "UNSUPPORTED",
                              "HEADING",
                              "FILE",
                              "SIGNATURE",
                              "MULTIPLE_CHOICE",
                              "INSPECTION_CHECK",
                              "YES_NO_NA",
                              "CHECKBOX",
                              "CHECKLIST",
                              "METER",
                              "DATE"
                            ]
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "choices": {
                            "type": "array",
                            "nullable": true,
                            "items": {
                              "example": "Partially",
                              "type": "string"
                            }
                          },
                          "meterId": {
                            "type": "number",
                            "nullable": true,
                            "items": {
                              "example": 1,
                              "type": "number"
                            }
                          },
                          "isDateAndTime": {
                            "type": "boolean",
                            "nullable": true,
                            "description": "Indicate if a DATE field also contains the time",
                            "example": false
                          },
                          "attachmentId": {
                            "type": "number",
                            "nullable": true,
                            "example": 1
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the procedure row",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "urls": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "link"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Label of the url",
                                  "example": "maintainsoft Website"
                                },
                                "link": {
                                  "type": "string",
                                  "description": "Link",
                                  "example": "www.getmaintainsoft.com"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Bad request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedure template row.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "procedure template row Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Procedure Template Rows"
          ]
        },
        "delete": {
          "summary": "Delete procedure Template Row",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the procedure Template Row",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the procedureTemplateRow"
            },
            "400": {
              "description": "Failed to Delete the procedureTemplateRow",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedureTemplateRow.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "procedureTemplateRow Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Procedure Template Rows"
          ]
        }
      },
      "/proceduretemplaterows/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update procedure template row attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the procedure template row.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated procedure template row's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedure template row.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "procedure template row Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Procedure Template Rows"
          ]
        }
      },
      "/proceduretemplaterows/{id}/attachments": {
        "delete": {
          "summary": "Remove procedure template row attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the procedure template row.",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed procedure template row's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedure template row.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "procedure template row Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Procedure Template Rows"
          ]
        }
      },
      "/subscriptions": {
        "post": {
          "summary": "Create new subscription",
          "requestBody": {
            "description": "Subscription to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "oneOf": [
                    {
                      "title": "Asset Status Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "ASSET_STATUS_CHANGE"
                          ],
                          "example": "ASSET_STATUS_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfAssetStatusTypes": {
                              "type": "array",
                              "description": "Asset status types that will trigger the webhook",
                              "items": {
                                "title": "Status",
                                "type": "string",
                                "enum": [
                                  "IGNORE",
                                  "OFFLINE",
                                  "ONLINE"
                                ]
                              }
                            },
                            "oneOfCustomAssetStatusesIds": {
                              "type": "array",
                              "description": "Custom status ids that will trigger the webhook",
                              "items": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Meter Trigger Status Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "METER_TRIGGER_STATE_CHANGE"
                          ],
                          "example": "METER_TRIGGER_STATE_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfStates": {
                              "type": "array",
                              "description": "States that will trigger the webhook.",
                              "items": {
                                "title": "State",
                                "type": "string",
                                "enum": [
                                  "INACTIVE",
                                  "INSUFFICIENT_DATA",
                                  "PENDING",
                                  "STABLE",
                                  "TRIGGERED"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "New Asset",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_ASSET"
                          ],
                          "example": "NEW_ASSET"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the Asset data"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "New Category on Work Order",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_CATEGORY_ON_WORK_ORDER"
                          ],
                          "example": "NEW_CATEGORY_ON_WORK_ORDER"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfCategories": {
                              "type": "array",
                              "description": "At least one of those categories should be on the work order to trigger the webhook.",
                              "items": {
                                "oneOf": [
                                  {
                                    "title": "Name",
                                    "type": "string",
                                    "description": "Category name"
                                  },
                                  {
                                    "title": "ID",
                                    "type": "integer",
                                    "description": "Global ID of a category"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "New Location",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_LOCATION"
                          ],
                          "example": "NEW_LOCATION"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        }
                      }
                    },
                    {
                      "title": "New Part",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_PART"
                          ],
                          "example": "NEW_PART"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the Part data"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "New Purchase Order",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_PURCHASE_ORDER"
                          ],
                          "example": "NEW_PURCHASE_ORDER"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the Purchase Order data"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "New Request",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_WORK_REQUEST"
                          ],
                          "example": "NEW_WORK_REQUEST"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        }
                      }
                    },
                    {
                      "title": "New Vendor",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_VENDOR"
                          ],
                          "example": "NEW_VENDOR"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        }
                      }
                    },
                    {
                      "title": "New Work Order",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "NEW_WORK_ORDER"
                          ],
                          "example": "NEW_WORK_ORDER"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the Work Order data"
                            }
                          }
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
  
                          }
                        }
                      }
                    },
                    {
                      "title": "Part Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "PART_CHANGE"
                          ],
                          "example": "PART_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the part data"
                            },
                            "onlySerializeFilteredProperties": {
                              "type": "boolean",
                              "description": "If true and serializeEntity is also set to true, only the filtered properties will be returned on update."
                            }
                          }
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfPartProperties": {
                              "type": "array",
                              "description": "Properties that will trigger the webhook. \u003Cbr\u003E*If no properties are selected, the webhook will be triggered on every changes",
                              "items": {
                                "title": "Properties",
                                "type": "string",
                                "enum": [
                                  "AREA",
                                  "ASSETS",
                                  "AVAILABLE_QUANTITY",
                                  "BARCODE",
                                  "DESCRIPTION",
                                  "EXTRA_FIELDS",
                                  "LOCATION",
                                  "MINIMUM_QUANTITY",
                                  "NAME",
                                  "PART_TYPES",
                                  "TEAMS",
                                  "UNIT_COST",
                                  "VENDORS"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Part Delete",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "PART_DELETE"
                          ],
                          "example": "PART_DELETE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the part data"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Part Quantity Changed",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "PART_QUANTITY_CHANGE"
                          ],
                          "example": "PART_QUANTITY_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        }
                      }
                    },
                    {
                      "title": "Purchase Order Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "PURCHASE_ORDER_CHANGE"
                          ],
                          "example": "PURCHASE_ORDER_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the purchase order data"
                            },
                            "onlySerializeFilteredProperties": {
                              "type": "boolean",
                              "description": "If true and serializeEntity is also set to true, only the filtered properties will be returned on update."
                            }
                          }
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfPurchaseOrderProperties": {
                              "type": "array",
                              "description": "Properties that will trigger the webhook. \u003Cbr\u003E*If no properties are selected, the webhook will be triggered on every changes",
                              "items": {
                                "title": "Properties",
                                "type": "string",
                                "enum": [
                                  "ATTACHMENTS",
                                  "BILLING_ADDRESS",
                                  "COSTS",
                                  "DUE_DATE",
                                  "EXTRA_FIELDS",
                                  "ITEMS",
                                  "NOTE",
                                  "OVERRIDE_NUMBER",
                                  "SHIPPING_ADDRESS",
                                  "STATUS",
                                  "VENDOR",
                                  "VENDOR_CONTACTS"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Purchase Order Status Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "PURCHASE_ORDER_STATUS_CHANGE"
                          ],
                          "example": "PURCHASE_ORDER_STATUS_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializePurchaseOrder": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the purchase order data"
                            },
                            "omitSendToVendorPopup": {
                              "type": "boolean",
                              "description": "If true, if the state change was done from the UI, the UI will not prompt the user to send the purchase order to the vendor. It will be assumed that the webhook took care of it."
                            }
                          }
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfStatuses": {
                              "type": "array",
                              "description": "Statuses that will trigger the webhook",
                              "items": {
                                "title": "Status",
                                "type": "string",
                                "enum": [
                                  "APPROVED",
                                  "CANCELED",
                                  "COMPLETED",
                                  "DECLINED",
                                  "PARTIALLY_FULFILLED",
                                  "PENDING",
                                  "REQUESTED"
                                ]
                              }
                            },
                            "vendors": {
                              "type": "array",
                              "description": "Vendors id that will trigger the webhook",
                              "items": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Work Order Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "WORK_ORDER_CHANGE"
                          ],
                          "example": "WORK_ORDER_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the work order data"
                            },
                            "onlySerializeFilteredProperties": {
                              "type": "boolean",
                              "description": "If true and serializeEntity is also set to true, only the filtered properties will be returned on update."
                            }
                          }
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfProperties": {
                              "type": "array",
                              "description": "Properties that will trigger the webhook. \u003Cbr\u003E*If no properties are selected, the webhook will be triggered on every changes",
                              "items": {
                                "title": "Properties",
                                "type": "string",
                                "enum": [
                                  "ASSET",
                                  "ASSIGNEES",
                                  "CATEGORIES",
                                  "COSTS",
                                  "DESCRIPTION",
                                  "DUE_DATE",
                                  "ESTIMATED_TIME",
                                  "EXTRA_FIELDS",
                                  "LOCATION",
                                  "PARTS",
                                  "PRIORITY",
                                  "START_DATE",
                                  "TEAMS",
                                  "TITLE",
                                  "VENDORS"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Work Order Delete",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "WORK_ORDER_DELETE"
                          ],
                          "example": "WORK_ORDER_DELETE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the work order data"
                            }
                          }
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
  
                          }
                        }
                      }
                    },
                    {
                      "title": "Work Order Overdue",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "WORK_ORDER_OVERDUE"
                          ],
                          "example": "WORK_ORDER_OVERDUE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        }
                      }
                    },
                    {
                      "title": "Work Order Status Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "WORK_ORDER_STATUS_CHANGE"
                          ],
                          "example": "WORK_ORDER_STATUS_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "options": {
                          "type": "object",
                          "description": "Possible options",
                          "properties": {
                            "serializeEntity": {
                              "type": "boolean",
                              "description": "If true, the webhook will receive the work order data"
                            }
                          }
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfStatuses": {
                              "type": "array",
                              "description": "Statuses that will trigger the webhook.\u003Cbr\u003E Note, that `\"CANCELED\"` and `\"SKIPPED\"` statuses are only available if this feature is enabled in your organization.",
                              "items": {
                                "title": "Status",
                                "type": "string",
                                "enum": [
                                  "OPEN",
                                  "IN_PROGRESS",
                                  "ON_HOLD",
                                  "DONE",
                                  "CANCELED",
                                  "SKIPPED"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Work Request Status Change",
                      "type": "object",
                      "required": [
                        "type",
                        "url"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of event subscribed to",
                          "enum": [
                            "WORK_REQUEST_STATUS_CHANGE"
                          ],
                          "example": "WORK_REQUEST_STATUS_CHANGE"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://example.com"
                        },
                        "filters": {
                          "type": "object",
                          "description": "Possible filters.",
                          "properties": {
                            "oneOfStatuses": {
                              "type": "array",
                              "description": "Statuses that will trigger the webhook.",
                              "items": {
                                "title": "Status",
                                "type": "string",
                                "enum": [
                                  "APPROVED",
                                  "DONE",
                                  "REJECTED"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created subscription",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id",
                      "status"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the subscription"
                      },
                      "status": {
                        "type": "string",
                        "description": "Validation status of the subscription. Contact support if your subscription returns PENDING_APPROVAL before using the subscription.",
                        "enum": [
                          "VALID",
                          "PENDING_APPROVAL"
                        ]
                      },
                      "secret": {
                        "type": "string",
                        "description": "Secret to hash the Hmac signature"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to create the subscription",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User don't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        }
      },
      "/subscriptions/{id}/secret": {
        "get": {
          "summary": "Get secret information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the subscription",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched secret",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "secret"
                    ],
                    "properties": {
                      "secret": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified subscription.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "subscription Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Subscriptions & Webhooks"
          ]
        }
      },
      "/subscriptions/{id}": {
        "get": {
          "summary": "Get subscription",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the subscription",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved subscription's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "subscription"
                    ],
                    "properties": {
                      "subscription": {
                        "type": "object",
                        "required": [
                          "id",
                          "type",
                          "url",
                          "status"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the subscription"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of event subscribed to",
                            "enum": [
                              "ASSET_STATUS_CHANGE",
                              "METER_TRIGGER_STATE_CHANGE",
                              "NEW_ASSET",
                              "NEW_CATEGORY_ON_WORK_ORDER",
                              "NEW_LOCATION",
                              "NEW_PART",
                              "NEW_PURCHASE_ORDER",
                              "NEW_VENDOR",
                              "NEW_WORK_ORDER",
                              "NEW_WORK_REQUEST",
                              "PART_QUANTITY_CHANGE",
                              "PURCHASE_ORDER_CHANGE",
                              "PART_CHANGE",
                              "PART_DELETE",
                              "PURCHASE_ORDER_STATUS_CHANGE",
                              "WORK_ORDER_CHANGE",
                              "WORK_ORDER_DELETE",
                              "WORK_ORDER_OVERDUE",
                              "WORK_ORDER_STATUS_CHANGE",
                              "WORK_REQUEST_STATUS_CHANGE"
                            ],
                            "example": "ASSET_STATUS_CHANGE"
                          },
                          "url": {
                            "type": "string",
                            "example": "https://example.com"
                          },
                          "status": {
                            "type": "string",
                            "description": "Validation status of the subscription. Contact support if your subscription returns PENDING_APPROVAL before using the subscription.",
                            "enum": [
                              "VALID",
                              "PENDING_APPROVAL"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified subscription or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Subscriptions & Webhooks"
          ]
        },
        "patch": {
          "summary": "Update subscription information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the subscription",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Subscription to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Type of event subscribed to",
                      "enum": [
                        "ASSET_STATUS_CHANGE",
                        "METER_TRIGGER_STATE_CHANGE",
                        "NEW_ASSET",
                        "NEW_CATEGORY_ON_WORK_ORDER",
                        "NEW_LOCATION",
                        "NEW_PART",
                        "NEW_PURCHASE_ORDER",
                        "NEW_VENDOR",
                        "NEW_WORK_ORDER",
                        "NEW_WORK_REQUEST",
                        "PART_QUANTITY_CHANGE",
                        "PURCHASE_ORDER_CHANGE",
                        "PART_CHANGE",
                        "PART_DELETE",
                        "PURCHASE_ORDER_STATUS_CHANGE",
                        "WORK_ORDER_CHANGE",
                        "WORK_ORDER_DELETE",
                        "WORK_ORDER_OVERDUE",
                        "WORK_ORDER_STATUS_CHANGE",
                        "WORK_REQUEST_STATUS_CHANGE"
                      ],
                      "example": "ASSET_STATUS_CHANGE"
                    },
                    "url": {
                      "type": "string",
                      "example": "https://example.com"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited subscription",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "subscription"
                    ],
                    "properties": {
                      "subscription": {
                        "type": "object",
                        "required": [
                          "id",
                          "type",
                          "url",
                          "status"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the subscription"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of event subscribed to",
                            "enum": [
                              "ASSET_STATUS_CHANGE",
                              "METER_TRIGGER_STATE_CHANGE",
                              "NEW_ASSET",
                              "NEW_CATEGORY_ON_WORK_ORDER",
                              "NEW_LOCATION",
                              "NEW_PART",
                              "NEW_PURCHASE_ORDER",
                              "NEW_VENDOR",
                              "NEW_WORK_ORDER",
                              "NEW_WORK_REQUEST",
                              "PART_QUANTITY_CHANGE",
                              "PURCHASE_ORDER_CHANGE",
                              "PART_CHANGE",
                              "PART_DELETE",
                              "PURCHASE_ORDER_STATUS_CHANGE",
                              "WORK_ORDER_CHANGE",
                              "WORK_ORDER_DELETE",
                              "WORK_ORDER_OVERDUE",
                              "WORK_ORDER_STATUS_CHANGE",
                              "WORK_REQUEST_STATUS_CHANGE"
                            ],
                            "example": "ASSET_STATUS_CHANGE"
                          },
                          "url": {
                            "type": "string",
                            "example": "https://example.com"
                          },
                          "status": {
                            "type": "string",
                            "description": "Validation status of the subscription. Contact support if your subscription returns PENDING_APPROVAL before using the subscription.",
                            "enum": [
                              "VALID",
                              "PENDING_APPROVAL"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified subscription.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "subscription Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Subscriptions & Webhooks"
          ]
        },
        "delete": {
          "summary": "Remove subscription",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the subscription",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed subscription"
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to remove the subscription",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User don't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified subscription.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "subscription Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Subscriptions & Webhooks"
          ]
        }
      },
      "/teams": {
        "post": {
          "summary": "Create new team",
          "requestBody": {
            "description": "Team to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Cleaning"
                    },
                    "description": {
                      "type": "string",
                      "example": "Team responsible for cleaning the factory"
                    },
                    "assetIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of asset IDs that the team is responsible for",
                      "example": [12, 46]
                    },
                    "locationIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of location where the team is operating",
                      "example": [7, 145, 988]
                    },
                    "memberIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of user IDs that are part of the team",
                      "example": [98, 46, 744]
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created team",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the team"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Teams"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List teams",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Teams returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Teams list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "teams"
                    ],
                    "properties": {
                      "teams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the team"
                            },
                            "name": {
                              "type": "string",
                              "example": "Cleaning"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Teams.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Teams.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Teams"
          ]
        }
      },
      "/teams/{id}": {
        "get": {
          "summary": "Get team",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the team",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved team's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "team"
                    ],
                    "properties": {
                      "team": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "membersCount"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the team"
                          },
                          "name": {
                            "type": "string",
                            "example": "Cleaning"
                          },
                          "description": {
                            "type": "string",
                            "example": "Team responsible for cleaning the factory"
                          },
                          "assetIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of asset IDs that the team is responsible for",
                            "example": [12, 46]
                          },
                          "membersCount": {
                            "type": "integer",
                            "example": 3,
                            "description": "Number of team members"
                          },
                          "locationIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of location where the team is operating",
                            "example": [7, 145, 988]
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified team or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Teams"
          ]
        },
        "patch": {
          "summary": "Update team information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the team",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Team to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Cleaning"
                    },
                    "description": {
                      "type": "string",
                      "example": "Team responsible for cleaning the factory"
                    },
                    "locationIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of location where the team is operating",
                      "example": [7, 145, 988]
                    },
                    "assetIds": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "description": "List of asset IDs that the team is responsible for",
                      "example": [12, 46]
                    },
                    "membersCount": {
                      "type": "integer",
                      "example": 3,
                      "description": "Number of team members"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited team",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "team"
                    ],
                    "properties": {
                      "team": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "membersCount"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the team"
                          },
                          "name": {
                            "type": "string",
                            "example": "Cleaning"
                          },
                          "description": {
                            "type": "string",
                            "example": "Team responsible for cleaning the factory"
                          },
                          "assetIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of asset IDs that the team is responsible for",
                            "example": [12, 46]
                          },
                          "membersCount": {
                            "type": "integer",
                            "example": 3,
                            "description": "Number of team members"
                          },
                          "locationIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of location where the team is operating",
                            "example": [7, 145, 988]
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the team",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "team ID is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified team.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "team Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Teams"
          ]
        },
        "delete": {
          "summary": "Delete team",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the team",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the team"
            },
            "400": {
              "description": "Failed to Delete the team",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified team.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "team Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Teams"
          ]
        }
      },
      "/teams/{id}/members": {
        "post": {
          "summary": "Add user to team",
          "requestBody": {
            "description": "Member to add to team",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 963,
                      "description": "Global ID of the user"
                    },
                    "teamRole": {
                      "type": "string",
                      "enum": [
                        "ADMIN",
                        "MEMBER"
                      ],
                      "example": "MEMBER"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully added team member",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the user"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to add the team member",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "ID is invalid or user is not part of the organization"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified team member.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "team member Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the team",
              "example": "1"
            }
          ],
          "tags": [
            "Teams"
          ]
        },
        "get": {
          "summary": "List team members",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Members returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the team",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Members list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "members"
                    ],
                    "properties": {
                      "members": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "teamRole"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the user"
                            },
                            "firstName": {
                              "type": "string",
                              "example": "John"
                            },
                            "lastName": {
                              "type": "string",
                              "example": "Doe"
                            },
                            "teamRole": {
                              "type": "string",
                              "enum": [
                                "ADMIN",
                                "MEMBER"
                              ],
                              "example": "MEMBER"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Members.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Members.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Cannot find the parent resource",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Teams"
          ]
        }
      },
      "/teams/{teamId}/members/{userId}": {
        "patch": {
          "summary": "Update team member information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "teamId",
              "in": "path",
              "required": true,
              "description": "ID of the team",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "userId",
              "in": "path",
              "required": true,
              "description": "User ID of the member",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Team to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "teamRole": {
                      "type": "string",
                      "enum": [
                        "ADMIN",
                        "MEMBER"
                      ],
                      "example": "MEMBER"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited team member",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "member"
                    ],
                    "properties": {
                      "member": {
                        "type": "object",
                        "required": [
                          "id",
                          "teamRole"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the user"
                          },
                          "firstName": {
                            "type": "string",
                            "example": "John"
                          },
                          "lastName": {
                            "type": "string",
                            "example": "Doe"
                          },
                          "teamRole": {
                            "type": "string",
                            "enum": [
                              "ADMIN",
                              "MEMBER"
                            ],
                            "example": "MEMBER"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the team",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "team role is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified team member.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "team member Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Teams"
          ]
        },
        "delete": {
          "summary": "Remove user from team",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "teamId",
              "in": "path",
              "required": true,
              "description": "ID of the team",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "userId",
              "in": "path",
              "required": true,
              "description": "User ID of the member",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed team member"
            },
            "400": {
              "description": "Failed to remove the team",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Error while deleting team."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified team member.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "team member Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Teams"
          ]
        }
      },
      "/users": {
        "post": {
          "summary": "Create new user",
          "requestBody": {
            "description": "User to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "firstName",
                    "lastName"
                  ],
                  "properties": {
                    "firstName": {
                      "type": "string",
                      "example": "John"
                    },
                    "lastName": {
                      "type": "string",
                      "example": "Doe"
                    },
                    "role": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "ADMIN",
                        "MEMBER",
                        "REQUESTER",
                        "SERVICE_ACCOUNT"
                      ],
                      "example": "MEMBER"
                    },
                    "email": {
                      "type": "string",
                      "nullable": true,
                      "example": "user@example.com"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "nullable": true,
                      "example": "415-555-0100"
                    },
                    "externalData": {
                      "description": "Extra data that can be attached to the user, for example to help reference to a matching record in an external system.",
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "example": {
                            "popularErpSolutionId": "asd732da"
                          }
                        },
                        {
                          "type": "number",
                          "example": 732
                        },
                        {
                          "type": "string",
                          "example": "asd732da"
                        }
                      ]
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Department": "Engineering"
                      }
                    },
                    "inviteType": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "ALL",
                        "EMAIL",
                        "SMS",
                        "NONE"
                      ],
                      "example": "ALL"
                    },
                    "hourlyRate": {
                      "type": "integer",
                      "nullable": true,
                      "example": 120,
                      "description": "Cost in cents. For example, for $1.20, put 120. Set to `null` to set the user's rate to organization default hourly rate if defined, otherwise it would set the rate to the user's hourly rate defined in any work order. If none is defined, setting `null` will set the user's hourly rate to `null`"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created user",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the user"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to create the user",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You do not have permission to create this user."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified User.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "User Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Users"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List users",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Users returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "onlyAssignable",
              "schema": {
                "type": "boolean",
                "description": "Will only show users that can be assigned to a work order"
              },
              "in": "query"
            },
            {
              "name": "email",
              "schema": {
                "type": "array",
                "description": "Filter users by email. You can filter for multiple users by specifying multiple emails like so: `/users?email=user1@example.com&email=user2@example.com`. Note that if you are using special characters in a url, you will need to URI encode them in order for us to interprete them correctly. For example, `+` should be encoded as `%2B` and though we accept `@`, they should still be encoded as `%40`. So filtering for email `user1+test@example.com`, you would use `/users?email=user1%2Btest%example.com` in your URI",
                "items": {
                  "type": "string"
                }
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=role&expand=extra_fields`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "role",
                    "extra_fields"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Users list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "users"
                    ],
                    "properties": {
                      "users": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "firstName",
                            "lastName"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the user"
                            },
                            "firstName": {
                              "type": "string",
                              "example": "John"
                            },
                            "lastName": {
                              "type": "string",
                              "example": "Doe"
                            },
                            "email": {
                              "type": "string",
                              "nullable": true,
                              "example": "user@example.com"
                            },
                            "phoneNumber": {
                              "type": "string",
                              "nullable": true,
                              "example": "415-555-0100"
                            },
                            "authType": {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                "NORMAL",
                                "SAML"
                              ],
                              "example": "SAML"
                            },
                            "hourlyRate": {
                              "type": "integer",
                              "nullable": true,
                              "example": 120,
                              "description": "Cost in cents. For example, for $1.20, the value will be 120. If the hourly rate is not set specifically for the user, the API will return the default organization hourly rate, if that is also not set, it will return the hourly rate that is specifically set for the user in any work order. Otherwise, it would be `undefined`"
                            },
                            "role": {
                              "type": "string",
                              "nullable": false,
                              "enum": [
                                "ADMIN",
                                "MEMBER",
                                "REQUESTER",
                                "SERVICE_ACCOUNT"
                              ],
                              "example": "MEMBER",
                              "description": "(expand with query parameter)"
                            },
                            "extraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\") (expand with query parameter)",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Department": "Engineering"
                              },
                              "nullable": false
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Users.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Users.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Users"
          ]
        }
      },
      "/users/{id}/messages": {
        "post": {
          "summary": "Create new direct message to a user",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the user",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Message to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "content"
                  ],
                  "properties": {
                    "content": {
                      "type": "string",
                      "description": "Content of the message to post"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the message",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "conversationId"
                    ],
                    "properties": {
                      "conversationId": {
                        "type": "number",
                        "description": "ID of the conversation"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the message",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "should have required property 'content'",
                          "fieldPath": "content"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "No conversation permissions",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot create conversations",
                          "fieldPath": "content"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified user.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "user Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Users"
          ]
        }
      },
      "/users/{id}": {
        "get": {
          "summary": "Get user",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the user",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved user's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "user"
                    ],
                    "properties": {
                      "user": {
                        "type": "object",
                        "required": [
                          "id",
                          "firstName",
                          "lastName"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the user"
                          },
                          "firstName": {
                            "type": "string",
                            "example": "John"
                          },
                          "lastName": {
                            "type": "string",
                            "example": "Doe"
                          },
                          "role": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "ADMIN",
                              "MEMBER",
                              "REQUESTER",
                              "SERVICE_ACCOUNT"
                            ],
                            "example": "MEMBER"
                          },
                          "email": {
                            "type": "string",
                            "nullable": true,
                            "example": "user@example.com"
                          },
                          "phoneNumber": {
                            "type": "string",
                            "nullable": true,
                            "example": "415-555-0100"
                          },
                          "removedFromOrganization": {
                            "type": "boolean",
                            "example": true
                          },
                          "authType": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "NORMAL",
                              "SAML"
                            ],
                            "example": "SAML"
                          },
                          "hourlyRate": {
                            "type": "integer",
                            "nullable": true,
                            "example": 120,
                            "description": "Cost in cents. For example, for $1.20, the value will be 120. If the hourly rate is not set specifically for the user, the API will return the default organization hourly rate, if that is also not set, it will return the hourly rate that is specifically set for the user in any work order. Otherwise, it would be `undefined`"
                          },
                          "externalData": {
                            "description": "Extra data that can be attached to the user, for example to help reference to a matching record in an external system.",
                            "nullable": true,
                            "oneOf": [
                              {
                                "type": "object",
                                "example": {
                                  "popularErpSolutionId": "asd732da"
                                }
                              },
                              {
                                "type": "number",
                                "example": 732
                              },
                              {
                                "type": "string",
                                "example": "asd732da"
                              }
                            ]
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Department": "Engineering"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified user or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Users"
          ]
        },
        "patch": {
          "summary": "Update user information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the user",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "User to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "firstName": {
                      "type": "string",
                      "example": "John"
                    },
                    "lastName": {
                      "type": "string",
                      "example": "Doe"
                    },
                    "email": {
                      "type": "string",
                      "nullable": true,
                      "example": "user@example.com"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "nullable": true,
                      "example": "415-555-0100"
                    },
                    "role": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "ADMIN",
                        "MEMBER",
                        "REQUESTER",
                        "SERVICE_ACCOUNT"
                      ],
                      "example": "MEMBER"
                    },
                    "authType": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "NORMAL",
                        "SAML"
                      ],
                      "example": "SAML"
                    },
                    "externalData": {
                      "description": "Extra data that can be attached to the user, for example to help reference to a matching record in an external system.",
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "example": {
                            "popularErpSolutionId": "asd732da"
                          }
                        },
                        {
                          "type": "number",
                          "example": 732
                        },
                        {
                          "type": "string",
                          "example": "asd732da"
                        }
                      ]
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Department": "Engineering"
                      }
                    },
                    "hourlyRate": {
                      "type": "integer",
                      "nullable": true,
                      "example": 120,
                      "description": "Cost in cents. For example, for $1.20, put 120. Set to `null` to set the user's rate to organization default hourly rate if defined, otherwise it would set the rate to the user's hourly rate defined in any work order. If none is defined, setting `null` will set the user's hourly rate to `null`"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited user",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "user"
                    ],
                    "properties": {
                      "user": {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the user"
                          },
                          "firstName": {
                            "type": "string",
                            "example": "John"
                          },
                          "lastName": {
                            "type": "string",
                            "example": "Doe"
                          },
                          "role": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "ADMIN",
                              "MEMBER",
                              "REQUESTER",
                              "SERVICE_ACCOUNT"
                            ],
                            "example": "MEMBER"
                          },
                          "email": {
                            "type": "string",
                            "nullable": true,
                            "example": "user@example.com"
                          },
                          "phoneNumber": {
                            "type": "string",
                            "nullable": true,
                            "example": "415-555-0100"
                          },
                          "removedFromOrganization": {
                            "type": "boolean",
                            "example": true
                          },
                          "authType": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "NORMAL",
                              "SAML"
                            ],
                            "example": "SAML"
                          },
                          "hourlyRate": {
                            "type": "integer",
                            "nullable": true,
                            "example": 120,
                            "description": "Cost in cents. For example, for $1.20, the value will be 120. If the hourly rate is not set specifically for the user, the API will return the default organization hourly rate, if that is also not set, it will return the hourly rate that is specifically set for the user in any work order. Otherwise, it would be `undefined`"
                          },
                          "externalData": {
                            "description": "Extra data that can be attached to the user, for example to help reference to a matching record in an external system.",
                            "nullable": true,
                            "oneOf": [
                              {
                                "type": "object",
                                "example": {
                                  "popularErpSolutionId": "asd732da"
                                }
                              },
                              {
                                "type": "number",
                                "example": 732
                              },
                              {
                                "type": "string",
                                "example": "asd732da"
                              }
                            ]
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Department\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Department": "Engineering"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Cannot edit Auth Type",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You do not have permission to edit the Auth Type from SAML to NORMAL."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified user.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "user Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Users"
          ]
        },
        "delete": {
          "summary": "Remove user from organization",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the user",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed user"
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified user.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "user Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Users"
          ]
        }
      },
      "/vendors": {
        "post": {
          "summary": "Create new vendor",
          "requestBody": {
            "description": "Vendor to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Acme Corp"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "example": "Provider of Acme service"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Qualifications\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Qualifications": "ISO 000"
                      }
                    },
                    "emails": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "vendor@example.com"
                      ],
                      "description": "List of email address",
                      "deprecated": true
                    },
                    "phoneNumbers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "415-555-0100"
                      ],
                      "description": "List of phone number",
                      "deprecated": true
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created vendor",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the vendor"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Vendors"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List vendors",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Vendors returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "customFieldName",
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter vendors by custom field value. Your query parameter should be your custom field name. (ie: To filter by a custom field named \"Industry\" with the value \"Construction\", you would do this \"/vendors?Industry=Construction\").\n                    \u003Cbr\u003E\u003Cbr\u003EAdding multiple instance of the same custom field act as an \u003Ccode\u003EOR\u003C/code\u003E and adding a different custom field act as an \u003Ccode\u003EAND\u003C/code\u003E. (ie: To filter by a custom field named \u003Ccode\u003EIndustry\u003C/code\u003E with the value \u003Ccode\u003EConstruction\u003C/code\u003E OR \u003Ccode\u003ETransportation\u003C/code\u003E AND the custom field \u003Ccode\u003EManufacturer\u003C/code\u003E with the value \u003Ccode\u003EACME\u003C/code\u003E, you would do this \u003Ccode\u003E/vendors?Industry=Construction&Industry=Transportation&Manufacturer=ACME\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003EIf your custom field label is the same as a reserved query parameter such as \u003Ccode\u003Elimit\u003C/code\u003E, \u003Ccode\u003Esort\u003C/code\u003E, \u003Ccode\u003Eexpand\u003C/code\u003E, etc, you can add \u003Ccode\u003E__c\u003C/code\u003E to your custom field filtering (ie: To filter by a custom field named \u003Ccode\u003Elimit\u003C/code\u003E with the value \u003Ccode\u003Eten\u003C/code\u003E, you would do this \u003Ccode\u003E/vendors?limit__c=ten\u003C/code\u003E).\n                    \u003Cbr\u003E\u003Cbr\u003ENote that your custom field needs to be created beforehand. Only number and single line text custom field types are supported."
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "extra_fields"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Vendors list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "vendors"
                    ],
                    "properties": {
                      "vendors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the vendor"
                            },
                            "name": {
                              "type": "string",
                              "example": "Acme Corp"
                            },
                            "extraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Qualifications\") (expand with query parameter)",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Qualifications": "ISO 000"
                              },
                              "nullable": false
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Vendors.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Vendors.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Vendors"
          ]
        }
      },
      "/vendors/{id}": {
        "get": {
          "summary": "Get vendor",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved vendor's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "vendor"
                    ],
                    "properties": {
                      "vendor": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the vendor"
                          },
                          "name": {
                            "type": "string",
                            "example": "Acme Corp"
                          },
                          "emails": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "vendor@example.com"
                            ],
                            "description": "List of email address",
                            "deprecated": true
                          },
                          "phoneNumbers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "415-555-0100"
                            ],
                            "description": "List of phone number",
                            "deprecated": true
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": "Provider of Acme service"
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the vendor",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "contactIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [1, 4, 13],
                            "description": "List of contact IDs"
                          },
                          "deletedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date that the vendor was deleted",
                            "example": "2022-01-01T00:00:00.000Z",
                            "nullable": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Qualifications\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Qualifications": "ISO 000"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified vendor or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        },
        "patch": {
          "summary": "Update vendor information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Vendor to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Acme Corp"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true,
                      "example": "Provider of Acme service"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Qualifications\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Qualifications": "ISO 000"
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited vendor",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "vendor"
                    ],
                    "properties": {
                      "vendor": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the vendor"
                          },
                          "name": {
                            "type": "string",
                            "example": "Acme Corp"
                          },
                          "emails": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "vendor@example.com"
                            ],
                            "description": "List of email address",
                            "deprecated": true
                          },
                          "phoneNumbers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "415-555-0100"
                            ],
                            "description": "List of phone number",
                            "deprecated": true
                          },
                          "description": {
                            "type": "string",
                            "nullable": true,
                            "example": "Provider of Acme service"
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the vendor",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "contactIds": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [1, 4, 13],
                            "description": "List of contact IDs"
                          },
                          "deletedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date that the vendor was deleted",
                            "example": "2022-01-01T00:00:00.000Z",
                            "nullable": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Qualifications\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Qualifications": "ISO 000"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the vendor",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "parentId is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified vendor.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "vendor Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        },
        "delete": {
          "summary": "Delete vendor",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the vendor"
            },
            "400": {
              "description": "Failed to Delete the vendor",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified vendor.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "vendor Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        }
      },
      "/vendors/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update vendor attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated vendor's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified vendor.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "vendor Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        },
        "delete": {
          "summary": "Remove vendor attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed vendor's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        }
      },
      "/vendors/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update vendor's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the vendor thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated vendor's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Vendor.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Vendor Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        }
      },
      "/vendors/{id}/contacts": {
        "post": {
          "summary": "Create new contact",
          "requestBody": {
            "description": "Contact to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "nullable": true,
                      "example": "Team Lead",
                      "description": "Role/Label of the contact."
                    },
                    "email": {
                      "type": "string",
                      "example": "john@doe.com",
                      "nullable": true,
                      "description": "Email address of contact."
                    },
                    "phoneNumber": {
                      "type": "string",
                      "example": "1234567890",
                      "nullable": true,
                      "description": "Phone number of contact"
                    },
                    "extension": {
                      "type": "string",
                      "example": "4682",
                      "nullable": true,
                      "description": "Phone number extension"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created contact",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id",
                      "name",
                      "role",
                      "email",
                      "phoneNumber",
                      "extension",
                      "vendorId"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": 135,
                        "description": "Global ID of the contact"
                      },
                      "name": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string",
                        "nullable": true,
                        "example": "Team Lead",
                        "description": "Role/Label of the contact."
                      },
                      "email": {
                        "type": "string",
                        "example": "john@doe.com",
                        "nullable": true,
                        "description": "Email address of contact."
                      },
                      "phoneNumber": {
                        "type": "string",
                        "example": "1234567890",
                        "nullable": true,
                        "description": "Phone number of contact"
                      },
                      "extension": {
                        "type": "string",
                        "example": "4682",
                        "nullable": true,
                        "description": "Phone number extension"
                      },
                      "vendorId": {
                        "type": "number",
                        "example": 432,
                        "description": "ID of vendor that contact will be associated to"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the contact",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "errors with request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Vendor.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Vendor Not Found"
                      }
                    }
                  }
                }
              }
            },
            "429": {
              "description": "Too many requests. Please retry in 10 seconds",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Too many requests. Please retry in 10 seconds"
                      }
                    }
                  }
                }
              }
            }
          },
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            }
          ],
          "tags": [
            "Vendors"
          ]
        },
        "get": {
          "summary": "List contacts",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Contacts returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Contacts list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "contacts"
                    ],
                    "properties": {
                      "contacts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "role",
                            "email",
                            "extension",
                            "phoneNumber",
                            "vendorId"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 135,
                              "description": "Global ID of the contact"
                            },
                            "name": {
                              "type": "string"
                            },
                            "role": {
                              "type": "string",
                              "nullable": true,
                              "example": "Team Lead",
                              "description": "Role/Label of the contact."
                            },
                            "email": {
                              "type": "string",
                              "example": "john@doe.com",
                              "nullable": true,
                              "description": "Email address of contact."
                            },
                            "phoneNumber": {
                              "type": "string",
                              "example": "1234567890",
                              "nullable": true,
                              "description": "Phone number of contact"
                            },
                            "extension": {
                              "type": "string",
                              "example": "4682",
                              "nullable": true,
                              "description": "Phone number extension"
                            },
                            "vendorId": {
                              "type": "number",
                              "example": 432,
                              "description": "ID of vendor that contact will be associated to"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Contacts.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Contacts.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Cannot find the parent resource",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        }
      },
      "/vendors/{id}/contacts/{contactId}": {
        "get": {
          "summary": "Get contact",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "contactId",
              "in": "path",
              "required": true,
              "description": "ID of the contact",
              "example": "12"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully got contact",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "vendorContact"
                    ],
                    "properties": {
                      "vendorContact": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "role",
                          "email",
                          "phoneNumber",
                          "extension",
                          "vendorId"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 135,
                            "description": "Global ID of the contact"
                          },
                          "name": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "nullable": true,
                            "example": "Team Lead",
                            "description": "Role/Label of the contact."
                          },
                          "email": {
                            "type": "string",
                            "example": "john@doe.com",
                            "nullable": true,
                            "description": "Email address of contact."
                          },
                          "phoneNumber": {
                            "type": "string",
                            "example": "1234567890",
                            "nullable": true,
                            "description": "Phone number of contact"
                          },
                          "extension": {
                            "type": "string",
                            "example": "4682",
                            "nullable": true,
                            "description": "Phone number extension"
                          },
                          "vendorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of vendor that contact will be associated to"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to get contact",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "error with request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Contact.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Contact Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        },
        "patch": {
          "summary": "Update contact information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "contactId",
              "in": "path",
              "required": true,
              "description": "ID of the contact",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Contact to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "nullable": true,
                      "example": "Team Lead",
                      "description": "Role/Label of the contact."
                    },
                    "email": {
                      "type": "string",
                      "example": "john@doe.com",
                      "nullable": true,
                      "description": "Email address of contact."
                    },
                    "phoneNumber": {
                      "type": "string",
                      "example": "1234567890",
                      "nullable": true,
                      "description": "Phone number of contact"
                    },
                    "extension": {
                      "type": "string",
                      "example": "4682",
                      "nullable": true,
                      "description": "Phone number extension"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully updated contact",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "contact"
                    ],
                    "properties": {
                      "contact": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "role",
                          "email",
                          "phoneNumber",
                          "extension",
                          "vendorId"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 135,
                            "description": "Global ID of the contact"
                          },
                          "name": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "nullable": true,
                            "example": "Team Lead",
                            "description": "Role/Label of the contact."
                          },
                          "email": {
                            "type": "string",
                            "example": "john@doe.com",
                            "nullable": true,
                            "description": "Email address of contact."
                          },
                          "phoneNumber": {
                            "type": "string",
                            "example": "1234567890",
                            "nullable": true,
                            "description": "Phone number of contact"
                          },
                          "extension": {
                            "type": "string",
                            "example": "4682",
                            "nullable": true,
                            "description": "Phone number extension"
                          },
                          "vendorId": {
                            "type": "number",
                            "example": 432,
                            "description": "ID of vendor that contact will be associated to"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to update the contact",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "error with the request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Contact.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Contact Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        },
        "delete": {
          "summary": "Delete contact",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the vendor",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "contactId",
              "in": "path",
              "required": true,
              "description": "ID of the contact",
              "example": "32"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed contact"
            },
            "400": {
              "description": "Failed to remove the contact",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "error with the request"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Contact.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Contact Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Vendors"
          ]
        }
      },
      "/workorders": {
        "post": {
          "summary": "Create new work order",
          "requestBody": {
            "description": "Work order to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "title"
                  ],
                  "properties": {
                    "assetId": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "assignees": {
                      "type": "array",
                      "description": "Either the teamId, the userId or the user email address",
                      "items": {
                        "type": "object",
                        "title": "assignees",
                        "required": [
                          "type",
                          "id"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "example": "USER",
                            "enum": [
                              "USER",
                              "TEAM"
                            ]
                          },
                          "id": {
                            "oneOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "estimatedTime": {
                      "type": "integer",
                      "nullable": true,
                      "description": "The estimated time taken in seconds to complete the work order",
                      "example": 3600
                    },
                    "requesterId": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "nullable": true
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "ID or email of the user who requested the work order"
                    },
                    "workRequestId": {
                      "nullable": true,
                      "type": "integer",
                      "description": "ID of the Work Request that will be approved by the creation of this work order"
                    },
                    "workOrderTemplateId": {
                      "type": "integer",
                      "nullable": true,
                      "description": "ID of the Work Order Template that will be used to create this work order. Note that data from the payload will overwrite the Template data. Also, restrictions defined by the Template (EG: Required/Hidden/Read-Only fields) will apply."
                    },
                    "categories": {
                      "type": "array",
                      "description": "List of categories that identify the work order",
                      "items": {
                        "type": "string",
                        "example": "Cleaning",
                        "uniqueItems": true
                      }
                    },
                    "description": {
                      "nullable": true,
                      "type": "string",
                      "example": "A work order sample description"
                    },
                    "dueDate": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Date & time at which the work order is due",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "externalData": {
                      "description": "Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.",
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "example": {
                            "popularErpSolutionId": "asd732da"
                          }
                        },
                        {
                          "type": "number",
                          "example": 732
                        },
                        {
                          "type": "string",
                          "example": "asd732da"
                        }
                      ]
                    },
                    "startDate": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "locationId": {
                      "nullable": true,
                      "type": "integer",
                      "description": "Global ID of the location assigned to the work order"
                    },
                    "priority": {
                      "type": "string",
                      "example": "MEDIUM",
                      "enum": [
                        "NONE",
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ]
                    },
                    "procedure": {
                      "type": "object",
                      "nullable": true,
                      "required": [
                        "title",
                        "fields"
                      ],
                      "properties": {
                        "id": {
                          "type": "number",
                          "example": 1234,
                          "deprecated": true,
                          "description": "You should favor 'procedureTemplateId' to attach a procedure template."
                        },
                        "title": {
                          "type": "string",
                          "description": "Title of the procedure",
                          "example": "Control dashboard audit"
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "type",
                              "label"
                            ],
                            "properties": {
                              "label": {
                                "type": "string",
                                "example": "Metal Parts: broken, loose, dented, rusty, missing"
                              },
                              "type": {
                                "type": "string",
                                "example": "INSPECTION_CHECK",
                                "enum": [
                                  "NUMBER",
                                  "AMOUNT",
                                  "TEXT",
                                  "UNSUPPORTED",
                                  "HEADING",
                                  "FILE",
                                  "SIGNATURE",
                                  "MULTIPLE_CHOICE",
                                  "INSPECTION_CHECK",
                                  "YES_NO_NA",
                                  "CHECKBOX",
                                  "CHECKLIST",
                                  "METER",
                                  "DATE"
                                ]
                              },
                              "description": {
                                "type": "string",
                                "nullable": true
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "example": "Partially",
                                  "type": "string"
                                }
                              },
                              "urls": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "link"
                                  ],
                                  "properties": {
                                    "label": {
                                      "type": "string",
                                      "description": "Label of the url",
                                      "example": "maintainsoft Website"
                                    },
                                    "link": {
                                      "type": "string",
                                      "description": "Link",
                                      "example": "www.getmaintainsoft.com"
                                    }
                                  }
                                }
                              },
                              "meterId": {
                                "type": "number",
                                "example": 1,
                                "nullable": true,
                                "description": "Id of the meter"
                              },
                              "isDateAndTime": {
                                "type": "boolean",
                                "description": "Indicate if a DATE field also contains the time"
                              },
                              "index": {
                                "type": "number",
                                "example": 1,
                                "description": "Order which the row is displayed"
                              }
                            }
                          },
                          "description": "Steps of a procedure"
                        }
                      }
                    },
                    "procedureTemplateId": {
                      "type": "number",
                      "nullable": true,
                      "description": "ID of the procedure template to attach"
                    },
                    "repeatability": {
                      "type": "object",
                      "nullable": true,
                      "example": {
                        "type": "WEEKLY",
                        "interval": 3,
                        "days": [
                          "MONDAY",
                          "WEDNESDAY",
                          "FRIDAY"
                        ]
                      },
                      "oneOf": [
                        {
                          "type": "object",
                          "title": "Daily",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "DAILY",
                              "enum": [
                                "DAILY"
                              ]
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Weekly",
                          "required": [
                            "type",
                            "days"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "WEEKLY",
                              "enum": [
                                "WEEKLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of weeks between events",
                              "minimum": 1,
                              "maximum": 52,
                              "default": 1
                            },
                            "days": {
                              "type": "array",
                              "description": "Days of the week the event will occur",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "SUNDAY",
                                  "MONDAY",
                                  "TUESDAY",
                                  "WEDNESDAY",
                                  "THURSDAY",
                                  "FRIDAY",
                                  "SATURDAY"
                                ]
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Monthly",
                          "required": [
                            "type",
                            "day"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "MONTHLY",
                              "enum": [
                                "MONTHLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of months between events",
                              "minimum": 1,
                              "maximum": 24,
                              "default": 1
                            },
                            "day": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 31,
                              "description": "Day of the month the event will occur"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Yearly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "YEARLY",
                              "enum": [
                                "YEARLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of years between events",
                              "minimum": 1,
                              "maximum": 1000,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Periodically",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "PERIODICALLY",
                              "enum": [
                                "PERIODICALLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of seconds between events"
                            }
                          }
                        }
                      ]
                    },
                    "skipRestHook": {
                      "type": "boolean",
                      "deprecated": true,
                      "description": "When work order is created, will not trigger any rest hook that is subscribed"
                    },
                    "title": {
                      "type": "string"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Time Allotted\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Estimated Time Allotted": "24 Hours"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "description": "Vendor IDs",
                      "items": {
                        "type": "number",
                        "example": 1
                      }
                    },
                    "partsUsed": {
                      "type": "array",
                      "description": "Parts IDs and quantities used in this work order",
                      "items": {
                        "type": "object",
                        "required": [
                          "partId",
                          "quantityUsed"
                        ],
                        "properties": {
                          "partId": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the part"
                          },
                          "quantityUsed": {
                            "type": "integer",
                            "description": "Quantity used in the work order.",
                            "example": 120
                          },
                          "copyOnRecurring": {
                            "type": "string",
                            "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                            "default": "Default",
                            "enum": [
                              "NoCopy",
                              "Copy",
                              "Default"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "parameters": [
            {
              "name": "skipWebhook",
              "in": "query",
              "schema": {
                "type": "boolean",
                "description": "Set skipWebhook=true to skip all webhooks upon successful work order creation."
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully created work order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": 159
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Work Orders"
          ]
        },
        "get": {
          "summary": "List work orders",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Work Orders returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "title",
              "schema": {
                "type": "string",
                "description": "To filter work orders by title"
              },
              "in": "query"
            },
            {
              "name": "assets",
              "schema": {
                "type": "array",
                "title": "asset ID filters",
                "description": "To filter by multiple asset IDs: `assets=630&assets=634`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "notAssets",
              "schema": {
                "type": "array",
                "title": "asset ID filters",
                "description": "Filter work orders that have none of the provided assets.\nTo filter by multiple asset IDs: `notAssets=630&notAssets=634`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "locations",
              "schema": {
                "type": "array",
                "title": "location ID filters",
                "description": "To filter by multiple location IDs: `locations=193&locations=194&locations=195`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "notLocations",
              "schema": {
                "type": "array",
                "title": "location ID filters",
                "description": "Filter work orders that have none of the provided locations.\nTo filter by multiple location IDs: `notLocations=193&notLocations=194&notLocations=195`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "parts",
              "schema": {
                "type": "array",
                "title": "part ID filters",
                "description": "To filter by multiple part IDs: `parts=14677&parts=14687`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "notParts",
              "schema": {
                "type": "array",
                "title": "part ID filters",
                "description": "Filter work orders that have none of the provided parts.\nTo filter by multiple part IDs: `notParts=14677&notParts=14687`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "vendors",
              "schema": {
                "type": "array",
                "title": "vendor ID filters",
                "description": "To filter by multiple vendor IDs: `vendors=7123&vendors=2234`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "notVendors",
              "schema": {
                "type": "array",
                "title": "vendor ID filters",
                "description": "Filter work orders that have none of the provided vendors.\nTo filter by multiple vendor IDs: `notVendors=7123&notVendors=2234`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "assignees",
              "schema": {
                "type": "array",
                "title": "assignee ID filters",
                "description": "To filter by multiple assignee IDs: `assignees=23494&assignees=79808`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "teams",
              "schema": {
                "type": "array",
                "title": "team ID filters",
                "description": "To filter by multiple team IDs: `teams=112&teams=243`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "categories",
              "schema": {
                "type": "array",
                "title": "categories filters",
                "description": "To filter by multiple categories: `categories=123456&categories=Damage`",
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "description": "Label of the category",
                      "example": "Damage"
                    },
                    {
                      "type": "integer",
                      "description": "Global ID of the category",
                      "example": 123
                    }
                  ]
                }
              },
              "in": "query"
            },
            {
              "name": "notCategories",
              "schema": {
                "type": "array",
                "title": "categories filters",
                "description": "Filter work orders that have none of the provided categories.\nTo filter by multiple categories: `notCategories=123456&notCategories=Damage`",
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "description": "Label of the category",
                      "example": "Damage"
                    },
                    {
                      "type": "integer",
                      "description": "Global ID of the category",
                      "example": 123
                    }
                  ]
                }
              },
              "in": "query"
            },
            {
              "name": "priorities",
              "schema": {
                "type": "array",
                "title": "priorities filters",
                "description": "To filter by multiple priorities: `priorities=LOW&priorities=MEDIUM`",
                "items": {
                  "type": "string",
                  "example": "MEDIUM",
                  "enum": [
                    "NONE",
                    "LOW",
                    "MEDIUM",
                    "HIGH"
                  ]
                }
              },
              "in": "query"
            },
            {
              "name": "statuses",
              "schema": {
                "type": "array",
                "title": "statuses filters",
                "description": "To filter by multiple statuses: `statuses=IN_PROGRESS&statuses=DONE`",
                "items": {
                  "type": "string",
                  "enum": [
                    "OPEN",
                    "IN_PROGRESS",
                    "ON_HOLD",
                    "DONE",
                    "CANCELED",
                    "SKIPPED"
                  ],
                  "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                }
              },
              "in": "query"
            },
            {
              "name": "show_upcoming",
              "schema": {
                "type": "boolean",
                "title": "show upcoming work orders",
                "description": "Include work orders with a future start date"
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "sort",
              "schema": {
                "description": "Attribute on which to sort the list. (for descending order, prefix attribute with '-'). ",
                "type": "string",
                "enum": [
                  "updatedAt",
                  "createdAt",
                  "dueDate",
                  "startedAt",
                  "completedAt",
                  "-updatedAt",
                  "-createdAt",
                  "-dueDate",
                  "-startedAt",
                  "-completedAt"
                ]
              }
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=thumbnail&expand=assignees`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "thumbnail",
                    "assignees",
                    "categories",
                    "parts",
                    "asset",
                    "location",
                    "procedure",
                    "vendor_ids",
                    "times",
                    "time_items",
                    "expenditures",
                    "extra_fields",
                    "estimated_time"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Work Orders list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workOrders"
                    ],
                    "properties": {
                      "workOrders": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "sequentialId",
                            "title",
                            "updatedAt",
                            "status"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Global ID of the work order"
                            },
                            "sequentialId": {
                              "type": "integer",
                              "description": "Organization specific ID of the work order"
                            },
                            "title": {
                              "type": "string"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the work order was last updated. This doesn't include comments",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "OPEN",
                                "IN_PROGRESS",
                                "ON_HOLD",
                                "DONE",
                                "CANCELED",
                                "SKIPPED"
                              ],
                              "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                            },
                            "completedAt": {
                              "nullable": true,
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the work order was last marked as DONE",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "completerId": {
                              "nullable": true,
                              "type": "integer",
                              "description": "ID of the user who completed the work order"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the work order was created",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "creatorId": {
                              "nullable": true,
                              "type": "integer",
                              "description": "ID of the user who created the work order"
                            },
                            "deletedAt": {
                              "nullable": true,
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the work order was deleted",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string",
                              "example": "A work order sample description"
                            },
                            "dueDate": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "Date & time at which the work order is due",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "dueDateIsFullDay": {
                              "nullable": true,
                              "type": "boolean"
                            },
                            "startDate": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "locationId": {
                              "nullable": true,
                              "type": "integer",
                              "description": "Global ID of the location assigned to the work order"
                            },
                            "nextId": {
                              "nullable": true,
                              "type": "integer"
                            },
                            "organizationId": {
                              "type": "number"
                            },
                            "previousId": {
                              "nullable": true,
                              "type": "integer"
                            },
                            "priority": {
                              "type": "string",
                              "example": "MEDIUM",
                              "enum": [
                                "NONE",
                                "LOW",
                                "MEDIUM",
                                "HIGH"
                              ]
                            },
                            "recurrenceInfo": {
                              "type": "object",
                              "nullable": true,
                              "example": {
                                "type": "WEEKLY",
                                "interval": 3,
                                "days": [
                                  "MONDAY",
                                  "WEDNESDAY",
                                  "FRIDAY"
                                ]
                              },
                              "oneOf": [
                                {
                                  "type": "object",
                                  "title": "Daily",
                                  "nullable": true,
                                  "required": [
                                    "type"
                                  ],
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "pattern": "DAILY",
                                      "enum": [
                                        "DAILY"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "title": "Weekly",
                                  "required": [
                                    "type",
                                    "days"
                                  ],
                                  "nullable": true,
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "pattern": "WEEKLY",
                                      "enum": [
                                        "WEEKLY"
                                      ]
                                    },
                                    "interval": {
                                      "type": "integer",
                                      "description": "Number of weeks between events",
                                      "minimum": 1,
                                      "maximum": 52,
                                      "default": 1
                                    },
                                    "days": {
                                      "type": "array",
                                      "description": "Days of the week the event will occur",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "SUNDAY",
                                          "MONDAY",
                                          "TUESDAY",
                                          "WEDNESDAY",
                                          "THURSDAY",
                                          "FRIDAY",
                                          "SATURDAY"
                                        ]
                                      }
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "title": "Monthly",
                                  "required": [
                                    "type",
                                    "day"
                                  ],
                                  "nullable": true,
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "pattern": "MONTHLY",
                                      "enum": [
                                        "MONTHLY"
                                      ]
                                    },
                                    "interval": {
                                      "type": "integer",
                                      "description": "Number of months between events",
                                      "minimum": 1,
                                      "maximum": 24,
                                      "default": 1
                                    },
                                    "day": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 31,
                                      "description": "Day of the month the event will occur"
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "title": "Yearly",
                                  "required": [
                                    "type"
                                  ],
                                  "nullable": true,
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "pattern": "YEARLY",
                                      "enum": [
                                        "YEARLY"
                                      ]
                                    },
                                    "interval": {
                                      "type": "integer",
                                      "description": "Number of years between events",
                                      "minimum": 1,
                                      "maximum": 1000,
                                      "default": 1
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "title": "Periodically",
                                  "required": [
                                    "type"
                                  ],
                                  "nullable": true,
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "pattern": "PERIODICALLY",
                                      "enum": [
                                        "PERIODICALLY"
                                      ]
                                    },
                                    "interval": {
                                      "type": "integer",
                                      "description": "Number of seconds between events",
                                      "minimum": 0
                                    }
                                  }
                                }
                              ]
                            },
                            "requesterId": {
                              "nullable": true,
                              "type": "integer",
                              "description": "ID of the user who requested the work order through the Work Request feature"
                            },
                            "extraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Budget\") (expand with query parameter)",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Estimated Budget": "$250"
                              },
                              "nullable": false
                            },
                            "vendorIds": {
                              "type": "array",
                              "description": "Vendor IDs",
                              "items": {
                                "type": "number",
                                "example": 1
                              }
                            },
                            "assignees": {
                              "type": "array",
                              "description": "Either the teamId, the userId or the user email address (expand with query parameter)",
                              "items": {
                                "type": "object",
                                "title": "assignees",
                                "required": [
                                  "type",
                                  "id"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "example": "USER",
                                    "enum": [
                                      "USER",
                                      "TEAM"
                                    ]
                                  },
                                  "id": {
                                    "oneOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "string"
                                      }
                                    ]
                                  }
                                }
                              },
                              "nullable": false
                            },
                            "categories": {
                              "type": "array",
                              "description": "List of categories that identify the work order (expand with query parameter)",
                              "items": {
                                "type": "string",
                                "example": "Cleaning",
                                "uniqueItems": true
                              },
                              "nullable": false
                            },
                            "thumbnail": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              },
                              "nullable": false,
                              "description": "(expand with query parameter)"
                            },
                            "asset": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "description",
                                "parentId",
                                "criticalityId",
                                "locationId",
                                "createdAt",
                                "updatedAt",
                                "creatorId"
                              ],
                              "description": "Asset linked to the element (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 963,
                                  "description": "Global ID of the asset"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Forklift"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "Forklift that is used to to move heavy equipments around the warehouse"
                                },
                                "parentId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the parent asset"
                                },
                                "criticalityId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 150,
                                  "description": "ID of the criticality of the asset"
                                },
                                "locationId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the location where the asset is located"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the asset was created",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the asset was last updated. This doesn't include comments",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "creatorId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 851,
                                  "description": "ID of the asset creator"
                                }
                              },
                              "nullable": true
                            },
                            "location": {
                              "type": "object",
                              "required": [
                                "id",
                                "name"
                              ],
                              "description": "Location linked to the element (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 963,
                                  "description": "Global ID of the location"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Warehouses"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "The warehouse where we store the forklifts"
                                },
                                "address": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "1090 main street, Franklin",
                                  "description": "Postal address of the location"
                                },
                                "parentId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the parent location"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the location was created",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the location was last updated. This doesn't include comments",
                                  "example": "2022-01-01T00:00:00.000Z"
                                }
                              },
                              "nullable": true
                            },
                            "parts": {
                              "type": "array",
                              "description": "Parts attached to the work order (expand with query parameter)",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "name",
                                  "description",
                                  "area",
                                  "unitCost",
                                  "availableQuantity",
                                  "minimumQuantity",
                                  "barcode",
                                  "quantityUsed",
                                  "copyOnRecurring"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 963,
                                    "description": "Global ID of the part"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Locknut - 1/8"
                                  },
                                  "description": {
                                    "type": "string",
                                    "nullable": true,
                                    "example": ""
                                  },
                                  "area": {
                                    "type": "string",
                                    "example": "tool room",
                                    "nullable": true
                                  },
                                  "unitCost": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "Cost in cents. For example, for $1.20, put 120.",
                                    "example": 120
                                  },
                                  "availableQuantity": {
                                    "type": "integer",
                                    "description": "Quantity currently in stock",
                                    "example": 10
                                  },
                                  "minimumQuantity": {
                                    "type": "integer",
                                    "description": "Minimum quantity before you should restock",
                                    "example": 5
                                  },
                                  "barcode": {
                                    "type": "string",
                                    "nullable": true,
                                    "example": "bWFpbnRhaW54Cg==",
                                    "description": "String encoded barcode"
                                  },
                                  "quantityUsed": {
                                    "type": "integer",
                                    "description": "Quantity used in the work order.",
                                    "example": 120
                                  },
                                  "copyOnRecurring": {
                                    "type": "string",
                                    "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                    "default": "Default",
                                    "enum": [
                                      "NoCopy",
                                      "Copy",
                                      "Default"
                                    ]
                                  },
                                  "extraFields": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "nullable": false
                            },
                            "procedure": {
                              "type": "object",
                              "description": "Procedure attached to the work order (expand with query parameter)",
                              "nullable": false,
                              "required": [
                                "title",
                                "fields"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "example": 1234,
                                  "description": "ID representing a procedure"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Title of the procedure",
                                  "example": "Control dashboard audit"
                                },
                                "maxScore": {
                                  "type": "number",
                                  "example": 2,
                                  "description": "Maximum score of a procedure"
                                },
                                "score": {
                                  "type": "number",
                                  "example": 1,
                                  "description": "Score of a procedure"
                                },
                                "fields": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "label",
                                      "required",
                                      "type",
                                      "value"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "number",
                                        "example": 1234,
                                        "description": "ID of the procedure field"
                                      },
                                      "parentId": {
                                        "type": "number",
                                        "example": 1233,
                                        "nullable": true,
                                        "description": "ID of the parent of the current procedure field"
                                      },
                                      "required": {
                                        "type": "boolean",
                                        "description": "Indicate if field is required to be filled."
                                      },
                                      "description": {
                                        "example": "Number of green lights",
                                        "type": "string",
                                        "nullable": true,
                                        "description": "Description of the procedure field"
                                      },
                                      "type": {
                                        "type": "string",
                                        "example": "NUMBER",
                                        "enum": [
                                          "NUMBER",
                                          "AMOUNT",
                                          "TEXT",
                                          "UNSUPPORTED",
                                          "HEADING",
                                          "FILE",
                                          "SIGNATURE",
                                          "MULTIPLE_CHOICE",
                                          "INSPECTION_CHECK",
                                          "YES_NO_NA",
                                          "CHECKBOX",
                                          "CHECKLIST",
                                          "METER",
                                          "DATE"
                                        ],
                                        "description": "Type of procedure field"
                                      },
                                      "label": {
                                        "type": "string",
                                        "example": "Number of green lights",
                                        "description": "Label of a procedure field"
                                      },
                                      "maxScore": {
                                        "type": "number",
                                        "example": 2,
                                        "description": "Maximum score of a procedure field"
                                      },
                                      "score": {
                                        "type": "number",
                                        "example": 1,
                                        "description": "Score of a procedure field"
                                      },
                                      "value": {
                                        "type": "object",
                                        "description": "Current value of a procedure field",
                                        "properties": {
                                          "text": {
                                            "type": "string",
                                            "example": "12",
                                            "nullable": true
                                          },
                                          "attachment": {
                                            "type": "object",
                                            "title": "attachment",
                                            "required": [
                                              "id",
                                              "mimeType",
                                              "fileName",
                                              "url",
                                              "createdAt"
                                            ],
                                            "properties": {
                                              "id": {
                                                "type": "number",
                                                "description": "Global ID of the attachment",
                                                "example": 12345
                                              },
                                              "mimeType": {
                                                "type": "string",
                                                "description": "MIME type of the file",
                                                "example": "image/png"
                                              },
                                              "fileName": {
                                                "type": "string",
                                                "description": "Attachment's file name",
                                                "example": "image.png"
                                              },
                                              "url": {
                                                "type": "string",
                                                "description": "Url of the file",
                                                "example": "http://example.com/image.png"
                                              },
                                              "createdAt": {
                                                "type": "string",
                                                "format": "date-time",
                                                "description": "Date & time at which the attachment was uploaded",
                                                "example": "2022-01-01T00:00:00.000Z"
                                              },
                                              "width": {
                                                "type": "number",
                                                "description": "Width if the file is an image",
                                                "nullable": true,
                                                "example": 220
                                              },
                                              "height": {
                                                "type": "number",
                                                "description": "Height if the file is an image",
                                                "nullable": true,
                                                "example": 100
                                              }
                                            },
                                            "deprecated": true
                                          },
                                          "attachments": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "title": "attachment",
                                              "required": [
                                                "id",
                                                "mimeType",
                                                "fileName",
                                                "url",
                                                "createdAt"
                                              ],
                                              "properties": {
                                                "id": {
                                                  "type": "number",
                                                  "description": "Global ID of the attachment",
                                                  "example": 12345
                                                },
                                                "mimeType": {
                                                  "type": "string",
                                                  "description": "MIME type of the file",
                                                  "example": "image/png"
                                                },
                                                "fileName": {
                                                  "type": "string",
                                                  "description": "Attachment's file name",
                                                  "example": "image.png"
                                                },
                                                "url": {
                                                  "type": "string",
                                                  "description": "Url of the file",
                                                  "example": "http://example.com/image.png"
                                                },
                                                "createdAt": {
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "description": "Date & time at which the attachment was uploaded",
                                                  "example": "2022-01-01T00:00:00.000Z"
                                                },
                                                "width": {
                                                  "type": "number",
                                                  "description": "Width if the file is an image",
                                                  "nullable": true,
                                                  "example": 220
                                                },
                                                "height": {
                                                  "type": "number",
                                                  "description": "Height if the file is an image",
                                                  "nullable": true,
                                                  "example": 100
                                                }
                                              }
                                            }
                                          },
                                          "notes": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "string",
                                                "example": "1 light bulb is burned out."
                                              }
                                            },
                                            "description": "Note added to a procedure field"
                                          }
                                        }
                                      },
                                      "meter": {
                                        "nullable": true,
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "number",
                                            "example": 963,
                                            "description": "Global ID of the meter."
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "description": "Meter of a procedure field. Will be filled if the type of the field is meter"
                                      },
                                      "isDateAndTime": {
                                        "type": "boolean",
                                        "nullable": true,
                                        "description": "Indicate if a DATE field also contains the time",
                                        "example": false
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "times": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "Type of the entry",
                                    "enum": [
                                      "EXPENSE",
                                      "PART",
                                      "TIME"
                                    ]
                                  },
                                  "costPerUnit": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "Cost per part in cents or cents per hour"
                                  },
                                  "description": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Description of the expense or part description "
                                  },
                                  "quantity": {
                                    "type": "number",
                                    "description": "Number of parts or number of hours"
                                  },
                                  "rowTotal": {
                                    "type": "number",
                                    "description": "Total cost in cents"
                                  },
                                  "durationTotal": {
                                    "type": "number",
                                    "description": "Total duration in seconds"
                                  },
                                  "userId": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "ID of the user who logged the time entry"
                                  }
                                }
                              }
                            },
                            "timeItems": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "Type of the entry",
                                    "enum": [
                                      "EXPENSE",
                                      "PART",
                                      "TIME"
                                    ]
                                  },
                                  "costPerUnit": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "Cost per part in cents or cents per hour"
                                  },
                                  "description": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Description of the expense or part description "
                                  },
                                  "quantity": {
                                    "type": "number",
                                    "description": "Number of parts or number of hours"
                                  },
                                  "rowTotal": {
                                    "type": "number",
                                    "description": "Total cost in cents"
                                  },
                                  "durationTotal": {
                                    "type": "number",
                                    "description": "Total duration in seconds"
                                  },
                                  "userId": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "ID of the user who logged the time entry"
                                  }
                                }
                              }
                            },
                            "expenditures": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "Type of the entry",
                                    "enum": [
                                      "EXPENSE",
                                      "PART",
                                      "TIME"
                                    ]
                                  },
                                  "costPerUnit": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "Cost per part in cents or cents per hour"
                                  },
                                  "description": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Description of the expense or part description "
                                  },
                                  "quantity": {
                                    "type": "number",
                                    "description": "Number of parts or number of hours"
                                  },
                                  "rowTotal": {
                                    "type": "number",
                                    "description": "Total cost in cents"
                                  },
                                  "durationTotal": {
                                    "type": "number",
                                    "description": "Total duration in seconds"
                                  },
                                  "userId": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "ID of the user who logged the time entry"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Work Orders.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Work Orders.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/costs": {
        "post": {
          "summary": "Create new cost on a work order",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "Global ID of the work order",
              "example": "12345"
            }
          ],
          "requestBody": {
            "description": "Cost to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "oneOf": [
                    {
                      "title": "EXPENSE",
                      "type": "object",
                      "required": [
                        "type",
                        "costType",
                        "costPerUnit"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of the entry",
                          "enum": [
                            "EXPENSE"
                          ]
                        },
                        "costType": {
                          "type": "string",
                          "description": "Cost type",
                          "enum": [
                            "LABOR",
                            "OTHER",
                            "TRAVEL"
                          ]
                        },
                        "costPerUnit": {
                          "type": "number",
                          "description": "Cost per unit in cents.",
                          "nullable": true
                        },
                        "description": {
                          "type": "string",
                          "nullable": true,
                          "description": "Description of the expense or the time cost "
                        }
                      }
                    },
                    {
                      "title": "TIME",
                      "type": "object",
                      "required": [
                        "type",
                        "costType",
                        "durationTotal"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of the entry",
                          "enum": [
                            "TIME"
                          ]
                        },
                        "costType": {
                          "type": "string",
                          "description": "Cost type.",
                          "enum": [
                            "INSPECTION",
                            "OTHER",
                            "WORK"
                          ]
                        },
                        "durationTotal": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total duration, in seconds."
                        },
                        "hourlyRate": {
                          "type": "number",
                          "nullable": true,
                          "description": "Hourly rate, in cents"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true,
                          "description": "Description of the expense or the time cost "
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the cost",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "total",
                      "id"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "Type of the entry",
                        "enum": [
                          "EXPENSE",
                          "PART",
                          "TIME"
                        ]
                      },
                      "costPerUnit": {
                        "type": "number",
                        "nullable": true,
                        "description": "Cost per part in cents or cents per hour"
                      },
                      "description": {
                        "type": "string",
                        "nullable": true,
                        "description": "Description of the expense or part description "
                      },
                      "quantity": {
                        "type": "number",
                        "description": "Number of parts or number of hours"
                      },
                      "rowTotal": {
                        "type": "number",
                        "description": "Total cost in cents"
                      },
                      "durationTotal": {
                        "type": "number",
                        "description": "Total duration in seconds"
                      },
                      "userId": {
                        "type": "integer",
                        "nullable": true,
                        "description": "ID of the user who logged the time entry"
                      },
                      "total": {
                        "description": "Total cost in cents of the Work order",
                        "type": "number"
                      },
                      "id": {
                        "description": "Created cost Id",
                        "type": "number"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the cost",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "should have required properties 'type', 'costType'",
                          "fieldPath": "type"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Work Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        },
        "get": {
          "summary": "Get costs information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched costs",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "costs"
                    ],
                    "properties": {
                      "costs": {
                        "type": "object",
                        "required": [
                          "total",
                          "rows"
                        ],
                        "properties": {
                          "total": {
                            "description": "Total cost in cents of the Work order",
                            "type": "number"
                          },
                          "rows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Type of the entry",
                                  "enum": [
                                    "EXPENSE",
                                    "PART",
                                    "TIME"
                                  ]
                                },
                                "costPerUnit": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "Cost per part in cents or cents per hour"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "Description of the expense or part description "
                                },
                                "quantity": {
                                  "type": "number",
                                  "description": "Number of parts or number of hours"
                                },
                                "rowTotal": {
                                  "type": "number",
                                  "description": "Total cost in cents"
                                },
                                "durationTotal": {
                                  "type": "number",
                                  "description": "Total duration in seconds"
                                },
                                "userId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "ID of the user who logged the time entry"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Work Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}": {
        "get": {
          "summary": "Get work order",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the workOrder",
              "example": "1"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=assignees&expand=asset`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "assignees",
                    "asset",
                    "estimated_time",
                    "location",
                    "parts",
                    "times",
                    "time_items",
                    "expenditures",
                    "extra_fields"
                  ]
                }
              }
            },
            {
              "name": "useSequentialId",
              "schema": {
                "type": "boolean",
                "description": "Whether to use the sequential ID instead of the global ID"
              },
              "in": "query"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved workOrder's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workOrder"
                    ],
                    "properties": {
                      "workOrder": {
                        "type": "object",
                        "required": [
                          "updatedAt",
                          "status",
                          "title",
                          "createdAt",
                          "creatorId",
                          "id",
                          "sequentialId",
                          "organizationId"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Global ID of the work order"
                          },
                          "sequentialId": {
                            "type": "integer",
                            "description": "Organization specific ID of the work order"
                          },
                          "assetId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the work order",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "categories": {
                            "type": "array",
                            "description": "List of categories that identify the work order",
                            "items": {
                              "type": "string",
                              "example": "Cleaning",
                              "uniqueItems": true
                            }
                          },
                          "completedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was last marked as DONE",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "completerId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who completed the work order"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "creatorId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who created the work order"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was deleted",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string",
                            "example": "A work order sample description"
                          },
                          "dueDateIsFullDay": {
                            "nullable": true,
                            "type": "boolean"
                          },
                          "dueDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Date & time at which the work order is due",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "estimatedTime": {
                            "type": "integer",
                            "nullable": true,
                            "description": "The estimated time taken in seconds to complete the work order (expand with query parameter)",
                            "example": 3600
                          },
                          "externalData": {
                            "description": "Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.",
                            "nullable": true,
                            "oneOf": [
                              {
                                "type": "object",
                                "example": {
                                  "popularErpSolutionId": "asd732da"
                                }
                              },
                              {
                                "type": "number",
                                "example": 732
                              },
                              {
                                "type": "string",
                                "example": "asd732da"
                              }
                            ]
                          },
                          "startDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "locationId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "Global ID of the location assigned to the work order"
                          },
                          "nextId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "organizationId": {
                            "type": "number"
                          },
                          "previousId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "priority": {
                            "type": "string",
                            "example": "MEDIUM",
                            "enum": [
                              "NONE",
                              "LOW",
                              "MEDIUM",
                              "HIGH"
                            ]
                          },
                          "recurrenceInfo": {
                            "type": "object",
                            "nullable": true,
                            "example": {
                              "type": "WEEKLY",
                              "interval": 3,
                              "days": [
                                "MONDAY",
                                "WEDNESDAY",
                                "FRIDAY"
                              ]
                            },
                            "oneOf": [
                              {
                                "type": "object",
                                "title": "Daily",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "DAILY",
                                    "enum": [
                                      "DAILY"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Weekly",
                                "required": [
                                  "type",
                                  "days"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "WEEKLY",
                                    "enum": [
                                      "WEEKLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of weeks between events",
                                    "minimum": 1,
                                    "maximum": 52,
                                    "default": 1
                                  },
                                  "days": {
                                    "type": "array",
                                    "description": "Days of the week the event will occur",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "SUNDAY",
                                        "MONDAY",
                                        "TUESDAY",
                                        "WEDNESDAY",
                                        "THURSDAY",
                                        "FRIDAY",
                                        "SATURDAY"
                                      ]
                                    }
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Monthly",
                                "required": [
                                  "type",
                                  "day"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "MONTHLY",
                                    "enum": [
                                      "MONTHLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of months between events",
                                    "minimum": 1,
                                    "maximum": 24,
                                    "default": 1
                                  },
                                  "day": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 31,
                                    "description": "Day of the month the event will occur"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Yearly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "YEARLY",
                                    "enum": [
                                      "YEARLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of years between events",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Periodically",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "PERIODICALLY",
                                    "enum": [
                                      "PERIODICALLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of seconds between events",
                                    "minimum": 0
                                  }
                                }
                              }
                            ]
                          },
                          "requesterId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who requested the work order through the Work Request feature"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "IN_PROGRESS",
                              "ON_HOLD",
                              "DONE",
                              "CANCELED",
                              "SKIPPED"
                            ],
                            "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "title": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Budget\") (expand with query parameter)",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Estimated Budget": "$250"
                            },
                            "nullable": false
                          },
                          "vendorIds": {
                            "type": "array",
                            "description": "Vendor IDs",
                            "items": {
                              "type": "number",
                              "example": 1
                            }
                          },
                          "assigneeIds": {
                            "type": "array",
                            "description": "List of user ids assigned to the work order",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "teamIds": {
                            "type": "array",
                            "description": "List of team ids assigned to the work order",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "procedure": {
                            "type": "object",
                            "description": "Procedure attached to the work order",
                            "nullable": true,
                            "required": [
                              "title",
                              "fields"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 1234,
                                "description": "ID representing a procedure"
                              },
                              "title": {
                                "type": "string",
                                "description": "Title of the procedure",
                                "example": "Control dashboard audit"
                              },
                              "maxScore": {
                                "type": "number",
                                "example": 2,
                                "description": "Maximum score of a procedure"
                              },
                              "score": {
                                "type": "number",
                                "example": 1,
                                "description": "Score of a procedure"
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "id",
                                    "label",
                                    "required",
                                    "type",
                                    "value"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "number",
                                      "example": 1234,
                                      "description": "ID of the procedure field"
                                    },
                                    "parentId": {
                                      "type": "number",
                                      "example": 1233,
                                      "nullable": true,
                                      "description": "ID of the parent of the current procedure field"
                                    },
                                    "required": {
                                      "type": "boolean",
                                      "description": "Indicate if field is required to be filled."
                                    },
                                    "description": {
                                      "example": "Number of green lights",
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Description of the procedure field"
                                    },
                                    "type": {
                                      "type": "string",
                                      "example": "NUMBER",
                                      "enum": [
                                        "NUMBER",
                                        "AMOUNT",
                                        "TEXT",
                                        "UNSUPPORTED",
                                        "HEADING",
                                        "FILE",
                                        "SIGNATURE",
                                        "MULTIPLE_CHOICE",
                                        "INSPECTION_CHECK",
                                        "YES_NO_NA",
                                        "CHECKBOX",
                                        "CHECKLIST",
                                        "METER",
                                        "DATE"
                                      ],
                                      "description": "Type of procedure field"
                                    },
                                    "label": {
                                      "type": "string",
                                      "example": "Number of green lights",
                                      "description": "Label of a procedure field"
                                    },
                                    "maxScore": {
                                      "type": "number",
                                      "example": 2,
                                      "description": "Maximum score of a procedure field"
                                    },
                                    "score": {
                                      "type": "number",
                                      "example": 1,
                                      "description": "Score of a procedure field"
                                    },
                                    "value": {
                                      "type": "object",
                                      "description": "Current value of a procedure field",
                                      "properties": {
                                        "text": {
                                          "type": "string",
                                          "example": "12",
                                          "nullable": true
                                        },
                                        "attachment": {
                                          "type": "object",
                                          "title": "attachment",
                                          "required": [
                                            "id",
                                            "mimeType",
                                            "fileName",
                                            "url",
                                            "createdAt"
                                          ],
                                          "properties": {
                                            "id": {
                                              "type": "number",
                                              "description": "Global ID of the attachment",
                                              "example": 12345
                                            },
                                            "mimeType": {
                                              "type": "string",
                                              "description": "MIME type of the file",
                                              "example": "image/png"
                                            },
                                            "fileName": {
                                              "type": "string",
                                              "description": "Attachment's file name",
                                              "example": "image.png"
                                            },
                                            "url": {
                                              "type": "string",
                                              "description": "Url of the file",
                                              "example": "http://example.com/image.png"
                                            },
                                            "createdAt": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Date & time at which the attachment was uploaded",
                                              "example": "2022-01-01T00:00:00.000Z"
                                            },
                                            "width": {
                                              "type": "number",
                                              "description": "Width if the file is an image",
                                              "nullable": true,
                                              "example": 220
                                            },
                                            "height": {
                                              "type": "number",
                                              "description": "Height if the file is an image",
                                              "nullable": true,
                                              "example": 100
                                            }
                                          },
                                          "deprecated": true
                                        },
                                        "attachments": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "title": "attachment",
                                            "required": [
                                              "id",
                                              "mimeType",
                                              "fileName",
                                              "url",
                                              "createdAt"
                                            ],
                                            "properties": {
                                              "id": {
                                                "type": "number",
                                                "description": "Global ID of the attachment",
                                                "example": 12345
                                              },
                                              "mimeType": {
                                                "type": "string",
                                                "description": "MIME type of the file",
                                                "example": "image/png"
                                              },
                                              "fileName": {
                                                "type": "string",
                                                "description": "Attachment's file name",
                                                "example": "image.png"
                                              },
                                              "url": {
                                                "type": "string",
                                                "description": "Url of the file",
                                                "example": "http://example.com/image.png"
                                              },
                                              "createdAt": {
                                                "type": "string",
                                                "format": "date-time",
                                                "description": "Date & time at which the attachment was uploaded",
                                                "example": "2022-01-01T00:00:00.000Z"
                                              },
                                              "width": {
                                                "type": "number",
                                                "description": "Width if the file is an image",
                                                "nullable": true,
                                                "example": 220
                                              },
                                              "height": {
                                                "type": "number",
                                                "description": "Height if the file is an image",
                                                "nullable": true,
                                                "example": 100
                                              }
                                            }
                                          }
                                        },
                                        "notes": {
                                          "nullable": true,
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string",
                                              "example": "1 light bulb is burned out."
                                            }
                                          },
                                          "description": "Note added to a procedure field"
                                        }
                                      }
                                    },
                                    "meter": {
                                      "nullable": true,
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "number",
                                          "example": 963,
                                          "description": "Global ID of the meter."
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "description": "Meter of a procedure field. Will be filled if the type of the field is meter"
                                    },
                                    "isDateAndTime": {
                                      "type": "boolean",
                                      "nullable": true,
                                      "description": "Indicate if a DATE field also contains the time",
                                      "example": false
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "progress": {
                            "type": "object",
                            "description": "Progress information on the work order",
                            "nullable": true,
                            "properties": {
                              "openCount": {
                                "type": "number",
                                "example": 1
                              },
                              "inProgressCount": {
                                "type": "number",
                                "example": 1
                              },
                              "onHoldCount": {
                                "type": "number",
                                "example": 1
                              },
                              "doneCount": {
                                "type": "number",
                                "example": 1
                              }
                            }
                          },
                          "assignees": {
                            "type": "array",
                            "description": "Either the teamId, the userId or the user email address (expand with query parameter)",
                            "items": {
                              "type": "object",
                              "title": "assignees",
                              "required": [
                                "type",
                                "id"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "USER",
                                  "enum": [
                                    "USER",
                                    "TEAM"
                                  ]
                                },
                                "id": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string"
                                    }
                                  ]
                                }
                              }
                            },
                            "nullable": false
                          },
                          "asset": {
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "description",
                              "parentId",
                              "criticalityId",
                              "locationId",
                              "createdAt",
                              "updatedAt",
                              "creatorId"
                            ],
                            "description": "Asset linked to the element (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the asset"
                              },
                              "name": {
                                "type": "string",
                                "example": "Forklift"
                              },
                              "description": {
                                "type": "string",
                                "nullable": true,
                                "example": "Forklift that is used to to move heavy equipments around the warehouse"
                              },
                              "parentId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the parent asset"
                              },
                              "criticalityId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 150,
                                "description": "ID of the criticality of the asset"
                              },
                              "locationId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the location where the asset is located"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the asset was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the asset was last updated. This doesn't include comments",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "creatorId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the asset creator"
                              }
                            },
                            "nullable": true
                          },
                          "location": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "Location linked to the element (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the location"
                              },
                              "name": {
                                "type": "string",
                                "example": "Warehouses"
                              },
                              "description": {
                                "type": "string",
                                "nullable": true,
                                "example": "The warehouse where we store the forklifts"
                              },
                              "address": {
                                "type": "string",
                                "nullable": true,
                                "example": "1090 main street, Franklin",
                                "description": "Postal address of the location"
                              },
                              "parentId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the parent location"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the location was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the location was last updated. This doesn't include comments",
                                "example": "2022-01-01T00:00:00.000Z"
                              }
                            },
                            "nullable": true
                          },
                          "parts": {
                            "type": "array",
                            "description": "Parts attached to the Work Order (expand with query parameter)",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "description",
                                "area",
                                "unitCost",
                                "availableQuantity",
                                "minimumQuantity",
                                "barcode",
                                "quantityUsed",
                                "copyOnRecurring"
                              ],
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 963,
                                  "description": "Global ID of the part"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Locknut - 1/8"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": ""
                                },
                                "area": {
                                  "type": "string",
                                  "example": "tool room",
                                  "nullable": true
                                },
                                "unitCost": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "Cost in cents. For example, for $1.20, put 120.",
                                  "example": 120
                                },
                                "availableQuantity": {
                                  "type": "integer",
                                  "description": "Quantity currently in stock",
                                  "example": 10
                                },
                                "minimumQuantity": {
                                  "type": "integer",
                                  "description": "Minimum quantity before you should restock",
                                  "example": 5
                                },
                                "barcode": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "bWFpbnRhaW54Cg==",
                                  "description": "String encoded barcode"
                                },
                                "quantityUsed": {
                                  "type": "integer",
                                  "description": "Quantity used in the work order.",
                                  "example": 120
                                },
                                "copyOnRecurring": {
                                  "type": "string",
                                  "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                  "default": "Default",
                                  "enum": [
                                    "NoCopy",
                                    "Copy",
                                    "Default"
                                  ]
                                },
                                "extraFields": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "nullable": false
                          },
                          "times": {
                            "type": "array",
                            "description": "Time entries on the Work Order. Grouped by users (expand with query parameter)",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Type of the entry",
                                  "enum": [
                                    "EXPENSE",
                                    "PART",
                                    "TIME"
                                  ]
                                },
                                "costPerUnit": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "Cost per part in cents or cents per hour"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "Description of the expense or part description "
                                },
                                "quantity": {
                                  "type": "number",
                                  "description": "Number of parts or number of hours"
                                },
                                "rowTotal": {
                                  "type": "number",
                                  "description": "Total cost in cents"
                                },
                                "durationTotal": {
                                  "type": "number",
                                  "description": "Total duration in seconds"
                                },
                                "userId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "ID of the user who logged the time entry"
                                }
                              }
                            },
                            "nullable": false
                          },
                          "timeItems": {
                            "type": "array",
                            "description": "Time entries on the Work Order. (expand with query parameter)",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Type of the entry",
                                  "enum": [
                                    "EXPENSE",
                                    "PART",
                                    "TIME"
                                  ]
                                },
                                "costPerUnit": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "Cost per part in cents or cents per hour"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "Description of the expense or part description "
                                },
                                "quantity": {
                                  "type": "number",
                                  "description": "Number of parts or number of hours"
                                },
                                "rowTotal": {
                                  "type": "number",
                                  "description": "Total cost in cents"
                                },
                                "durationTotal": {
                                  "type": "number",
                                  "description": "Total duration in seconds"
                                },
                                "userId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "ID of the user who logged the time entry"
                                }
                              }
                            },
                            "nullable": false
                          },
                          "expenditures": {
                            "type": "array",
                            "description": "Other cost entries on the Work Order. Grouped by users (expand with query parameter)",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Type of the entry",
                                  "enum": [
                                    "EXPENSE",
                                    "PART",
                                    "TIME"
                                  ]
                                },
                                "costPerUnit": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "Cost per part in cents or cents per hour"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "Description of the expense or part description "
                                },
                                "quantity": {
                                  "type": "number",
                                  "description": "Number of parts or number of hours"
                                },
                                "rowTotal": {
                                  "type": "number",
                                  "description": "Total cost in cents"
                                },
                                "durationTotal": {
                                  "type": "number",
                                  "description": "Total duration in seconds"
                                },
                                "userId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "ID of the user who logged the time entry"
                                }
                              }
                            },
                            "nullable": false
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified workOrder or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        },
        "patch": {
          "summary": "Update work order information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Update data",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "assetId": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "assignees": {
                      "type": "array",
                      "description": "Either the teamId, the userId or the user email address",
                      "items": {
                        "type": "object",
                        "title": "assignees",
                        "required": [
                          "type",
                          "id"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "example": "USER",
                            "enum": [
                              "USER",
                              "TEAM"
                            ]
                          },
                          "id": {
                            "oneOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "requesterId": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "nullable": true
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "ID or email of the user who requested the work order"
                    },
                    "categories": {
                      "type": "array",
                      "description": "List of categories that identify the work order",
                      "items": {
                        "type": "string",
                        "example": "Cleaning",
                        "uniqueItems": true
                      }
                    },
                    "description": {
                      "nullable": true,
                      "type": "string",
                      "example": "A work order sample description"
                    },
                    "dueDate": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Date & time at which the work order is due",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "estimatedTime": {
                      "type": "integer",
                      "nullable": true,
                      "description": "The estimated time taken in seconds to complete the work order",
                      "example": 3600
                    },
                    "externalData": {
                      "description": "Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.",
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "example": {
                            "popularErpSolutionId": "asd732da"
                          }
                        },
                        {
                          "type": "number",
                          "example": 732
                        },
                        {
                          "type": "string",
                          "example": "asd732da"
                        }
                      ]
                    },
                    "startDate": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "locationId": {
                      "nullable": true,
                      "type": "integer",
                      "description": "Global ID of the location assigned to the work order"
                    },
                    "priority": {
                      "type": "string",
                      "example": "MEDIUM",
                      "enum": [
                        "NONE",
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ]
                    },
                    "procedure": {
                      "type": "object",
                      "nullable": true,
                      "required": [
                        "title",
                        "fields"
                      ],
                      "properties": {
                        "id": {
                          "type": "number",
                          "example": 1234,
                          "deprecated": true,
                          "description": "You should favor 'procedureTemplateId' to attach a procedure template."
                        },
                        "title": {
                          "type": "string",
                          "description": "Title of the procedure",
                          "example": "Control dashboard audit"
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "type",
                              "label"
                            ],
                            "properties": {
                              "label": {
                                "type": "string",
                                "example": "Metal Parts: broken, loose, dented, rusty, missing"
                              },
                              "type": {
                                "type": "string",
                                "example": "INSPECTION_CHECK",
                                "enum": [
                                  "NUMBER",
                                  "AMOUNT",
                                  "TEXT",
                                  "UNSUPPORTED",
                                  "HEADING",
                                  "FILE",
                                  "SIGNATURE",
                                  "MULTIPLE_CHOICE",
                                  "INSPECTION_CHECK",
                                  "YES_NO_NA",
                                  "CHECKBOX",
                                  "CHECKLIST",
                                  "METER",
                                  "DATE"
                                ]
                              },
                              "description": {
                                "type": "string",
                                "nullable": true
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "example": "Partially",
                                  "type": "string"
                                }
                              },
                              "urls": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "link"
                                  ],
                                  "properties": {
                                    "label": {
                                      "type": "string",
                                      "description": "Label of the url",
                                      "example": "maintainsoft Website"
                                    },
                                    "link": {
                                      "type": "string",
                                      "description": "Link",
                                      "example": "www.getmaintainsoft.com"
                                    }
                                  }
                                }
                              },
                              "meterId": {
                                "type": "number",
                                "example": 1,
                                "nullable": true,
                                "description": "Id of the meter"
                              },
                              "isDateAndTime": {
                                "type": "boolean",
                                "description": "Indicate if a DATE field also contains the time"
                              },
                              "index": {
                                "type": "number",
                                "example": 1,
                                "description": "Order which the row is displayed"
                              }
                            }
                          },
                          "description": "Steps of a procedure"
                        }
                      }
                    },
                    "procedureTemplateId": {
                      "type": "number",
                      "nullable": true,
                      "description": "ID of the procedure template to attach"
                    },
                    "recurrenceInfo": {
                      "type": "object",
                      "nullable": true,
                      "example": {
                        "type": "WEEKLY",
                        "interval": 3,
                        "days": [
                          "MONDAY",
                          "WEDNESDAY",
                          "FRIDAY"
                        ]
                      },
                      "oneOf": [
                        {
                          "type": "object",
                          "title": "Daily",
                          "nullable": true,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "DAILY",
                              "enum": [
                                "DAILY"
                              ]
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Weekly",
                          "required": [
                            "type",
                            "days"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "WEEKLY",
                              "enum": [
                                "WEEKLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of weeks between events",
                              "minimum": 1,
                              "maximum": 52,
                              "default": 1
                            },
                            "days": {
                              "type": "array",
                              "description": "Days of the week the event will occur",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "SUNDAY",
                                  "MONDAY",
                                  "TUESDAY",
                                  "WEDNESDAY",
                                  "THURSDAY",
                                  "FRIDAY",
                                  "SATURDAY"
                                ]
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Monthly",
                          "required": [
                            "type",
                            "day"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "MONTHLY",
                              "enum": [
                                "MONTHLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of months between events",
                              "minimum": 1,
                              "maximum": 24,
                              "default": 1
                            },
                            "day": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 31,
                              "description": "Day of the month the event will occur"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Yearly",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "YEARLY",
                              "enum": [
                                "YEARLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of years between events",
                              "minimum": 1,
                              "maximum": 1000,
                              "default": 1
                            }
                          }
                        },
                        {
                          "type": "object",
                          "title": "Periodically",
                          "required": [
                            "type"
                          ],
                          "nullable": true,
                          "properties": {
                            "type": {
                              "type": "string",
                              "pattern": "PERIODICALLY",
                              "enum": [
                                "PERIODICALLY"
                              ]
                            },
                            "interval": {
                              "type": "integer",
                              "description": "Number of seconds between events"
                            }
                          }
                        }
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Time Allotted\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Estimated Time Allotted": "24 Hours"
                      }
                    },
                    "vendorIds": {
                      "type": "array",
                      "description": "Vendor IDs",
                      "items": {
                        "type": "number",
                        "example": 1
                      }
                    },
                    "partsUsed": {
                      "type": "array",
                      "description": "Parts IDs and quantities used in this work order",
                      "items": {
                        "type": "object",
                        "required": [
                          "partId",
                          "quantityUsed"
                        ],
                        "properties": {
                          "partId": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the part"
                          },
                          "quantityUsed": {
                            "type": "integer",
                            "description": "Quantity used in the work order.",
                            "example": 120
                          },
                          "copyOnRecurring": {
                            "type": "string",
                            "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                            "default": "Default",
                            "enum": [
                              "NoCopy",
                              "Copy",
                              "Default"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully updated work order's information",
              "content": {
                "application/json": {
                  "schema": {
                    "title": "WorkOrder",
                    "type": "object",
                    "description": "Work order information",
                    "properties": {
                      "workOrder": {
                        "title": "",
                        "type": "object",
                        "required": [
                          "updatedAt",
                          "status",
                          "title",
                          "createdAt",
                          "creatorId",
                          "id",
                          "sequentialId",
                          "organizationId"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Global ID of the work order"
                          },
                          "sequentialId": {
                            "type": "integer",
                            "description": "Organization specific ID of the work order"
                          },
                          "assetId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the work order",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "categories": {
                            "type": "array",
                            "description": "List of categories that identify the work order",
                            "items": {
                              "type": "string",
                              "example": "Cleaning",
                              "uniqueItems": true
                            }
                          },
                          "completedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was last marked as DONE",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "completerId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who completed the work order"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "creatorId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who created the work order"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was deleted",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string",
                            "example": "A work order sample description"
                          },
                          "dueDateIsFullDay": {
                            "nullable": true,
                            "type": "boolean"
                          },
                          "dueDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Date & time at which the work order is due",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "estimatedTime": {
                            "type": "integer",
                            "nullable": true,
                            "description": "The estimated time taken in seconds to complete the work order",
                            "example": 3600
                          },
                          "externalData": {
                            "description": "Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.",
                            "nullable": true,
                            "oneOf": [
                              {
                                "type": "object",
                                "example": {
                                  "popularErpSolutionId": "asd732da"
                                }
                              },
                              {
                                "type": "number",
                                "example": 732
                              },
                              {
                                "type": "string",
                                "example": "asd732da"
                              }
                            ]
                          },
                          "startDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "locationId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "Global ID of the location assigned to the work order"
                          },
                          "nextId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "organizationId": {
                            "type": "number"
                          },
                          "previousId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "priority": {
                            "type": "string",
                            "example": "MEDIUM",
                            "enum": [
                              "NONE",
                              "LOW",
                              "MEDIUM",
                              "HIGH"
                            ]
                          },
                          "recurrenceInfo": {
                            "type": "object",
                            "nullable": true,
                            "example": {
                              "type": "WEEKLY",
                              "interval": 3,
                              "days": [
                                "MONDAY",
                                "WEDNESDAY",
                                "FRIDAY"
                              ]
                            },
                            "oneOf": [
                              {
                                "type": "object",
                                "title": "Daily",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "DAILY",
                                    "enum": [
                                      "DAILY"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Weekly",
                                "required": [
                                  "type",
                                  "days"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "WEEKLY",
                                    "enum": [
                                      "WEEKLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of weeks between events",
                                    "minimum": 1,
                                    "maximum": 52,
                                    "default": 1
                                  },
                                  "days": {
                                    "type": "array",
                                    "description": "Days of the week the event will occur",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "SUNDAY",
                                        "MONDAY",
                                        "TUESDAY",
                                        "WEDNESDAY",
                                        "THURSDAY",
                                        "FRIDAY",
                                        "SATURDAY"
                                      ]
                                    }
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Monthly",
                                "required": [
                                  "type",
                                  "day"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "MONTHLY",
                                    "enum": [
                                      "MONTHLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of months between events",
                                    "minimum": 1,
                                    "maximum": 24,
                                    "default": 1
                                  },
                                  "day": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 31,
                                    "description": "Day of the month the event will occur"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Yearly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "YEARLY",
                                    "enum": [
                                      "YEARLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of years between events",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Periodically",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "PERIODICALLY",
                                    "enum": [
                                      "PERIODICALLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of seconds between events",
                                    "minimum": 0
                                  }
                                }
                              }
                            ]
                          },
                          "requesterId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who requested the work order through the Work Request feature"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "IN_PROGRESS",
                              "ON_HOLD",
                              "DONE",
                              "CANCELED",
                              "SKIPPED"
                            ],
                            "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "title": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Time Allotted\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Estimated Time Allotted": "24 Hours"
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "description": "Vendor IDs",
                            "items": {
                              "type": "number",
                              "example": 1
                            }
                          },
                          "assigneeIds": {
                            "type": "array",
                            "description": "List of user ids assigned to the work order",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "teamIds": {
                            "type": "array",
                            "description": "List of team ids assigned to the work order",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "procedure": {
                            "type": "object",
                            "description": "Procedure attached to the work order",
                            "nullable": true,
                            "required": [
                              "title",
                              "fields"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 1234,
                                "description": "ID representing a procedure"
                              },
                              "title": {
                                "type": "string",
                                "description": "Title of the procedure",
                                "example": "Control dashboard audit"
                              },
                              "maxScore": {
                                "type": "number",
                                "example": 2,
                                "description": "Maximum score of a procedure"
                              },
                              "score": {
                                "type": "number",
                                "example": 1,
                                "description": "Score of a procedure"
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "id",
                                    "label",
                                    "required",
                                    "type",
                                    "value"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "number",
                                      "example": 1234,
                                      "description": "ID of the procedure field"
                                    },
                                    "parentId": {
                                      "type": "number",
                                      "example": 1233,
                                      "nullable": true,
                                      "description": "ID of the parent of the current procedure field"
                                    },
                                    "required": {
                                      "type": "boolean",
                                      "description": "Indicate if field is required to be filled."
                                    },
                                    "description": {
                                      "example": "Number of green lights",
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Description of the procedure field"
                                    },
                                    "type": {
                                      "type": "string",
                                      "example": "NUMBER",
                                      "enum": [
                                        "NUMBER",
                                        "AMOUNT",
                                        "TEXT",
                                        "UNSUPPORTED",
                                        "HEADING",
                                        "FILE",
                                        "SIGNATURE",
                                        "MULTIPLE_CHOICE",
                                        "INSPECTION_CHECK",
                                        "YES_NO_NA",
                                        "CHECKBOX",
                                        "CHECKLIST",
                                        "METER",
                                        "DATE"
                                      ],
                                      "description": "Type of procedure field"
                                    },
                                    "label": {
                                      "type": "string",
                                      "example": "Number of green lights",
                                      "description": "Label of a procedure field"
                                    },
                                    "maxScore": {
                                      "type": "number",
                                      "example": 2,
                                      "description": "Maximum score of a procedure field"
                                    },
                                    "score": {
                                      "type": "number",
                                      "example": 1,
                                      "description": "Score of a procedure field"
                                    },
                                    "value": {
                                      "type": "object",
                                      "description": "Current value of a procedure field",
                                      "properties": {
                                        "text": {
                                          "type": "string",
                                          "example": "12",
                                          "nullable": true
                                        },
                                        "attachment": {
                                          "type": "object",
                                          "title": "attachment",
                                          "required": [
                                            "id",
                                            "mimeType",
                                            "fileName",
                                            "url",
                                            "createdAt"
                                          ],
                                          "properties": {
                                            "id": {
                                              "type": "number",
                                              "description": "Global ID of the attachment",
                                              "example": 12345
                                            },
                                            "mimeType": {
                                              "type": "string",
                                              "description": "MIME type of the file",
                                              "example": "image/png"
                                            },
                                            "fileName": {
                                              "type": "string",
                                              "description": "Attachment's file name",
                                              "example": "image.png"
                                            },
                                            "url": {
                                              "type": "string",
                                              "description": "Url of the file",
                                              "example": "http://example.com/image.png"
                                            },
                                            "createdAt": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Date & time at which the attachment was uploaded",
                                              "example": "2022-01-01T00:00:00.000Z"
                                            },
                                            "width": {
                                              "type": "number",
                                              "description": "Width if the file is an image",
                                              "nullable": true,
                                              "example": 220
                                            },
                                            "height": {
                                              "type": "number",
                                              "description": "Height if the file is an image",
                                              "nullable": true,
                                              "example": 100
                                            }
                                          },
                                          "deprecated": true
                                        },
                                        "attachments": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "title": "attachment",
                                            "required": [
                                              "id",
                                              "mimeType",
                                              "fileName",
                                              "url",
                                              "createdAt"
                                            ],
                                            "properties": {
                                              "id": {
                                                "type": "number",
                                                "description": "Global ID of the attachment",
                                                "example": 12345
                                              },
                                              "mimeType": {
                                                "type": "string",
                                                "description": "MIME type of the file",
                                                "example": "image/png"
                                              },
                                              "fileName": {
                                                "type": "string",
                                                "description": "Attachment's file name",
                                                "example": "image.png"
                                              },
                                              "url": {
                                                "type": "string",
                                                "description": "Url of the file",
                                                "example": "http://example.com/image.png"
                                              },
                                              "createdAt": {
                                                "type": "string",
                                                "format": "date-time",
                                                "description": "Date & time at which the attachment was uploaded",
                                                "example": "2022-01-01T00:00:00.000Z"
                                              },
                                              "width": {
                                                "type": "number",
                                                "description": "Width if the file is an image",
                                                "nullable": true,
                                                "example": 220
                                              },
                                              "height": {
                                                "type": "number",
                                                "description": "Height if the file is an image",
                                                "nullable": true,
                                                "example": 100
                                              }
                                            }
                                          }
                                        },
                                        "notes": {
                                          "nullable": true,
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string",
                                              "example": "1 light bulb is burned out."
                                            }
                                          },
                                          "description": "Note added to a procedure field"
                                        }
                                      }
                                    },
                                    "meter": {
                                      "nullable": true,
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "number",
                                          "example": 963,
                                          "description": "Global ID of the meter."
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "description": "Meter of a procedure field. Will be filled if the type of the field is meter"
                                    },
                                    "isDateAndTime": {
                                      "type": "boolean",
                                      "nullable": true,
                                      "description": "Indicate if a DATE field also contains the time",
                                      "example": false
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "progress": {
                            "type": "object",
                            "description": "Progress information on the work order",
                            "nullable": true,
                            "properties": {
                              "openCount": {
                                "type": "number",
                                "example": 1
                              },
                              "inProgressCount": {
                                "type": "number",
                                "example": 1
                              },
                              "onHoldCount": {
                                "type": "number",
                                "example": 1
                              },
                              "doneCount": {
                                "type": "number",
                                "example": 1
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Could not update the work order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Invalid priority",
                          "fieldPath": "priority",
                          "fieldValue": "Happy Birthday"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Work Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        },
        "delete": {
          "summary": "Delete workOrder",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the workOrder",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the workOrder"
            },
            "400": {
              "description": "Failed to Delete the workOrder",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified workOrder.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "workOrder Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/status": {
        "patch": {
          "summary": "Update work order status",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the workOrder",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Update data",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "OPEN",
                        "IN_PROGRESS",
                        "ON_HOLD",
                        "DONE",
                        "CANCELED"
                      ],
                      "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully updated work order's status",
              "content": {
                "application/json": {
                  "schema": {
                    "title": "WorkOrder",
                    "type": "object",
                    "description": "Work order information",
                    "properties": {
                      "workOrder": {
                        "title": "",
                        "type": "object",
                        "required": [
                          "updatedAt",
                          "status",
                          "title",
                          "createdAt",
                          "creatorId",
                          "id",
                          "sequentialId",
                          "organizationId"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Global ID of the work order"
                          },
                          "sequentialId": {
                            "type": "integer",
                            "description": "Organization specific ID of the work order"
                          },
                          "assetId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the work order",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "categories": {
                            "type": "array",
                            "description": "List of categories that identify the work order",
                            "items": {
                              "type": "string",
                              "example": "Cleaning",
                              "uniqueItems": true
                            }
                          },
                          "completedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was last marked as DONE",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "completerId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who completed the work order"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was created",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "creatorId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who created the work order"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was deleted",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string",
                            "example": "A work order sample description"
                          },
                          "dueDateIsFullDay": {
                            "nullable": true,
                            "type": "boolean"
                          },
                          "dueDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Date & time at which the work order is due",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "externalData": {
                            "description": "Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.",
                            "nullable": true,
                            "oneOf": [
                              {
                                "type": "object",
                                "example": {
                                  "popularErpSolutionId": "asd732da"
                                }
                              },
                              {
                                "type": "number",
                                "example": 732
                              },
                              {
                                "type": "string",
                                "example": "asd732da"
                              }
                            ]
                          },
                          "startDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "locationId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "Global ID of the location assigned to the work order"
                          },
                          "nextId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "organizationId": {
                            "type": "number"
                          },
                          "previousId": {
                            "nullable": true,
                            "type": "integer"
                          },
                          "priority": {
                            "type": "string",
                            "example": "MEDIUM",
                            "enum": [
                              "NONE",
                              "LOW",
                              "MEDIUM",
                              "HIGH"
                            ]
                          },
                          "recurrenceInfo": {
                            "type": "object",
                            "nullable": true,
                            "example": {
                              "type": "WEEKLY",
                              "interval": 3,
                              "days": [
                                "MONDAY",
                                "WEDNESDAY",
                                "FRIDAY"
                              ]
                            },
                            "oneOf": [
                              {
                                "type": "object",
                                "title": "Daily",
                                "nullable": true,
                                "required": [
                                  "type"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "DAILY",
                                    "enum": [
                                      "DAILY"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Weekly",
                                "required": [
                                  "type",
                                  "days"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "WEEKLY",
                                    "enum": [
                                      "WEEKLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of weeks between events",
                                    "minimum": 1,
                                    "maximum": 52,
                                    "default": 1
                                  },
                                  "days": {
                                    "type": "array",
                                    "description": "Days of the week the event will occur",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "SUNDAY",
                                        "MONDAY",
                                        "TUESDAY",
                                        "WEDNESDAY",
                                        "THURSDAY",
                                        "FRIDAY",
                                        "SATURDAY"
                                      ]
                                    }
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Monthly",
                                "required": [
                                  "type",
                                  "day"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "MONTHLY",
                                    "enum": [
                                      "MONTHLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of months between events",
                                    "minimum": 1,
                                    "maximum": 24,
                                    "default": 1
                                  },
                                  "day": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 31,
                                    "description": "Day of the month the event will occur"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Yearly",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "YEARLY",
                                    "enum": [
                                      "YEARLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of years between events",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "default": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "title": "Periodically",
                                "required": [
                                  "type"
                                ],
                                "nullable": true,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "pattern": "PERIODICALLY",
                                    "enum": [
                                      "PERIODICALLY"
                                    ]
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "description": "Number of seconds between events",
                                    "minimum": 0
                                  }
                                }
                              }
                            ]
                          },
                          "requesterId": {
                            "nullable": true,
                            "type": "integer",
                            "description": "ID of the user who requested the work order through the Work Request feature"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "IN_PROGRESS",
                              "ON_HOLD",
                              "DONE",
                              "CANCELED",
                              "SKIPPED"
                            ],
                            "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "title": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date & time at which the work order was last updated. This doesn't include comments",
                            "example": "2022-01-01T00:00:00.000Z"
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Time Allotted\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Estimated Time Allotted": "24 Hours"
                            }
                          },
                          "vendorIds": {
                            "type": "array",
                            "description": "Vendor IDs",
                            "items": {
                              "type": "number",
                              "example": 1
                            }
                          },
                          "assigneeIds": {
                            "type": "array",
                            "description": "List of user ids assigned to the work order",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "teamIds": {
                            "type": "array",
                            "description": "List of team ids assigned to the work order",
                            "items": {
                              "type": "integer"
                            }
                          },
                          "procedure": {
                            "type": "object",
                            "description": "Procedure attached to the work order",
                            "nullable": true,
                            "required": [
                              "title",
                              "fields"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 1234,
                                "description": "ID representing a procedure"
                              },
                              "title": {
                                "type": "string",
                                "description": "Title of the procedure",
                                "example": "Control dashboard audit"
                              },
                              "maxScore": {
                                "type": "number",
                                "example": 2,
                                "description": "Maximum score of a procedure"
                              },
                              "score": {
                                "type": "number",
                                "example": 1,
                                "description": "Score of a procedure"
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "id",
                                    "label",
                                    "required",
                                    "type",
                                    "value"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "number",
                                      "example": 1234,
                                      "description": "ID of the procedure field"
                                    },
                                    "parentId": {
                                      "type": "number",
                                      "example": 1233,
                                      "nullable": true,
                                      "description": "ID of the parent of the current procedure field"
                                    },
                                    "required": {
                                      "type": "boolean",
                                      "description": "Indicate if field is required to be filled."
                                    },
                                    "description": {
                                      "example": "Number of green lights",
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Description of the procedure field"
                                    },
                                    "type": {
                                      "type": "string",
                                      "example": "NUMBER",
                                      "enum": [
                                        "NUMBER",
                                        "AMOUNT",
                                        "TEXT",
                                        "UNSUPPORTED",
                                        "HEADING",
                                        "FILE",
                                        "SIGNATURE",
                                        "MULTIPLE_CHOICE",
                                        "INSPECTION_CHECK",
                                        "YES_NO_NA",
                                        "CHECKBOX",
                                        "CHECKLIST",
                                        "METER",
                                        "DATE"
                                      ],
                                      "description": "Type of procedure field"
                                    },
                                    "label": {
                                      "type": "string",
                                      "example": "Number of green lights",
                                      "description": "Label of a procedure field"
                                    },
                                    "maxScore": {
                                      "type": "number",
                                      "example": 2,
                                      "description": "Maximum score of a procedure field"
                                    },
                                    "score": {
                                      "type": "number",
                                      "example": 1,
                                      "description": "Score of a procedure field"
                                    },
                                    "value": {
                                      "type": "object",
                                      "description": "Current value of a procedure field",
                                      "properties": {
                                        "text": {
                                          "type": "string",
                                          "example": "12",
                                          "nullable": true
                                        },
                                        "attachment": {
                                          "type": "object",
                                          "title": "attachment",
                                          "required": [
                                            "id",
                                            "mimeType",
                                            "fileName",
                                            "url",
                                            "createdAt"
                                          ],
                                          "properties": {
                                            "id": {
                                              "type": "number",
                                              "description": "Global ID of the attachment",
                                              "example": 12345
                                            },
                                            "mimeType": {
                                              "type": "string",
                                              "description": "MIME type of the file",
                                              "example": "image/png"
                                            },
                                            "fileName": {
                                              "type": "string",
                                              "description": "Attachment's file name",
                                              "example": "image.png"
                                            },
                                            "url": {
                                              "type": "string",
                                              "description": "Url of the file",
                                              "example": "http://example.com/image.png"
                                            },
                                            "createdAt": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Date & time at which the attachment was uploaded",
                                              "example": "2022-01-01T00:00:00.000Z"
                                            },
                                            "width": {
                                              "type": "number",
                                              "description": "Width if the file is an image",
                                              "nullable": true,
                                              "example": 220
                                            },
                                            "height": {
                                              "type": "number",
                                              "description": "Height if the file is an image",
                                              "nullable": true,
                                              "example": 100
                                            }
                                          },
                                          "deprecated": true
                                        },
                                        "attachments": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "title": "attachment",
                                            "required": [
                                              "id",
                                              "mimeType",
                                              "fileName",
                                              "url",
                                              "createdAt"
                                            ],
                                            "properties": {
                                              "id": {
                                                "type": "number",
                                                "description": "Global ID of the attachment",
                                                "example": 12345
                                              },
                                              "mimeType": {
                                                "type": "string",
                                                "description": "MIME type of the file",
                                                "example": "image/png"
                                              },
                                              "fileName": {
                                                "type": "string",
                                                "description": "Attachment's file name",
                                                "example": "image.png"
                                              },
                                              "url": {
                                                "type": "string",
                                                "description": "Url of the file",
                                                "example": "http://example.com/image.png"
                                              },
                                              "createdAt": {
                                                "type": "string",
                                                "format": "date-time",
                                                "description": "Date & time at which the attachment was uploaded",
                                                "example": "2022-01-01T00:00:00.000Z"
                                              },
                                              "width": {
                                                "type": "number",
                                                "description": "Width if the file is an image",
                                                "nullable": true,
                                                "example": 220
                                              },
                                              "height": {
                                                "type": "number",
                                                "description": "Height if the file is an image",
                                                "nullable": true,
                                                "example": 100
                                              }
                                            }
                                          }
                                        },
                                        "notes": {
                                          "nullable": true,
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string",
                                              "example": "1 light bulb is burned out."
                                            }
                                          },
                                          "description": "Note added to a procedure field"
                                        }
                                      }
                                    },
                                    "meter": {
                                      "nullable": true,
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "number",
                                          "example": 963,
                                          "description": "Global ID of the meter."
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "description": "Meter of a procedure field. Will be filled if the type of the field is meter"
                                    },
                                    "isDateAndTime": {
                                      "type": "boolean",
                                      "nullable": true,
                                      "description": "Indicate if a DATE field also contains the time",
                                      "example": false
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "progress": {
                            "type": "object",
                            "description": "Progress information on the work order",
                            "nullable": true,
                            "properties": {
                              "openCount": {
                                "type": "number",
                                "example": 1
                              },
                              "inProgressCount": {
                                "type": "number",
                                "example": 1
                              },
                              "onHoldCount": {
                                "type": "number",
                                "example": 1
                              },
                              "doneCount": {
                                "type": "number",
                                "example": 1
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Could not update the work order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Invalid status",
                          "fieldPath": "status",
                          "fieldValue": "Happy Birthday"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Work Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update work order attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated work order's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified work order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "work order Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        },
        "delete": {
          "summary": "Remove work order attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed work order's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update work order's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the work order thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated work order's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Work Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Order Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/comments": {
        "post": {
          "summary": "Create new comment on a work order",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "Global ID of the work order",
              "example": "12345"
            }
          ],
          "requestBody": {
            "description": "Comment to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "content"
                  ],
                  "properties": {
                    "content": {
                      "type": "string",
                      "description": "Content of the comment to post"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the comment",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Global ID of the comment"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the comment",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "should have required property 'content'",
                          "fieldPath": "content"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Work Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        },
        "get": {
          "summary": "List work order comments",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Comments returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Comments list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "comments"
                    ],
                    "properties": {
                      "comments": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "authorId",
                            "content",
                            "createdAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Global ID of the comment"
                            },
                            "authorId": {
                              "type": "number",
                              "description": "ID of the user who created the comment"
                            },
                            "content": {
                              "type": "string",
                              "description": "Content of the comment to post"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the comment was created",
                              "example": "2022-01-01T00:00:00.000Z"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Comments.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Comments.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Cannot find the parent resource",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/emails": {
        "post": {
          "summary": "Send work order as an email",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "Global ID of the work order",
              "example": "12345"
            }
          ],
          "requestBody": {
            "description": "email to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "emails": {
                      "type": "array",
                      "description": "Emails to send the Work Order to",
                      "items": {
                        "type": "string",
                        "example": "example@gmail.com"
                      }
                    },
                    "customMessage": {
                      "type": "string",
                      "description": "Custom message to send with the Work Order",
                      "example": "This is a custom message",
                      "nullable": true
                    },
                    "exportOptions": {
                      "type": "object",
                      "description": "Type of export options for the work order attached to the email",
                      "nullable": true,
                      "properties": {
                        "attachments": {
                          "type": "boolean",
                          "description": "Include attachments",
                          "example": true,
                          "nullable": true
                        },
                        "comments": {
                          "type": "boolean",
                          "description": "Include comments",
                          "example": true,
                          "nullable": true
                        },
                        "costs": {
                          "type": "string",
                          "description": "Include cost-related information",
                          "example": "DETAILED",
                          "nullable": true,
                          "enum": [
                            "DETAILED",
                            "NONE",
                            "SUMMARY"
                          ]
                        },
                        "history": {
                          "type": "boolean",
                          "description": "Include work order history",
                          "nullable": true
                        },
                        "procedureFormat": {
                          "type": "string",
                          "description": "Include procedure format",
                          "example": "DETAILED",
                          "nullable": true,
                          "enum": [
                            "DETAILED",
                            "FLAGS_FAILS",
                            "NONE",
                            "SUMMARY"
                          ]
                        },
                        "images": {
                          "type": "string",
                          "description": "Include images",
                          "example": "FULL_SIZE",
                          "nullable": true,
                          "enum": [
                            "FULL_SIZE",
                            "ORIGINAL_SIZE",
                            "REGULAR_SIZE",
                            "SHOW_AS_FILE",
                            "THUMBNAIL_SIZE"
                          ]
                        },
                        "includeBasicInformation": {
                          "type": "boolean",
                          "description": "Include basic information",
                          "example": true,
                          "nullable": true
                        },
                        "includeExportInformation": {
                          "type": "boolean",
                          "description": "Include export information",
                          "example": true,
                          "nullable": true
                        },
                        "includeLocationAddress": {
                          "type": "boolean",
                          "description": "Include location address",
                          "example": true,
                          "nullable": true
                        },
                        "includedCustomFields": {
                          "type": "array",
                          "description": "Include custom fields",
                          "nullable": true,
                          "items": {
                            "type": "string",
                            "example": "customField1"
                          }
                        },
                        "priority": {
                          "type": "boolean",
                          "description": "Include priority information",
                          "example": true,
                          "nullable": true
                        },
                        "qrCode": {
                          "type": "boolean",
                          "description": "Include QR code",
                          "example": true,
                          "nullable": true
                        },
                        "signatureBox": {
                          "type": "boolean",
                          "description": "Include signature box",
                          "example": true,
                          "nullable": true
                        },
                        "vendorInformation": {
                          "type": "boolean",
                          "description": "Include vendor information",
                          "example": true,
                          "nullable": true
                        },
                        "vendors": {
                          "type": "boolean",
                          "description": "Include vendors",
                          "example": true,
                          "nullable": true
                        },
                        "workOrderInfo": {
                          "type": "boolean",
                          "description": "Include work order information",
                          "example": true,
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created the email",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Global ID of the work order",
                        "example": 12345
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to create the email",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "An error occurred while sending the email",
                          "fieldPath": "type"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "You do not have permission to send this email",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Forbidden",
                          "fieldPath": "type"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified Work Order.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Order Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/procedure": {
        "delete": {
          "summary": "Detach procedure from work order",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully detached procedure from work order."
            },
            "400": {
              "description": "Could not update the work order",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Invalid status",
                          "fieldPath": "status",
                          "fieldValue": "Happy Birthday"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified procedure.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/procedure/fields/{index}/attachment/{filename}": {
        "put": {
          "summary": "Update procedure field attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "index",
              "in": "path",
              "required": true,
              "description": "Sequential index of the field in the procedure",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated procedure field's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "attachment Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workorders/{id}/procedure/fields/{index}/attachment": {
        "delete": {
          "summary": "Delete procedure field attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work order",
              "example": "1"
            },
            {
              "schema": {
                "type": "integer"
              },
              "name": "index",
              "in": "path",
              "required": true,
              "description": "Sequential index of the field in the procedure",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted procedure field's attachment."
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Orders"
          ]
        }
      },
      "/workrequests": {
        "post": {
          "summary": "Create work request",
          "requestBody": {
            "description": "Work request to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "title"
                  ],
                  "properties": {
                    "description": {
                      "type": "string",
                      "example": "A forklift that needs to be reviewed for any potential problems",
                      "nullable": true
                    },
                    "priority": {
                      "type": "string",
                      "example": "MEDIUM",
                      "enum": [
                        "NONE",
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ]
                    },
                    "title": {
                      "type": "string",
                      "example": "Forklift Preventive Maintenance Form"
                    },
                    "assetId": {
                      "type": "number",
                      "format": "integer",
                      "example": 843,
                      "nullable": true
                    },
                    "locationId": {
                      "type": "number",
                      "format": "integer",
                      "example": 852,
                      "nullable": true
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Request Type\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Request Type": "Water Leak"
                      }
                    },
                    "approverTeamId": {
                      "type": "number",
                      "format": "integer",
                      "example": 254,
                      "nullable": true,
                      "description": "ID of the team that is reponsible for approving the request."
                    },
                    "creatorContactInfo": {
                      "type": "string",
                      "nullable": true,
                      "example": "james@example.com",
                      "description": "The creator's contact information associated with this work order request. Possible types are `EMAIL`, `PHONE`, and `OTHER`, which will be inferred from the string provided"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully created work request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "number",
                        "example": 963,
                        "description": "Global ID of the work request"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Work Requests"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List work requests",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Work Requests returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "name": "title",
              "schema": {
                "type": "string",
                "description": "To filter work orders by title or sequential ID"
              },
              "in": "query"
            },
            {
              "name": "assets",
              "schema": {
                "type": "array",
                "title": "asset ID filters",
                "description": "To filter by multiple asset IDs: `assets=630&assets=634`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "locations",
              "schema": {
                "type": "array",
                "title": "location ID filters",
                "description": "To filter by multiple location IDs: `locations=193&locations=194&locations=195`",
                "items": {
                  "type": "integer"
                }
              },
              "in": "query"
            },
            {
              "name": "priorities",
              "schema": {
                "type": "array",
                "title": "priorities filters",
                "description": "To filter by multiple priorities: `priorities=LOW&priorities=MEDIUM`",
                "items": {
                  "type": "string",
                  "example": "MEDIUM",
                  "enum": [
                    "NONE",
                    "LOW",
                    "MEDIUM",
                    "HIGH"
                  ]
                }
              },
              "in": "query"
            },
            {
              "name": "statuses",
              "schema": {
                "type": "array",
                "title": "statuses filters",
                "description": "To filter by multiple statuses: `statuses=APPROVED&statuses=DONE`",
                "items": {
                  "type": "string",
                  "example": "APPROVED",
                  "enum": [
                    "PENDING",
                    "REJECTED",
                    "APPROVED",
                    "DONE"
                  ]
                }
              },
              "in": "query"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=asset&expand=location`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "location",
                    "work_order",
                    "extra_fields"
                  ]
                }
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Work Requests list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workRequests"
                    ],
                    "properties": {
                      "workRequests": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "priority",
                            "title",
                            "requestStatus"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 963,
                              "description": "Global ID of the work request"
                            },
                            "title": {
                              "type": "string",
                              "example": "Forklift Preventive Maintenance Form"
                            },
                            "attachments": {
                              "type": "array",
                              "title": "attachment",
                              "description": "List of attachments linked to the Work Request",
                              "items": {
                                "type": "object",
                                "title": "attachment",
                                "required": [
                                  "id",
                                  "mimeType",
                                  "fileName",
                                  "url",
                                  "createdAt"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "description": "Global ID of the attachment",
                                    "example": 12345
                                  },
                                  "mimeType": {
                                    "type": "string",
                                    "description": "MIME type of the file",
                                    "example": "image/png"
                                  },
                                  "fileName": {
                                    "type": "string",
                                    "description": "Attachment's file name",
                                    "example": "image.png"
                                  },
                                  "url": {
                                    "type": "string",
                                    "description": "Url of the file",
                                    "example": "http://example.com/image.png"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Date & time at which the attachment was uploaded",
                                    "example": "2022-01-01T00:00:00.000Z"
                                  },
                                  "width": {
                                    "type": "number",
                                    "description": "Width if the file is an image",
                                    "nullable": true,
                                    "example": 220
                                  },
                                  "height": {
                                    "type": "number",
                                    "description": "Height if the file is an image",
                                    "nullable": true,
                                    "example": 100
                                  }
                                }
                              }
                            },
                            "thumbnail": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              },
                              "nullable": true
                            },
                            "priority": {
                              "type": "string",
                              "example": "MEDIUM",
                              "enum": [
                                "NONE",
                                "LOW",
                                "MEDIUM",
                                "HIGH"
                              ]
                            },
                            "description": {
                              "type": "string",
                              "example": "A forklift that needs to be reviewed for any potential problems",
                              "nullable": true
                            },
                            "requestStatus": {
                              "type": "string",
                              "enum": [
                                "PENDING",
                                "REJECTED",
                                "APPROVED",
                                "DONE"
                              ],
                              "example": "PENDING"
                            },
                            "assetId": {
                              "type": "number",
                              "format": "integer",
                              "example": 843,
                              "nullable": true
                            },
                            "locationId": {
                              "type": "number",
                              "format": "integer",
                              "example": 852,
                              "nullable": true
                            },
                            "workOrderId": {
                              "type": "number",
                              "format": "integer",
                              "example": 254,
                              "nullable": true,
                              "description": "Global ID of the work order attached to the work request. A work order is created once a work request is approved."
                            },
                            "sendEmailNotification": {
                              "type": "boolean",
                              "example": true
                            },
                            "extraFields": {
                              "type": "object",
                              "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Request Type\") (expand with query parameter)",
                              "additionalProperties": {
                                "type": "string"
                              },
                              "example": {
                                "Request Type": "Water Leak"
                              },
                              "nullable": false
                            },
                            "approverTeamId": {
                              "type": "number",
                              "format": "integer",
                              "example": 254,
                              "nullable": true,
                              "description": "ID of the team that is reponsible for approving the request."
                            },
                            "creatorContactInfo": {
                              "type": "object",
                              "nullable": true,
                              "description": "The creator's contact information associated with this work order request",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "EMAIL",
                                  "enum": [
                                    "PHONE",
                                    "EMAIL",
                                    "OTHER"
                                  ]
                                },
                                "value": {
                                  "type": "string",
                                  "example": "james@example.com"
                                }
                              }
                            },
                            "asset": {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "description",
                                "parentId",
                                "criticalityId",
                                "locationId",
                                "createdAt",
                                "updatedAt",
                                "creatorId"
                              ],
                              "description": "Asset linked to the element (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 963,
                                  "description": "Global ID of the asset"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Forklift"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "Forklift that is used to to move heavy equipments around the warehouse"
                                },
                                "parentId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the parent asset"
                                },
                                "criticalityId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 150,
                                  "description": "ID of the criticality of the asset"
                                },
                                "locationId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the location where the asset is located"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the asset was created",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the asset was last updated. This doesn't include comments",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "creatorId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 851,
                                  "description": "ID of the asset creator"
                                }
                              },
                              "nullable": false
                            },
                            "location": {
                              "type": "object",
                              "required": [
                                "id",
                                "name"
                              ],
                              "description": "Location linked to the element (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 963,
                                  "description": "Global ID of the location"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Warehouses"
                                },
                                "description": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "The warehouse where we store the forklifts"
                                },
                                "address": {
                                  "type": "string",
                                  "nullable": true,
                                  "example": "1090 main street, Franklin",
                                  "description": "Postal address of the location"
                                },
                                "parentId": {
                                  "type": "integer",
                                  "nullable": true,
                                  "example": 852,
                                  "description": "ID of the parent location"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the location was created",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the location was last updated. This doesn't include comments",
                                  "example": "2022-01-01T00:00:00.000Z"
                                }
                              },
                              "nullable": false
                            },
                            "workOrder": {
                              "type": "object",
                              "required": [
                                "updatedAt",
                                "status",
                                "title",
                                "createdAt",
                                "creatorId",
                                "id",
                                "sequentialId",
                                "organizationId"
                              ],
                              "description": "Work Order linked to the element (expand with query parameter)",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "Global ID of the work order"
                                },
                                "sequentialId": {
                                  "type": "integer",
                                  "description": "Organization specific ID of the work order"
                                },
                                "assetId": {
                                  "nullable": true,
                                  "type": "integer"
                                },
                                "attachments": {
                                  "type": "array",
                                  "title": "attachment",
                                  "description": "List of attachments linked to the work order",
                                  "items": {
                                    "type": "object",
                                    "title": "attachment",
                                    "required": [
                                      "id",
                                      "mimeType",
                                      "fileName",
                                      "url",
                                      "createdAt"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "number",
                                        "description": "Global ID of the attachment",
                                        "example": 12345
                                      },
                                      "mimeType": {
                                        "type": "string",
                                        "description": "MIME type of the file",
                                        "example": "image/png"
                                      },
                                      "fileName": {
                                        "type": "string",
                                        "description": "Attachment's file name",
                                        "example": "image.png"
                                      },
                                      "url": {
                                        "type": "string",
                                        "description": "Url of the file",
                                        "example": "http://example.com/image.png"
                                      },
                                      "createdAt": {
                                        "type": "string",
                                        "format": "date-time",
                                        "description": "Date & time at which the attachment was uploaded",
                                        "example": "2022-01-01T00:00:00.000Z"
                                      },
                                      "width": {
                                        "type": "number",
                                        "description": "Width if the file is an image",
                                        "nullable": true,
                                        "example": 220
                                      },
                                      "height": {
                                        "type": "number",
                                        "description": "Height if the file is an image",
                                        "nullable": true,
                                        "example": 100
                                      }
                                    }
                                  }
                                },
                                "categories": {
                                  "type": "array",
                                  "description": "List of categories that identify the work order",
                                  "items": {
                                    "type": "string",
                                    "example": "Cleaning",
                                    "uniqueItems": true
                                  }
                                },
                                "completedAt": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the work order was last marked as DONE",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "completerId": {
                                  "nullable": true,
                                  "type": "integer",
                                  "description": "ID of the user who completed the work order"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the work order was created",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "creatorId": {
                                  "nullable": true,
                                  "type": "integer",
                                  "description": "ID of the user who created the work order"
                                },
                                "deletedAt": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the work order was deleted",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "description": {
                                  "nullable": true,
                                  "type": "string",
                                  "example": "A work order sample description"
                                },
                                "dueDateIsFullDay": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "dueDate": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true,
                                  "description": "Date & time at which the work order is due",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "estimatedTime": {
                                  "type": "integer",
                                  "nullable": true,
                                  "description": "The estimated time taken in seconds to complete the work order",
                                  "example": 3600
                                },
                                "externalData": {
                                  "description": "Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.",
                                  "nullable": true,
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "example": {
                                        "popularErpSolutionId": "asd732da"
                                      }
                                    },
                                    {
                                      "type": "number",
                                      "example": 732
                                    },
                                    {
                                      "type": "string",
                                      "example": "asd732da"
                                    }
                                  ]
                                },
                                "startDate": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true,
                                  "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "locationId": {
                                  "nullable": true,
                                  "type": "integer",
                                  "description": "Global ID of the location assigned to the work order"
                                },
                                "nextId": {
                                  "nullable": true,
                                  "type": "integer"
                                },
                                "organizationId": {
                                  "type": "number"
                                },
                                "previousId": {
                                  "nullable": true,
                                  "type": "integer"
                                },
                                "priority": {
                                  "type": "string",
                                  "example": "MEDIUM",
                                  "enum": [
                                    "NONE",
                                    "LOW",
                                    "MEDIUM",
                                    "HIGH"
                                  ]
                                },
                                "recurrenceInfo": {
                                  "type": "object",
                                  "nullable": true,
                                  "example": {
                                    "type": "WEEKLY",
                                    "interval": 3,
                                    "days": [
                                      "MONDAY",
                                      "WEDNESDAY",
                                      "FRIDAY"
                                    ]
                                  },
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "title": "Daily",
                                      "nullable": true,
                                      "required": [
                                        "type"
                                      ],
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "pattern": "DAILY",
                                          "enum": [
                                            "DAILY"
                                          ]
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "title": "Weekly",
                                      "required": [
                                        "type",
                                        "days"
                                      ],
                                      "nullable": true,
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "pattern": "WEEKLY",
                                          "enum": [
                                            "WEEKLY"
                                          ]
                                        },
                                        "interval": {
                                          "type": "integer",
                                          "description": "Number of weeks between events",
                                          "minimum": 1,
                                          "maximum": 52,
                                          "default": 1
                                        },
                                        "days": {
                                          "type": "array",
                                          "description": "Days of the week the event will occur",
                                          "items": {
                                            "type": "string",
                                            "enum": [
                                              "SUNDAY",
                                              "MONDAY",
                                              "TUESDAY",
                                              "WEDNESDAY",
                                              "THURSDAY",
                                              "FRIDAY",
                                              "SATURDAY"
                                            ]
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "title": "Monthly",
                                      "required": [
                                        "type",
                                        "day"
                                      ],
                                      "nullable": true,
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "pattern": "MONTHLY",
                                          "enum": [
                                            "MONTHLY"
                                          ]
                                        },
                                        "interval": {
                                          "type": "integer",
                                          "description": "Number of months between events",
                                          "minimum": 1,
                                          "maximum": 24,
                                          "default": 1
                                        },
                                        "day": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 31,
                                          "description": "Day of the month the event will occur"
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "title": "Yearly",
                                      "required": [
                                        "type"
                                      ],
                                      "nullable": true,
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "pattern": "YEARLY",
                                          "enum": [
                                            "YEARLY"
                                          ]
                                        },
                                        "interval": {
                                          "type": "integer",
                                          "description": "Number of years between events",
                                          "minimum": 1,
                                          "maximum": 1000,
                                          "default": 1
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "title": "Periodically",
                                      "required": [
                                        "type"
                                      ],
                                      "nullable": true,
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "pattern": "PERIODICALLY",
                                          "enum": [
                                            "PERIODICALLY"
                                          ]
                                        },
                                        "interval": {
                                          "type": "integer",
                                          "description": "Number of seconds between events",
                                          "minimum": 0
                                        }
                                      }
                                    }
                                  ]
                                },
                                "requesterId": {
                                  "nullable": true,
                                  "type": "integer",
                                  "description": "ID of the user who requested the work order through the Work Request feature"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "OPEN",
                                    "IN_PROGRESS",
                                    "ON_HOLD",
                                    "DONE",
                                    "CANCELED",
                                    "SKIPPED"
                                  ],
                                  "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                                },
                                "thumbnail": {
                                  "type": "object",
                                  "title": "attachment",
                                  "required": [
                                    "id",
                                    "mimeType",
                                    "fileName",
                                    "url",
                                    "createdAt"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "number",
                                      "description": "Global ID of the attachment",
                                      "example": 12345
                                    },
                                    "mimeType": {
                                      "type": "string",
                                      "description": "MIME type of the file",
                                      "example": "image/png"
                                    },
                                    "fileName": {
                                      "type": "string",
                                      "description": "Attachment's file name",
                                      "example": "image.png"
                                    },
                                    "url": {
                                      "type": "string",
                                      "description": "Url of the file",
                                      "example": "http://example.com/image.png"
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time",
                                      "description": "Date & time at which the attachment was uploaded",
                                      "example": "2022-01-01T00:00:00.000Z"
                                    },
                                    "width": {
                                      "type": "number",
                                      "description": "Width if the file is an image",
                                      "nullable": true,
                                      "example": 220
                                    },
                                    "height": {
                                      "type": "number",
                                      "description": "Height if the file is an image",
                                      "nullable": true,
                                      "example": 100
                                    }
                                  },
                                  "nullable": true
                                },
                                "title": {
                                  "type": "string"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the work order was last updated. This doesn't include comments",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "extraFields": {
                                  "type": "object",
                                  "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Time Allotted\")",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "Estimated Time Allotted": "24 Hours"
                                  }
                                },
                                "vendorIds": {
                                  "type": "array",
                                  "description": "Vendor IDs",
                                  "items": {
                                    "type": "number",
                                    "example": 1
                                  }
                                },
                                "assigneeIds": {
                                  "type": "array",
                                  "description": "List of user ids assigned to the work order",
                                  "items": {
                                    "type": "integer"
                                  }
                                },
                                "teamIds": {
                                  "type": "array",
                                  "description": "List of team ids assigned to the work order",
                                  "items": {
                                    "type": "integer"
                                  }
                                },
                                "procedure": {
                                  "type": "object",
                                  "description": "Procedure attached to the work order",
                                  "nullable": true,
                                  "required": [
                                    "title",
                                    "fields"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "number",
                                      "example": 1234,
                                      "description": "ID representing a procedure"
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "Title of the procedure",
                                      "example": "Control dashboard audit"
                                    },
                                    "maxScore": {
                                      "type": "number",
                                      "example": 2,
                                      "description": "Maximum score of a procedure"
                                    },
                                    "score": {
                                      "type": "number",
                                      "example": 1,
                                      "description": "Score of a procedure"
                                    },
                                    "fields": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "required": [
                                          "id",
                                          "label",
                                          "required",
                                          "type",
                                          "value"
                                        ],
                                        "properties": {
                                          "id": {
                                            "type": "number",
                                            "example": 1234,
                                            "description": "ID of the procedure field"
                                          },
                                          "parentId": {
                                            "type": "number",
                                            "example": 1233,
                                            "nullable": true,
                                            "description": "ID of the parent of the current procedure field"
                                          },
                                          "required": {
                                            "type": "boolean",
                                            "description": "Indicate if field is required to be filled."
                                          },
                                          "description": {
                                            "example": "Number of green lights",
                                            "type": "string",
                                            "nullable": true,
                                            "description": "Description of the procedure field"
                                          },
                                          "type": {
                                            "type": "string",
                                            "example": "NUMBER",
                                            "enum": [
                                              "NUMBER",
                                              "AMOUNT",
                                              "TEXT",
                                              "UNSUPPORTED",
                                              "HEADING",
                                              "FILE",
                                              "SIGNATURE",
                                              "MULTIPLE_CHOICE",
                                              "INSPECTION_CHECK",
                                              "YES_NO_NA",
                                              "CHECKBOX",
                                              "CHECKLIST",
                                              "METER",
                                              "DATE"
                                            ],
                                            "description": "Type of procedure field"
                                          },
                                          "label": {
                                            "type": "string",
                                            "example": "Number of green lights",
                                            "description": "Label of a procedure field"
                                          },
                                          "maxScore": {
                                            "type": "number",
                                            "example": 2,
                                            "description": "Maximum score of a procedure field"
                                          },
                                          "score": {
                                            "type": "number",
                                            "example": 1,
                                            "description": "Score of a procedure field"
                                          },
                                          "value": {
                                            "type": "object",
                                            "description": "Current value of a procedure field",
                                            "properties": {
                                              "text": {
                                                "type": "string",
                                                "example": "12",
                                                "nullable": true
                                              },
                                              "attachment": {
                                                "type": "object",
                                                "title": "attachment",
                                                "required": [
                                                  "id",
                                                  "mimeType",
                                                  "fileName",
                                                  "url",
                                                  "createdAt"
                                                ],
                                                "properties": {
                                                  "id": {
                                                    "type": "number",
                                                    "description": "Global ID of the attachment",
                                                    "example": 12345
                                                  },
                                                  "mimeType": {
                                                    "type": "string",
                                                    "description": "MIME type of the file",
                                                    "example": "image/png"
                                                  },
                                                  "fileName": {
                                                    "type": "string",
                                                    "description": "Attachment's file name",
                                                    "example": "image.png"
                                                  },
                                                  "url": {
                                                    "type": "string",
                                                    "description": "Url of the file",
                                                    "example": "http://example.com/image.png"
                                                  },
                                                  "createdAt": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "description": "Date & time at which the attachment was uploaded",
                                                    "example": "2022-01-01T00:00:00.000Z"
                                                  },
                                                  "width": {
                                                    "type": "number",
                                                    "description": "Width if the file is an image",
                                                    "nullable": true,
                                                    "example": 220
                                                  },
                                                  "height": {
                                                    "type": "number",
                                                    "description": "Height if the file is an image",
                                                    "nullable": true,
                                                    "example": 100
                                                  }
                                                },
                                                "deprecated": true
                                              },
                                              "attachments": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "title": "attachment",
                                                  "required": [
                                                    "id",
                                                    "mimeType",
                                                    "fileName",
                                                    "url",
                                                    "createdAt"
                                                  ],
                                                  "properties": {
                                                    "id": {
                                                      "type": "number",
                                                      "description": "Global ID of the attachment",
                                                      "example": 12345
                                                    },
                                                    "mimeType": {
                                                      "type": "string",
                                                      "description": "MIME type of the file",
                                                      "example": "image/png"
                                                    },
                                                    "fileName": {
                                                      "type": "string",
                                                      "description": "Attachment's file name",
                                                      "example": "image.png"
                                                    },
                                                    "url": {
                                                      "type": "string",
                                                      "description": "Url of the file",
                                                      "example": "http://example.com/image.png"
                                                    },
                                                    "createdAt": {
                                                      "type": "string",
                                                      "format": "date-time",
                                                      "description": "Date & time at which the attachment was uploaded",
                                                      "example": "2022-01-01T00:00:00.000Z"
                                                    },
                                                    "width": {
                                                      "type": "number",
                                                      "description": "Width if the file is an image",
                                                      "nullable": true,
                                                      "example": 220
                                                    },
                                                    "height": {
                                                      "type": "number",
                                                      "description": "Height if the file is an image",
                                                      "nullable": true,
                                                      "example": 100
                                                    }
                                                  }
                                                }
                                              },
                                              "notes": {
                                                "nullable": true,
                                                "type": "object",
                                                "properties": {
                                                  "text": {
                                                    "type": "string",
                                                    "example": "1 light bulb is burned out."
                                                  }
                                                },
                                                "description": "Note added to a procedure field"
                                              }
                                            }
                                          },
                                          "meter": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "number",
                                                "example": 963,
                                                "description": "Global ID of the meter."
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "description": "Meter of a procedure field. Will be filled if the type of the field is meter"
                                          },
                                          "isDateAndTime": {
                                            "type": "boolean",
                                            "nullable": true,
                                            "description": "Indicate if a DATE field also contains the time",
                                            "example": false
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                "progress": {
                                  "type": "object",
                                  "description": "Progress information on the work order",
                                  "nullable": true,
                                  "properties": {
                                    "openCount": {
                                      "type": "number",
                                      "example": 1
                                    },
                                    "inProgressCount": {
                                      "type": "number",
                                      "example": 1
                                    },
                                    "onHoldCount": {
                                      "type": "number",
                                      "example": 1
                                    },
                                    "doneCount": {
                                      "type": "number",
                                      "example": 1
                                    }
                                  }
                                }
                              },
                              "nullable": false
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Work Requests.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Work Requests.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Work Requests"
          ]
        }
      },
      "/workrequests/{id}": {
        "get": {
          "summary": "Get work request",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the workRequest",
              "example": "1"
            },
            {
              "in": "query",
              "name": "expand",
              "schema": {
                "title": "Expand specific fields in the request",
                "description": "To expand multiple fields: `expand=asset&expand=location`",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "location",
                    "work_order",
                    "extra_fields"
                  ]
                }
              }
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved workRequest's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workRequest"
                    ],
                    "properties": {
                      "workRequest": {
                        "type": "object",
                        "required": [
                          "id",
                          "priority",
                          "title",
                          "requestStatus"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 963,
                            "description": "Global ID of the work request"
                          },
                          "title": {
                            "type": "string",
                            "example": "Forklift Preventive Maintenance Form"
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the Work Request",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "priority": {
                            "type": "string",
                            "example": "MEDIUM",
                            "enum": [
                              "NONE",
                              "LOW",
                              "MEDIUM",
                              "HIGH"
                            ]
                          },
                          "description": {
                            "type": "string",
                            "example": "A forklift that needs to be reviewed for any potential problems",
                            "nullable": true
                          },
                          "requestStatus": {
                            "type": "string",
                            "enum": [
                              "PENDING",
                              "REJECTED",
                              "APPROVED",
                              "DONE"
                            ],
                            "example": "PENDING"
                          },
                          "assetId": {
                            "type": "number",
                            "format": "integer",
                            "example": 843,
                            "nullable": true
                          },
                          "locationId": {
                            "type": "number",
                            "format": "integer",
                            "example": 852,
                            "nullable": true
                          },
                          "workOrderId": {
                            "type": "number",
                            "format": "integer",
                            "example": 254,
                            "nullable": true,
                            "description": "Global ID of the work order attached to the work request. A work order is created once a work request is approved."
                          },
                          "sendEmailNotification": {
                            "type": "boolean",
                            "example": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Request Type\") (expand with query parameter)",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Request Type": "Water Leak"
                            },
                            "nullable": false
                          },
                          "approverTeamId": {
                            "type": "number",
                            "format": "integer",
                            "example": 254,
                            "nullable": true,
                            "description": "ID of the team that is reponsible for approving the request."
                          },
                          "creatorContactInfo": {
                            "type": "object",
                            "nullable": true,
                            "description": "The creator's contact information associated with this work order request",
                            "properties": {
                              "type": {
                                "type": "string",
                                "example": "EMAIL",
                                "enum": [
                                  "PHONE",
                                  "EMAIL",
                                  "OTHER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "example": "james@example.com"
                              }
                            }
                          },
                          "asset": {
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "description",
                              "parentId",
                              "criticalityId",
                              "locationId",
                              "createdAt",
                              "updatedAt",
                              "creatorId"
                            ],
                            "description": "Asset linked to the element (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the asset"
                              },
                              "name": {
                                "type": "string",
                                "example": "Forklift"
                              },
                              "description": {
                                "type": "string",
                                "nullable": true,
                                "example": "Forklift that is used to to move heavy equipments around the warehouse"
                              },
                              "parentId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the parent asset"
                              },
                              "criticalityId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 150,
                                "description": "ID of the criticality of the asset"
                              },
                              "locationId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the location where the asset is located"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the asset was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the asset was last updated. This doesn't include comments",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "creatorId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the asset creator"
                              }
                            },
                            "nullable": false
                          },
                          "location": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "Location linked to the element (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the location"
                              },
                              "name": {
                                "type": "string",
                                "example": "Warehouses"
                              },
                              "description": {
                                "type": "string",
                                "nullable": true,
                                "example": "The warehouse where we store the forklifts"
                              },
                              "address": {
                                "type": "string",
                                "nullable": true,
                                "example": "1090 main street, Franklin",
                                "description": "Postal address of the location"
                              },
                              "parentId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 852,
                                "description": "ID of the parent location"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the location was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the location was last updated. This doesn't include comments",
                                "example": "2022-01-01T00:00:00.000Z"
                              }
                            },
                            "nullable": false
                          },
                          "workOrder": {
                            "type": "object",
                            "required": [
                              "updatedAt",
                              "status",
                              "title",
                              "createdAt",
                              "creatorId",
                              "id",
                              "sequentialId",
                              "organizationId"
                            ],
                            "description": "Work Order linked to the element (expand with query parameter)",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Global ID of the work order"
                              },
                              "sequentialId": {
                                "type": "integer",
                                "description": "Organization specific ID of the work order"
                              },
                              "assetId": {
                                "nullable": true,
                                "type": "integer"
                              },
                              "attachments": {
                                "type": "array",
                                "title": "attachment",
                                "description": "List of attachments linked to the work order",
                                "items": {
                                  "type": "object",
                                  "title": "attachment",
                                  "required": [
                                    "id",
                                    "mimeType",
                                    "fileName",
                                    "url",
                                    "createdAt"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "number",
                                      "description": "Global ID of the attachment",
                                      "example": 12345
                                    },
                                    "mimeType": {
                                      "type": "string",
                                      "description": "MIME type of the file",
                                      "example": "image/png"
                                    },
                                    "fileName": {
                                      "type": "string",
                                      "description": "Attachment's file name",
                                      "example": "image.png"
                                    },
                                    "url": {
                                      "type": "string",
                                      "description": "Url of the file",
                                      "example": "http://example.com/image.png"
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time",
                                      "description": "Date & time at which the attachment was uploaded",
                                      "example": "2022-01-01T00:00:00.000Z"
                                    },
                                    "width": {
                                      "type": "number",
                                      "description": "Width if the file is an image",
                                      "nullable": true,
                                      "example": 220
                                    },
                                    "height": {
                                      "type": "number",
                                      "description": "Height if the file is an image",
                                      "nullable": true,
                                      "example": 100
                                    }
                                  }
                                }
                              },
                              "categories": {
                                "type": "array",
                                "description": "List of categories that identify the work order",
                                "items": {
                                  "type": "string",
                                  "example": "Cleaning",
                                  "uniqueItems": true
                                }
                              },
                              "completedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the work order was last marked as DONE",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "completerId": {
                                "nullable": true,
                                "type": "integer",
                                "description": "ID of the user who completed the work order"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the work order was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "creatorId": {
                                "nullable": true,
                                "type": "integer",
                                "description": "ID of the user who created the work order"
                              },
                              "deletedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the work order was deleted",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string",
                                "example": "A work order sample description"
                              },
                              "dueDateIsFullDay": {
                                "nullable": true,
                                "type": "boolean"
                              },
                              "dueDate": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "Date & time at which the work order is due",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "estimatedTime": {
                                "type": "integer",
                                "nullable": true,
                                "description": "The estimated time taken in seconds to complete the work order",
                                "example": 3600
                              },
                              "externalData": {
                                "description": "Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.",
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "example": {
                                      "popularErpSolutionId": "asd732da"
                                    }
                                  },
                                  {
                                    "type": "number",
                                    "example": 732
                                  },
                                  {
                                    "type": "string",
                                    "example": "asd732da"
                                  }
                                ]
                              },
                              "startDate": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "locationId": {
                                "nullable": true,
                                "type": "integer",
                                "description": "Global ID of the location assigned to the work order"
                              },
                              "nextId": {
                                "nullable": true,
                                "type": "integer"
                              },
                              "organizationId": {
                                "type": "number"
                              },
                              "previousId": {
                                "nullable": true,
                                "type": "integer"
                              },
                              "priority": {
                                "type": "string",
                                "example": "MEDIUM",
                                "enum": [
                                  "NONE",
                                  "LOW",
                                  "MEDIUM",
                                  "HIGH"
                                ]
                              },
                              "recurrenceInfo": {
                                "type": "object",
                                "nullable": true,
                                "example": {
                                  "type": "WEEKLY",
                                  "interval": 3,
                                  "days": [
                                    "MONDAY",
                                    "WEDNESDAY",
                                    "FRIDAY"
                                  ]
                                },
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "title": "Daily",
                                    "nullable": true,
                                    "required": [
                                      "type"
                                    ],
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "pattern": "DAILY",
                                        "enum": [
                                          "DAILY"
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "title": "Weekly",
                                    "required": [
                                      "type",
                                      "days"
                                    ],
                                    "nullable": true,
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "pattern": "WEEKLY",
                                        "enum": [
                                          "WEEKLY"
                                        ]
                                      },
                                      "interval": {
                                        "type": "integer",
                                        "description": "Number of weeks between events",
                                        "minimum": 1,
                                        "maximum": 52,
                                        "default": 1
                                      },
                                      "days": {
                                        "type": "array",
                                        "description": "Days of the week the event will occur",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "SUNDAY",
                                            "MONDAY",
                                            "TUESDAY",
                                            "WEDNESDAY",
                                            "THURSDAY",
                                            "FRIDAY",
                                            "SATURDAY"
                                          ]
                                        }
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "title": "Monthly",
                                    "required": [
                                      "type",
                                      "day"
                                    ],
                                    "nullable": true,
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "pattern": "MONTHLY",
                                        "enum": [
                                          "MONTHLY"
                                        ]
                                      },
                                      "interval": {
                                        "type": "integer",
                                        "description": "Number of months between events",
                                        "minimum": 1,
                                        "maximum": 24,
                                        "default": 1
                                      },
                                      "day": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 31,
                                        "description": "Day of the month the event will occur"
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "title": "Yearly",
                                    "required": [
                                      "type"
                                    ],
                                    "nullable": true,
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "pattern": "YEARLY",
                                        "enum": [
                                          "YEARLY"
                                        ]
                                      },
                                      "interval": {
                                        "type": "integer",
                                        "description": "Number of years between events",
                                        "minimum": 1,
                                        "maximum": 1000,
                                        "default": 1
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "title": "Periodically",
                                    "required": [
                                      "type"
                                    ],
                                    "nullable": true,
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "pattern": "PERIODICALLY",
                                        "enum": [
                                          "PERIODICALLY"
                                        ]
                                      },
                                      "interval": {
                                        "type": "integer",
                                        "description": "Number of seconds between events",
                                        "minimum": 0
                                      }
                                    }
                                  }
                                ]
                              },
                              "requesterId": {
                                "nullable": true,
                                "type": "integer",
                                "description": "ID of the user who requested the work order through the Work Request feature"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "OPEN",
                                  "IN_PROGRESS",
                                  "ON_HOLD",
                                  "DONE",
                                  "CANCELED",
                                  "SKIPPED"
                                ],
                                "description": "\u003Cbr /\u003E\u003Cem\u003ENote:\u003C/em\u003E It is also possible to register a webhook to get notified when the status of any work order changes. Please see the \u003Ca href=\"#tag/Subscriptions\"\u003ESubscriptions\u003C/a\u003E section for more information."
                              },
                              "thumbnail": {
                                "type": "object",
                                "title": "attachment",
                                "required": [
                                  "id",
                                  "mimeType",
                                  "fileName",
                                  "url",
                                  "createdAt"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "description": "Global ID of the attachment",
                                    "example": 12345
                                  },
                                  "mimeType": {
                                    "type": "string",
                                    "description": "MIME type of the file",
                                    "example": "image/png"
                                  },
                                  "fileName": {
                                    "type": "string",
                                    "description": "Attachment's file name",
                                    "example": "image.png"
                                  },
                                  "url": {
                                    "type": "string",
                                    "description": "Url of the file",
                                    "example": "http://example.com/image.png"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Date & time at which the attachment was uploaded",
                                    "example": "2022-01-01T00:00:00.000Z"
                                  },
                                  "width": {
                                    "type": "number",
                                    "description": "Width if the file is an image",
                                    "nullable": true,
                                    "example": 220
                                  },
                                  "height": {
                                    "type": "number",
                                    "description": "Height if the file is an image",
                                    "nullable": true,
                                    "example": 100
                                  }
                                },
                                "nullable": true
                              },
                              "title": {
                                "type": "string"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the work order was last updated. This doesn't include comments",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "extraFields": {
                                "type": "object",
                                "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Estimated Time Allotted\")",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "example": {
                                  "Estimated Time Allotted": "24 Hours"
                                }
                              },
                              "vendorIds": {
                                "type": "array",
                                "description": "Vendor IDs",
                                "items": {
                                  "type": "number",
                                  "example": 1
                                }
                              },
                              "assigneeIds": {
                                "type": "array",
                                "description": "List of user ids assigned to the work order",
                                "items": {
                                  "type": "integer"
                                }
                              },
                              "teamIds": {
                                "type": "array",
                                "description": "List of team ids assigned to the work order",
                                "items": {
                                  "type": "integer"
                                }
                              },
                              "procedure": {
                                "type": "object",
                                "description": "Procedure attached to the work order",
                                "nullable": true,
                                "required": [
                                  "title",
                                  "fields"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "example": 1234,
                                    "description": "ID representing a procedure"
                                  },
                                  "title": {
                                    "type": "string",
                                    "description": "Title of the procedure",
                                    "example": "Control dashboard audit"
                                  },
                                  "maxScore": {
                                    "type": "number",
                                    "example": 2,
                                    "description": "Maximum score of a procedure"
                                  },
                                  "score": {
                                    "type": "number",
                                    "example": 1,
                                    "description": "Score of a procedure"
                                  },
                                  "fields": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "label",
                                        "required",
                                        "type",
                                        "value"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "number",
                                          "example": 1234,
                                          "description": "ID of the procedure field"
                                        },
                                        "parentId": {
                                          "type": "number",
                                          "example": 1233,
                                          "nullable": true,
                                          "description": "ID of the parent of the current procedure field"
                                        },
                                        "required": {
                                          "type": "boolean",
                                          "description": "Indicate if field is required to be filled."
                                        },
                                        "description": {
                                          "example": "Number of green lights",
                                          "type": "string",
                                          "nullable": true,
                                          "description": "Description of the procedure field"
                                        },
                                        "type": {
                                          "type": "string",
                                          "example": "NUMBER",
                                          "enum": [
                                            "NUMBER",
                                            "AMOUNT",
                                            "TEXT",
                                            "UNSUPPORTED",
                                            "HEADING",
                                            "FILE",
                                            "SIGNATURE",
                                            "MULTIPLE_CHOICE",
                                            "INSPECTION_CHECK",
                                            "YES_NO_NA",
                                            "CHECKBOX",
                                            "CHECKLIST",
                                            "METER",
                                            "DATE"
                                          ],
                                          "description": "Type of procedure field"
                                        },
                                        "label": {
                                          "type": "string",
                                          "example": "Number of green lights",
                                          "description": "Label of a procedure field"
                                        },
                                        "maxScore": {
                                          "type": "number",
                                          "example": 2,
                                          "description": "Maximum score of a procedure field"
                                        },
                                        "score": {
                                          "type": "number",
                                          "example": 1,
                                          "description": "Score of a procedure field"
                                        },
                                        "value": {
                                          "type": "object",
                                          "description": "Current value of a procedure field",
                                          "properties": {
                                            "text": {
                                              "type": "string",
                                              "example": "12",
                                              "nullable": true
                                            },
                                            "attachment": {
                                              "type": "object",
                                              "title": "attachment",
                                              "required": [
                                                "id",
                                                "mimeType",
                                                "fileName",
                                                "url",
                                                "createdAt"
                                              ],
                                              "properties": {
                                                "id": {
                                                  "type": "number",
                                                  "description": "Global ID of the attachment",
                                                  "example": 12345
                                                },
                                                "mimeType": {
                                                  "type": "string",
                                                  "description": "MIME type of the file",
                                                  "example": "image/png"
                                                },
                                                "fileName": {
                                                  "type": "string",
                                                  "description": "Attachment's file name",
                                                  "example": "image.png"
                                                },
                                                "url": {
                                                  "type": "string",
                                                  "description": "Url of the file",
                                                  "example": "http://example.com/image.png"
                                                },
                                                "createdAt": {
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "description": "Date & time at which the attachment was uploaded",
                                                  "example": "2022-01-01T00:00:00.000Z"
                                                },
                                                "width": {
                                                  "type": "number",
                                                  "description": "Width if the file is an image",
                                                  "nullable": true,
                                                  "example": 220
                                                },
                                                "height": {
                                                  "type": "number",
                                                  "description": "Height if the file is an image",
                                                  "nullable": true,
                                                  "example": 100
                                                }
                                              },
                                              "deprecated": true
                                            },
                                            "attachments": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "title": "attachment",
                                                "required": [
                                                  "id",
                                                  "mimeType",
                                                  "fileName",
                                                  "url",
                                                  "createdAt"
                                                ],
                                                "properties": {
                                                  "id": {
                                                    "type": "number",
                                                    "description": "Global ID of the attachment",
                                                    "example": 12345
                                                  },
                                                  "mimeType": {
                                                    "type": "string",
                                                    "description": "MIME type of the file",
                                                    "example": "image/png"
                                                  },
                                                  "fileName": {
                                                    "type": "string",
                                                    "description": "Attachment's file name",
                                                    "example": "image.png"
                                                  },
                                                  "url": {
                                                    "type": "string",
                                                    "description": "Url of the file",
                                                    "example": "http://example.com/image.png"
                                                  },
                                                  "createdAt": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "description": "Date & time at which the attachment was uploaded",
                                                    "example": "2022-01-01T00:00:00.000Z"
                                                  },
                                                  "width": {
                                                    "type": "number",
                                                    "description": "Width if the file is an image",
                                                    "nullable": true,
                                                    "example": 220
                                                  },
                                                  "height": {
                                                    "type": "number",
                                                    "description": "Height if the file is an image",
                                                    "nullable": true,
                                                    "example": 100
                                                  }
                                                }
                                              }
                                            },
                                            "notes": {
                                              "nullable": true,
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string",
                                                  "example": "1 light bulb is burned out."
                                                }
                                              },
                                              "description": "Note added to a procedure field"
                                            }
                                          }
                                        },
                                        "meter": {
                                          "nullable": true,
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "number",
                                              "example": 963,
                                              "description": "Global ID of the meter."
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "description": "Meter of a procedure field. Will be filled if the type of the field is meter"
                                        },
                                        "isDateAndTime": {
                                          "type": "boolean",
                                          "nullable": true,
                                          "description": "Indicate if a DATE field also contains the time",
                                          "example": false
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "progress": {
                                "type": "object",
                                "description": "Progress information on the work order",
                                "nullable": true,
                                "properties": {
                                  "openCount": {
                                    "type": "number",
                                    "example": 1
                                  },
                                  "inProgressCount": {
                                    "type": "number",
                                    "example": 1
                                  },
                                  "onHoldCount": {
                                    "type": "number",
                                    "example": 1
                                  },
                                  "doneCount": {
                                    "type": "number",
                                    "example": 1
                                  }
                                }
                              }
                            },
                            "nullable": false
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified workRequest or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Requests"
          ]
        },
        "delete": {
          "summary": "Delete workRequest",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the workRequest",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the workRequest"
            },
            "400": {
              "description": "Failed to Delete the workRequest",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified workRequest.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "workRequest Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Requests"
          ]
        },
        "patch": {
          "summary": "Update work request information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work request",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Work request to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "example": "Forklift Preventive Maintenance Form"
                    },
                    "description": {
                      "type": "string",
                      "example": "A forklift that needs to be reviewed for any potential problems",
                      "nullable": true
                    },
                    "priority": {
                      "type": "string",
                      "example": "MEDIUM",
                      "enum": [
                        "NONE",
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ]
                    },
                    "assetId": {
                      "type": "number",
                      "format": "integer",
                      "example": 843,
                      "nullable": true
                    },
                    "locationId": {
                      "type": "number",
                      "format": "integer",
                      "example": 852,
                      "nullable": true
                    },
                    "extraFields": {
                      "type": "object",
                      "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Request Type\")",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "example": {
                        "Request Type": "Water Leak"
                      }
                    },
                    "approverTeamId": {
                      "type": "number",
                      "format": "integer",
                      "example": 254,
                      "nullable": true,
                      "description": "ID of the team that is reponsible for approving the request."
                    },
                    "creatorContactInfo": {
                      "type": "string",
                      "nullable": true,
                      "example": "james@example.com",
                      "description": "The creator's contact information associated with this work order request. Possible types are `EMAIL`, `PHONE`, and `OTHER`, which will be inferred from the string provided"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited work request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workRequest"
                    ],
                    "properties": {
                      "workRequest": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "priority",
                          "requestStatus"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "example": 963,
                            "description": "Global ID of the work request"
                          },
                          "title": {
                            "type": "string",
                            "example": "Forklift Preventive Maintenance Form"
                          },
                          "attachments": {
                            "type": "array",
                            "title": "attachment",
                            "description": "List of attachments linked to the Work Request",
                            "items": {
                              "type": "object",
                              "title": "attachment",
                              "required": [
                                "id",
                                "mimeType",
                                "fileName",
                                "url",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Global ID of the attachment",
                                  "example": 12345
                                },
                                "mimeType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "fileName": {
                                  "type": "string",
                                  "description": "Attachment's file name",
                                  "example": "image.png"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Url of the file",
                                  "example": "http://example.com/image.png"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "Date & time at which the attachment was uploaded",
                                  "example": "2022-01-01T00:00:00.000Z"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "Width if the file is an image",
                                  "nullable": true,
                                  "example": 220
                                },
                                "height": {
                                  "type": "number",
                                  "description": "Height if the file is an image",
                                  "nullable": true,
                                  "example": 100
                                }
                              }
                            }
                          },
                          "thumbnail": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            },
                            "nullable": true
                          },
                          "priority": {
                            "type": "string",
                            "example": "MEDIUM",
                            "enum": [
                              "NONE",
                              "LOW",
                              "MEDIUM",
                              "HIGH"
                            ]
                          },
                          "description": {
                            "type": "string",
                            "example": "A forklift that needs to be reviewed for any potential problems",
                            "nullable": true
                          },
                          "requestStatus": {
                            "type": "string",
                            "enum": [
                              "PENDING",
                              "REJECTED",
                              "APPROVED",
                              "DONE"
                            ],
                            "example": "PENDING"
                          },
                          "assetId": {
                            "type": "number",
                            "format": "integer",
                            "example": 843,
                            "nullable": true
                          },
                          "locationId": {
                            "type": "number",
                            "format": "integer",
                            "example": 852,
                            "nullable": true
                          },
                          "workOrderId": {
                            "type": "number",
                            "format": "integer",
                            "example": 254,
                            "nullable": true,
                            "description": "Global ID of the work order attached to the work request. A work order is created once a work request is approved."
                          },
                          "sendEmailNotification": {
                            "type": "boolean",
                            "example": true
                          },
                          "extraFields": {
                            "type": "object",
                            "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Request Type\")",
                            "additionalProperties": {
                              "type": "string"
                            },
                            "example": {
                              "Request Type": "Water Leak"
                            }
                          },
                          "approverTeamId": {
                            "type": "number",
                            "format": "integer",
                            "example": 254,
                            "nullable": true,
                            "description": "ID of the team that is reponsible for approving the request."
                          },
                          "creatorContactInfo": {
                            "type": "object",
                            "nullable": true,
                            "description": "The creator's contact information associated with this work order request",
                            "properties": {
                              "type": {
                                "type": "string",
                                "example": "EMAIL",
                                "enum": [
                                  "PHONE",
                                  "EMAIL",
                                  "OTHER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "example": "james@example.com"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the work request",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "parentId is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified work request.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "work request Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Requests"
          ]
        }
      },
      "/workrequests/{id}/attachments/{filename}": {
        "put": {
          "summary": "Update work request attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work request.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "datasheet.pdf"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the attachment.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-indesign": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/epub+zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xpinstall": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.text": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.spreadsheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.oasis.opendocument.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-tar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rar-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-bzip2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-7z-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apple-diskimage": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-apache-arrow": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/midi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-matroska": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/webm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/quicktime": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/vnd.avi": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.wave": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/qcelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-asf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/mp4": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/opus": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/ogg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-flac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/ape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/wavpack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/amr": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-msdownload": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-shockwave-flash": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/rtf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/wasm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/woff2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-fontobject": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/ttf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "font/otf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-flv": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/postscript": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/eps": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-xz": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-sqlite3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-nintendo-nes-rom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-google-chrome-extension": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-cab-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-deb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-unix-archive": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-rpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-compress": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzip": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-cfb": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mie": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/mxf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2t": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-blender": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-mobipocket-ebook": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/dicom": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-musepack": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/calendar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "text/vcard": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/gltf-binary": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.tcpdump.pcap": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-dsf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.ms.shortcut": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x.apple.alias": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-voc": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/vnd.dolby.dd-raw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-m4a": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/x-m4v": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/3gpp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-esri-shape": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/aac": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-it": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-s3m": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "audio/x-xm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp1s": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "video/mp2p": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.sketchup.skp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-lzh-compressed": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/pgp-encrypted": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/x-asar": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/stl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/vnd.ms-htmlhelp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "model/3mf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "application/zstd": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated work request's attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "string"
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified work request.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "work request Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Requests"
          ]
        },
        "delete": {
          "summary": "Remove work request attachment",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work request.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the attachment, including the extension.",
              "example": "attachment.xls"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully removed work request's attachment."
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Attachment.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Requests"
          ]
        }
      },
      "/workrequests/{id}/thumbnail/{filename}": {
        "put": {
          "summary": "Update work request's thumbnail",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work request.",
              "example": "1"
            },
            {
              "schema": {
                "type": "string"
              },
              "name": "filename",
              "in": "path",
              "required": true,
              "description": "Name of the work request thumbnail, including the extension.",
              "example": "motor.png"
            }
          ],
          "requestBody": {
            "description": "Content type should be `application/octet-stream` and payload should use binary format for the thumbnail.",
            "required": true,
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/flif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-xcf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-canon-cr3": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bmp": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.ms-photo": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/vnd.adobe.photoshop": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-icon": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/bpg": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jp2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jpm": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/mj2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heif-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/heic-sequence": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/icns": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/ktx": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/apng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-olympus-orf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-sony-arw": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-adobe-dng": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-nikon-nef": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-panasonic-rw2": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/x-fujifilm-raf": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/avif": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              },
              "image/jxl": {
                "schema": {
                  "type": "object",
                  "format": "binary"
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully updated work request's thumbnail.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "publicUrl": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "fileKey": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Bad arguments.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "You cannot edit this entity.",
                          "fieldPath": "organizationId",
                          "fieldValue": "1"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Work Request.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Work Request Not Found"
                      }
                    }
                  }
                }
              }
            },
            "413": {
              "description": "Payload too large",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Attachment size must not exceed 1mB"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Requests"
          ]
        }
      },
      "/customfields/{entity}": {
        "post": {
          "summary": "Create custom field",
          "parameters": [
            {
              "schema": {
                "type": "string",
                "enum": [
                  "assets",
                  "locations",
                  "parts",
                  "workOrders",
                  "vendors",
                  "purchaseOrders",
                  "lineItemPurchaseOrders"
                ]
              },
              "name": "entity",
              "in": "path",
              "required": true,
              "description": "Type of entity",
              "example": "assets"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Custom fields to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The custom field data",
                  "required": [
                    "fields"
                  ],
                  "properties": {
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "label",
                          "type"
                        ],
                        "properties": {
                          "label": {
                            "type": "string",
                            "example": "Date Purchased"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "oneline",
                              "multiline",
                              "number",
                              "singleSelect",
                              "date",
                              "datetime",
                              "link"
                            ]
                          },
                          "options": {
                            "nullable": true,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "includeInRecurrence": {
                            "nullable": true,
                            "type": "boolean",
                            "description": "Only relevent in the context of Work Orders"
                          },
                          "required": {
                            "nullable": true,
                            "type": "boolean",
                            "description": "Mark this field as required. This only affect the frontend."
                          },
                          "unlisted": {
                            "nullable": true,
                            "type": "boolean",
                            "description": "Mark this custom field as unlisted. Once unlisted it will only be editable through the Rest API. When the custom field contains data, it will be displayed in the frontend; otherwise, it will remain hidden."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully created the custom fields",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "label",
                        "type",
                        "sortOrder"
                      ],
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "ID of the custom field",
                          "example": 1
                        },
                        "label": {
                          "type": "string",
                          "description": "The label of the custom field",
                          "example": "Date Purchased"
                        },
                        "sortOrder": {
                          "type": "integer",
                          "description": "The order which the field will be displayed in the UI",
                          "example": 25
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "oneline",
                            "multiline",
                            "number",
                            "singleSelect",
                            "date",
                            "datetime",
                            "link"
                          ]
                        },
                        "options": {
                          "type": "array",
                          "description": "The possible choices to the field (if applicable).",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to create the custom field",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User don't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified custom field.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "custom field Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Custom Fields"
          ]
        },
        "get": {
          "summary": "List custom fields",
          "parameters": [
            {
              "schema": {
                "type": "string",
                "enum": [
                  "assets",
                  "locations",
                  "parts",
                  "workOrders",
                  "vendors",
                  "purchaseOrders",
                  "lineItemPurchaseOrders"
                ]
              },
              "name": "entity",
              "in": "path",
              "required": true,
              "description": "Type of entity",
              "example": "assets"
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched the custom fields",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "label",
                        "type",
                        "sortOrder"
                      ],
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "ID of the custom field",
                          "example": 1
                        },
                        "label": {
                          "type": "string",
                          "description": "The label of the custom field",
                          "example": "Date Purchased"
                        },
                        "sortOrder": {
                          "type": "integer",
                          "description": "A weighted value used to sort the custom fields. Fields are sorted lowest to highest. This is different from sortIndex.",
                          "example": 25
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "oneline",
                            "multiline",
                            "number",
                            "singleSelect",
                            "date",
                            "datetime",
                            "link"
                          ]
                        },
                        "required": {
                          "nullable": true,
                          "type": "boolean",
                          "description": "This field is marked as required. This only affect the frontend."
                        },
                        "unlisted": {
                          "nullable": true,
                          "type": "boolean",
                          "description": "This field is marked as unlisted. Once unlisted it will only be editable through the Rest API. When the custom field contains data, it will be displayed in the frontend; otherwise, it will remain hidden."
                        },
                        "options": {
                          "type": "array",
                          "description": "The possible choices to the field (if applicable).",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified custom field.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "custom field Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Custom Fields"
          ]
        }
      },
      "/customfields/{entity}/{id}": {
        "patch": {
          "summary": "Edit custom field",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the custom field",
              "example": "1"
            },
            {
              "schema": {
                "type": "string",
                "enum": [
                  "assets",
                  "locations",
                  "parts",
                  "workOrders",
                  "vendors",
                  "purchaseOrders",
                  "lineItemPurchaseOrders"
                ]
              },
              "name": "entity",
              "in": "path",
              "required": true,
              "description": "Type of entity",
              "example": "assets"
            }
          ],
          "requestBody": {
            "description": "Custom field to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The custom field data",
                  "required": [
                    "field"
                  ],
                  "properties": {
                    "field": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "example": "Date Purchased"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "oneline",
                            "multiline",
                            "number",
                            "singleSelect",
                            "date",
                            "datetime",
                            "link"
                          ]
                        },
                        "options": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "includeInRecurrence": {
                          "nullable": true,
                          "type": "boolean",
                          "description": "Only relevent in the context of Work Orders"
                        },
                        "sortIndex": {
                          "type": "integer",
                          "description": "Represents the actual index (zero based) that you wish the element to be set at. For example, if you have 6 custom fields, and would like to set the field as the second element, you would pass sortIndex: 1. This would in turn affect the sortOrder weight."
                        },
                        "required": {
                          "nullable": true,
                          "type": "boolean",
                          "description": "Mark this custom field as required"
                        },
                        "unlisted": {
                          "nullable": true,
                          "type": "boolean",
                          "description": "Mark this custom field as unlisted"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "204": {
              "description": "Successfully edited the custom field"
            },
            "400": {
              "description": "Failed to edit the custom field",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Invalid Property"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "Failed to edit the custom field",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "User don't have the right permissions"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "404": {
              "description": "Could not find the specified custom field.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "custom field Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Custom Fields"
          ]
        },
        "delete": {
          "summary": "Delete custom field",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the custom field",
              "example": "1"
            },
            {
              "schema": {
                "type": "string",
                "enum": [
                  "assets",
                  "locations",
                  "parts",
                  "workOrders",
                  "vendors",
                  "purchaseOrders",
                  "lineItemPurchaseOrders"
                ]
              },
              "name": "entity",
              "in": "path",
              "required": true,
              "description": "Type of entity",
              "example": "assets"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the Custom Fields"
            },
            "400": {
              "description": "Failed to Delete the Custom Fields",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified Custom Fields.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Custom Fields Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Custom Fields"
          ]
        }
      },
      "/workrequestportals": {
        "post": {
          "summary": "Create new work request portal",
          "requestBody": {
            "description": "Portal to create",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "title"
                  ],
                  "properties": {
                    "title": {
                      "type": "string",
                      "example": "Shipping Portal",
                      "description": "Title of the portal"
                    },
                    "welcomeText": {
                      "type": "string",
                      "nullable": true,
                      "example": "Use this portal for all request related to our shipping activities",
                      "description": "Description text describing the portal"
                    },
                    "descriptionPlaceholder": {
                      "type": "string",
                      "nullable": true,
                      "example": "Describe your request",
                      "description": "Placeholder text for the description field"
                    },
                    "contactInformation": {
                      "type": "string",
                      "nullable": true,
                      "example": "Jimmy@example.com",
                      "description": "Contact of the person creating the portal (email or phone number)"
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the location where the portal is located"
                    },
                    "assetId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the asset related to the portal"
                    },
                    "emailOnly": {
                      "type": "boolean",
                      "example": true,
                      "nullable": true,
                      "description": "Allow request creation with email only to contact the requester"
                    },
                    "sendEmailNotification": {
                      "type": "boolean",
                      "example": true,
                      "nullable": true,
                      "description": "Send email notifications to the portal requesters with status updates on their requests"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "201": {
              "description": "Successfully created portal",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 963,
                        "description": "Global ID of the portal"
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "OrganizationId was not provided",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Missing x-organization-id header."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "403": {
              "description": "You are forbidden to perform the requested action, to access this resource or the feature is disabled by your administrator",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Forbidden"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Request Portals"
          ],
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ]
        },
        "get": {
          "summary": "List work request portals",
          "parameters": [
            {
              "name": "cursor",
              "in": "query",
              "schema": {
                "description": "Last pagination reference",
                "type": "string"
              }
            },
            {
              "name": "limit",
              "in": "query",
              "schema": {
                "description": "max number of Work Request Portals returned",
                "type": "integer",
                "minimum": 1,
                "maximum": 200,
                "default": 100
              }
            },
            {
              "schema": {
                "type": "integer"
              },
              "description": "Required if using a multi organizations token",
              "name": "x-organization-id",
              "in": "header",
              "required": false,
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully fetched Work Request Portals list",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workRequestPortals"
                    ],
                    "properties": {
                      "workRequestPortals": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "title",
                            "portalUrl",
                            "welcomeText",
                            "descriptionPlaceholder",
                            "contactInformation",
                            "assetId",
                            "locationId",
                            "emailOnly",
                            "sendEmailNotification"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 963,
                              "description": "Global ID of the portal"
                            },
                            "title": {
                              "type": "string",
                              "example": "Shipping Portal",
                              "description": "Title of the portal"
                            },
                            "portalUrl": {
                              "type": "string",
                              "example": "https://app.getmaintainsoft.com/request-portal/ae9d33c8-ef78-44c4-925d-352878db0993",
                              "description": "Url to access the portal"
                            },
                            "welcomeText": {
                              "type": "string",
                              "nullable": true,
                              "example": "Use this portal for all request related to our shipping activities",
                              "description": "Description text describing the portal"
                            },
                            "descriptionPlaceholder": {
                              "type": "string",
                              "nullable": true,
                              "example": "Describe your request",
                              "description": "Placeholder text for the description field"
                            },
                            "contactInformation": {
                              "type": "string",
                              "nullable": true,
                              "example": "Jimmy@example.com",
                              "description": "Contact of the person creating the portal (email or phone number)"
                            },
                            "assetId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 852,
                              "description": "ID of the asset related to the portal"
                            },
                            "locationId": {
                              "type": "integer",
                              "nullable": true,
                              "example": 852,
                              "description": "ID of the location where the portal is located"
                            },
                            "emailOnly": {
                              "type": "boolean",
                              "example": true,
                              "nullable": true,
                              "description": "Allow request creation with email only to contact the requester"
                            },
                            "sendEmailNotification": {
                              "type": "boolean",
                              "example": true,
                              "nullable": true,
                              "description": "Send email notifications to the portal requesters with status updates on their requests"
                            }
                          }
                        }
                      },
                      "nextCursor": {
                        "description": "The cursor to retrieve the next page of Work Request Portals.",
                        "type": "string",
                        "nullable": true
                      },
                      "nextPageUrl": {
                        "description": "Path with query parameters that can be used to retrieve the next page of Work Request Portals.",
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            }
          },
          "tags": [
            "Work Request Portals"
          ]
        }
      },
      "/workrequestportals/{id}": {
        "get": {
          "summary": "Get work request portal",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the workRequestPortal",
              "example": "1"
            }
          ],
          "responses": {
            "200": {
              "description": "Successfully retrieved workRequestPortal's information",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workRequestPortal"
                    ],
                    "properties": {
                      "workRequestPortal": {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the portal"
                          },
                          "title": {
                            "type": "string",
                            "example": "Shipping Portal",
                            "description": "Title of the portal"
                          },
                          "welcomeText": {
                            "type": "string",
                            "nullable": true,
                            "example": "Use this portal for all request related to our shipping activities",
                            "description": "Description text describing the portal"
                          },
                          "descriptionPlaceholder": {
                            "type": "string",
                            "nullable": true,
                            "example": "Describe your request",
                            "description": "Placeholder text for the description field"
                          },
                          "contactInformation": {
                            "type": "string",
                            "nullable": true,
                            "example": "Jimmy@example.com",
                            "description": "Contact of the person creating the portal (email or phone number)"
                          },
                          "portalUrl": {
                            "type": "string",
                            "example": "https://app.getmaintainsoft.com/request-portal/ae9d33c8-ef78-44c4-925d-352878db0993",
                            "description": "Url to access the portal"
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the location where the portal is located"
                          },
                          "assetId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the asset related to the portal"
                          },
                          "emailOnly": {
                            "type": "boolean",
                            "example": true,
                            "nullable": true,
                            "description": "Allow request creation with email only to contact the requester"
                          },
                          "sendEmailNotification": {
                            "type": "boolean",
                            "example": true,
                            "nullable": true,
                            "description": "Send email notifications to the portal requesters with status updates on their requests"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Error with query",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "description": "Description of error",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified workRequestPortal or the user cannot access it.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "Not Found."
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Request Portals"
          ]
        },
        "patch": {
          "summary": "Update work request portal information",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the work request portal",
              "example": "1"
            }
          ],
          "requestBody": {
            "description": "Work request portal to update",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "example": "Shipping Portal",
                      "description": "Title of the portal"
                    },
                    "welcomeText": {
                      "type": "string",
                      "nullable": true,
                      "example": "Use this portal for all request related to our shipping activities",
                      "description": "Description text describing the portal"
                    },
                    "descriptionPlaceholder": {
                      "type": "string",
                      "nullable": true,
                      "example": "Describe your request",
                      "description": "Placeholder text for the description field"
                    },
                    "contactInformation": {
                      "type": "string",
                      "nullable": true,
                      "example": "Jimmy@example.com",
                      "description": "Contact of the person creating the portal (email or phone number)"
                    },
                    "locationId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the location where the portal is located"
                    },
                    "assetId": {
                      "type": "integer",
                      "nullable": true,
                      "example": 852,
                      "description": "ID of the asset related to the portal"
                    },
                    "emailOnly": {
                      "type": "boolean",
                      "example": true,
                      "nullable": true,
                      "description": "Allow request creation with email only to contact the requester"
                    },
                    "sendEmailNotification": {
                      "type": "boolean",
                      "example": true,
                      "nullable": true,
                      "description": "Send email notifications to the portal requesters with status updates on their requests"
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Successfully edited work request portal",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "workRequestPortal"
                    ],
                    "properties": {
                      "workRequestPortal": {
                        "type": "object",
                        "required": [
                          "id",
                          "title"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 963,
                            "description": "Global ID of the portal"
                          },
                          "title": {
                            "type": "string",
                            "example": "Shipping Portal",
                            "description": "Title of the portal"
                          },
                          "welcomeText": {
                            "type": "string",
                            "nullable": true,
                            "example": "Use this portal for all request related to our shipping activities",
                            "description": "Description text describing the portal"
                          },
                          "descriptionPlaceholder": {
                            "type": "string",
                            "nullable": true,
                            "example": "Describe your request",
                            "description": "Placeholder text for the description field"
                          },
                          "contactInformation": {
                            "type": "string",
                            "nullable": true,
                            "example": "Jimmy@example.com",
                            "description": "Contact of the person creating the portal (email or phone number)"
                          },
                          "portalUrl": {
                            "type": "string",
                            "example": "https://app.getmaintainsoft.com/request-portal/ae9d33c8-ef78-44c4-925d-352878db0993",
                            "description": "Url to access the portal"
                          },
                          "locationId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the location where the portal is located"
                          },
                          "assetId": {
                            "type": "integer",
                            "nullable": true,
                            "example": 852,
                            "description": "ID of the asset related to the portal"
                          },
                          "emailOnly": {
                            "type": "boolean",
                            "example": true,
                            "nullable": true,
                            "description": "Allow request creation with email only to contact the requester"
                          },
                          "sendEmailNotification": {
                            "type": "boolean",
                            "example": true,
                            "nullable": true,
                            "description": "Send email notifications to the portal requesters with status updates on their requests"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "400": {
              "description": "Failed to edit the work request portal",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "parentId is not valid"
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified work request portal.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "work request portal Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Request Portals"
          ]
        },
        "delete": {
          "summary": "Delete work request portal",
          "parameters": [
            {
              "schema": {
                "type": "integer"
              },
              "name": "id",
              "in": "path",
              "required": true,
              "description": "ID of the workRequestPortal",
              "example": "1"
            }
          ],
          "responses": {
            "204": {
              "description": "Successfully deleted the workRequestPortal"
            },
            "400": {
              "description": "Failed to Delete the workRequestPortal",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "errors"
                    ],
                    "example": {
                      "errors": [
                        {
                          "error": "Not Found."
                        }
                      ]
                    },
                    "properties": {
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "error"
                          ],
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "nullable": true,
                              "type": "string"
                            },
                            "fieldValue": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "401": {
              "$ref": "#/components/responses/UnauthorizedError"
            },
            "404": {
              "description": "Could not find the specified workRequestPortal.",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string",
                        "example": "workRequestPortal Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": [
            "Work Request Portals"
          ]
        }
      }
    },
    "components": {
      "securitySchemes": {
        "Bearer": {
          "description": "\n\u003Cp\u003EAuthenticate by adding the following HTTP header to your requests:\u003C/p\u003E\n\u003Cpre\u003EAuthorization: bearer {{token}}\u003C/pre\u003E\n\u003Cp\u003EThe \u003Ccode\u003Etoken\u003C/code\u003E can be generated in your maintainsoft account. Go to \u003Ca href=\"https://app.getmaintainsoft.com/settings/integrations\"\u003E\"Settings &gt; Integrations &gt; API Keys\"\u003C/a\u003E to generate a key for your user.\u003C/p\u003E\n",
          "type": "http",
          "scheme": "bearer",
          "bearerFormat": "JWT"
        }
      },
      "responses": {
        "UnauthorizedError": {
          "description": "Invalid token"
        }
      }
    },
    "security": [
      {
        "Bearer": []
      }
    ],
    "x-webhooks": {
      "ASSET_STATUS_CHANGE": {
        "post": {
          "summary": "Asset Status Change",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assetId",
                    "orgId",
                    "oldStatus",
                    "newStatus"
                  ],
                  "properties": {
                    "assetId": {
                      "type": "number",
                      "description": "Global ID of the asset",
                      "example": 42
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 21
                    },
                    "oldStatus": {
                      "description": "Previous status of the asset",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "example": 42,
                          "description": "Global ID of the asset status."
                        },
                        "customStatus": {
                          "type": "object",
                          "required": [
                            "label"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": "Global ID of the custom asset status."
                            },
                            "label": {
                              "type": "string",
                              "example": "Decommissioned"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset custom status was created.",
                              "example": "2022-01-01T12:34:56.123Z"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset custom status was last updated.",
                              "example": "2022-01-01T12:34:56.123Z"
                            },
                            "deletedAt": {
                              "type": "string",
                              "nullable": true,
                              "description": "Date at which the asset custom status was deleted.",
                              "format": "date-time",
                              "example": "2022-01-01T12:34:56.123Z"
                            },
                            "downtimeType": {
                              "type": "string",
                              "nullable": true,
                              "example": null,
                              "enum": [
                                "PLANNED",
                                "UNPLANNED"
                              ],
                              "deprecated": true,
                              "description": "Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead."
                            }
                          },
                          "description": "Custom status assigned to asset.",
                          "nullable": true
                        },
                        "customStatusId": {
                          "type": "number",
                          "description": "Id of the custom status assigned to asset.",
                          "nullable": true,
                          "example": 53
                        },
                        "status": {
                          "type": "string",
                          "example": "OFFLINE",
                          "description": "Asset status value.",
                          "enum": [
                            "IGNORE",
                            "OFFLINE",
                            "ONLINE"
                          ]
                        },
                        "downtimeType": {
                          "type": "string",
                          "nullable": true,
                          "example": "PLANNED",
                          "enum": [
                            "PLANNED",
                            "UNPLANNED"
                          ]
                        },
                        "startedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "description": "Asset status effective start date."
                        },
                        "endedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "description": "Asset status effective end date.",
                          "nullable": true
                        },
                        "description": {
                          "type": "string",
                          "example": "Overheated - needs servicing.",
                          "nullable": true
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "readOnly": true,
                          "description": "Date & time at which the asset status was created."
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "readOnly": true,
                          "description": "Date & time at which the asset status was last updated."
                        },
                        "deletedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "readOnly": true,
                          "description": "Date & time at which the asset status was deleted.",
                          "nullable": true
                        }
                      },
                      "example": {
                        "status": "ONLINE",
                        "startedAt": "2022-01-01T12:34:56.123Z",
                        "endedAt": "2022-01-01T12:34:56.123Z",
                        "description": "Back online after scheduled maintenance",
                        "createdAt": "2022-01-01T12:34:56.123Z",
                        "updatedAt": "2022-01-01T12:34:56.123Z",
                        "deletedAt": "2022-01-01T12:34:56.123Z"
                      }
                    },
                    "newStatus": {
                      "description": "New status of the asset",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "example": 42,
                          "description": "Global ID of the asset status."
                        },
                        "customStatus": {
                          "type": "object",
                          "required": [
                            "label"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": "Global ID of the custom asset status."
                            },
                            "label": {
                              "type": "string",
                              "example": "Decommissioned"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset custom status was created.",
                              "example": "2022-01-01T12:34:56.123Z"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the asset custom status was last updated.",
                              "example": "2022-01-01T12:34:56.123Z"
                            },
                            "deletedAt": {
                              "type": "string",
                              "nullable": true,
                              "description": "Date at which the asset custom status was deleted.",
                              "format": "date-time",
                              "example": "2022-01-01T12:34:56.123Z"
                            },
                            "downtimeType": {
                              "type": "string",
                              "nullable": true,
                              "example": null,
                              "enum": [
                                "PLANNED",
                                "UNPLANNED"
                              ],
                              "deprecated": true,
                              "description": "Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead."
                            }
                          },
                          "description": "Custom status assigned to asset.",
                          "nullable": true
                        },
                        "customStatusId": {
                          "type": "number",
                          "description": "Id of the custom status assigned to asset.",
                          "nullable": true,
                          "example": 53
                        },
                        "status": {
                          "type": "string",
                          "example": "OFFLINE",
                          "description": "Asset status value.",
                          "enum": [
                            "IGNORE",
                            "OFFLINE",
                            "ONLINE"
                          ]
                        },
                        "downtimeType": {
                          "type": "string",
                          "nullable": true,
                          "example": "PLANNED",
                          "enum": [
                            "PLANNED",
                            "UNPLANNED"
                          ]
                        },
                        "startedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "description": "Asset status effective start date."
                        },
                        "endedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "description": "Asset status effective end date.",
                          "nullable": true
                        },
                        "description": {
                          "type": "string",
                          "example": "Overheated - needs servicing.",
                          "nullable": true
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "readOnly": true,
                          "description": "Date & time at which the asset status was created."
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "readOnly": true,
                          "description": "Date & time at which the asset status was last updated."
                        },
                        "deletedAt": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:34:56.123Z",
                          "readOnly": true,
                          "description": "Date & time at which the asset status was deleted.",
                          "nullable": true
                        }
                      },
                      "example": {
                        "status": "OFFLINE",
                        "customStatus": {
                          "id": 13,
                          "label": "Technical issues",
                          "downtimeType": "UNPLANNED",
                          "createdAt": "2022-01-01T12:34:56.123Z",
                          "updatedAt": "2022-01-01T12:34:56.123Z"
                        },
                        "startedAt": "2022-01-01T12:34:56.123Z",
                        "description": "Overheated - needs servicing.",
                        "createdAt": "2022-01-01T12:34:56.123Z",
                        "updatedAt": "2022-01-01T12:34:56.123Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "ASSET_STATUS_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "METER_TRIGGER_STATE_CHANGE": {
        "post": {
          "summary": "Meter Trigger Status Change",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "meterTriggerId",
                    "meterId",
                    "orgId",
                    "oldState",
                    "newState",
                    "occurredAt"
                  ],
                  "properties": {
                    "meterTriggerId": {
                      "type": "number",
                      "description": "Global ID of the meter trigger",
                      "example": 123
                    },
                    "meterId": {
                      "type": "number",
                      "description": "Global ID of the meter",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "oldState": {
                      "title": "State",
                      "type": "string",
                      "enum": [
                        "INACTIVE",
                        "INSUFFICIENT_DATA",
                        "PENDING",
                        "STABLE",
                        "TRIGGERED"
                      ],
                      "description": "Previous state of the trigger",
                      "example": "PENDING"
                    },
                    "newState": {
                      "title": "State",
                      "type": "string",
                      "enum": [
                        "INACTIVE",
                        "INSUFFICIENT_DATA",
                        "PENDING",
                        "STABLE",
                        "TRIGGERED"
                      ],
                      "description": "New state of the trigger",
                      "example": "TRIGGERED"
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occured",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "operationId": "METER_TRIGGER_STATE_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_ASSET": {
        "post": {
          "summary": "New Asset",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assetId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "assetId": {
                      "type": "number",
                      "description": "Global ID of the Asset",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newAsset": {
                      "type": "object",
                      "description": "Properties of the created Asset",
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "Forklift"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true,
                          "example": "Forklift that is used to to move heavy equipments around the warehouse"
                        },
                        "locationId": {
                          "type": "integer",
                          "nullable": true,
                          "example": 852,
                          "description": "ID of the location where the asset is located"
                        },
                        "barcode": {
                          "type": "string",
                          "nullable": true,
                          "example": "BWFPBNRHAW54CG",
                          "description": "String encoded barcode"
                        },
                        "parentId": {
                          "type": "integer",
                          "nullable": true,
                          "example": 852,
                          "description": "ID of the parent asset"
                        },
                        "vendorIds": {
                          "type": "array",
                          "description": "Vendor IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        },
                        "teamIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "description": "List of teams responsible for the asset",
                          "example": [123, 456]
                        },
                        "assetTypes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "manual",
                            "tool"
                          ],
                          "description": "List of asset types"
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Serial Number\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Serial Number": "000000000"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_ASSET",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_CATEGORY_ON_WORK_ORDER": {
        "post": {
          "summary": "New Category on Work Order",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workOrderId",
                    "orgId",
                    "newCategories",
                    "occurredAt"
                  ],
                  "properties": {
                    "workOrderId": {
                      "type": "number",
                      "description": "Global ID of the work order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "newCategories": {
                      "type": "array",
                      "description": "Newly added categories on the work order",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "number",
                            "description": "Global ID of the category",
                            "example": 123
                          },
                          "name": {
                            "type": "string",
                            "description": "Label of the category",
                            "example": "Safety"
                          },
                          "description": {
                            "type": "string",
                            "example": "Used for everything related to Safety",
                            "description": "Description field for additional information."
                          }
                        }
                      }
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occured",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_CATEGORY_ON_WORK_ORDER",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_LOCATION": {
        "post": {
          "summary": "New Location",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "locationId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "locationId": {
                      "type": "number",
                      "description": "Global ID of the Location",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_LOCATION",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_PART": {
        "post": {
          "summary": "New Part",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "partId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "partId": {
                      "type": "number",
                      "description": "Global ID of the Part",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newPart": {
                      "type": "object",
                      "description": "Properties of the created Part",
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "Locknut - 1/8"
                        },
                        "area": {
                          "type": "string",
                          "example": "tool room",
                          "nullable": true
                        },
                        "assetIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [12, 4561],
                          "description": "List of asset IDs"
                        },
                        "availableQuantity": {
                          "type": "integer",
                          "description": "Quantity currently in stock",
                          "example": 10
                        },
                        "barcode": {
                          "type": "string",
                          "nullable": true,
                          "example": "bWFpbnRhaW54Cg==",
                          "description": "String encoded barcode"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true,
                          "example": ""
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Part Number": "000000000"
                          }
                        },
                        "locationId": {
                          "type": "integer",
                          "nullable": true,
                          "example": 852,
                          "description": "ID of the location where the part is located"
                        },
                        "minimumQuantity": {
                          "type": "integer",
                          "description": "Minimum quantity before you should restock",
                          "example": 5
                        },
                        "partTypes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of part types"
                        },
                        "teamIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [1, 4],
                          "description": "List of team IDs in charge of the part"
                        },
                        "unitCost": {
                          "type": "integer",
                          "description": "Cost in cents. For example, for $1.20, put 120.",
                          "example": 120,
                          "nullable": true
                        },
                        "vendors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vendorId": {
                                "type": "integer",
                                "example": "1",
                                "description": "Id of the vendor"
                              },
                              "partNumber": {
                                "type": "string",
                                "example": "XC230",
                                "description": "Part number given to the part by this vendor"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_PART",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_PURCHASE_ORDER": {
        "post": {
          "summary": "New Purchase Order",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "purchaseOrderId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "purchaseOrderId": {
                      "type": "number",
                      "description": "Global ID of the Purchase Order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newPurchaseOrder": {
                      "type": "object",
                      "description": "Properties of the created Purchase Order",
                      "properties": {
                        "approverId": {
                          "type": "number",
                          "example": 135,
                          "description": "ID of the user who approved the Purchase Order",
                          "nullable": true
                        },
                        "approvalDate": {
                          "type": "string",
                          "example": "2022-01-01T00:00:00.000Z",
                          "description": "Date the Purchase Order was approved",
                          "nullable": true
                        },
                        "note": {
                          "type": "string",
                          "nullable": true,
                          "description": "Notes left for Purchase Orders"
                        },
                        "status": {
                          "type": "string",
                          "example": "APPROVED",
                          "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                          "nullable": true
                        },
                        "vendorId": {
                          "type": "number",
                          "example": 432,
                          "description": "ID of vendor that this Purchase Order is associated with",
                          "nullable": true
                        },
                        "vendorContactIds": {
                          "type": "array",
                          "description": "List of vendor contact IDs in the Purchase Order",
                          "items": {
                            "type": "number",
                            "example": 12
                          }
                        },
                        "billingAddress": {
                          "type": "object",
                          "description": "Billing address in the Purchase Order",
                          "required": [
                            "city",
                            "country",
                            "postalCode",
                            "state",
                            "street"
                          ],
                          "properties": {
                            "city": {
                              "type": "string",
                              "example": "Montreal"
                            },
                            "country": {
                              "type": "string",
                              "example": "Canada"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "H4B 5G0"
                            },
                            "state": {
                              "type": "string",
                              "example": "Quebec"
                            },
                            "street": {
                              "type": "string",
                              "example": "1909 Avenue des Canadiens-de-Montréal"
                            },
                            "label": {
                              "type": "string",
                              "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                              "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                              "nullable": true
                            }
                          },
                          "nullable": true
                        },
                        "shippingAddress": {
                          "type": "object",
                          "description": "Shipping address in the Purchase Order",
                          "required": [
                            "city",
                            "country",
                            "postalCode",
                            "state",
                            "street"
                          ],
                          "properties": {
                            "city": {
                              "type": "string",
                              "example": "Montreal"
                            },
                            "country": {
                              "type": "string",
                              "example": "Canada"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "H4B 5G0"
                            },
                            "state": {
                              "type": "string",
                              "example": "Quebec"
                            },
                            "street": {
                              "type": "string",
                              "example": "1909 Avenue des Canadiens-de-Montréal"
                            },
                            "label": {
                              "type": "string",
                              "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                              "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                              "nullable": true
                            }
                          },
                          "nullable": true
                        },
                        "dueDate": {
                          "type": "string",
                          "example": "2022-01-01T00:00:00.000Z",
                          "description": "Due date of Purchase Order",
                          "nullable": true
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Ordered Date": "2023-01-01"
                          }
                        },
                        "attachments": {
                          "type": "array",
                          "title": "attachment",
                          "description": "List of attachments linked to the Purchase Order",
                          "items": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            }
                          }
                        },
                        "autoGeneratedNumber": {
                          "type": "number",
                          "example": 987,
                          "nullable": true,
                          "description": "Autogenerated Purchase Order number"
                        },
                        "overrideNumber": {
                          "type": "string",
                          "example": "A123",
                          "nullable": true,
                          "description": "Custom number/identifier for Purchase Order"
                        },
                        "creatorId": {
                          "type": "number",
                          "example": 432,
                          "description": "ID of the user that created this Purchase Order"
                        },
                        "reviewNote": {
                          "type": "string",
                          "nullable": true,
                          "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                        },
                        "thumbnail": {
                          "type": "object",
                          "title": "attachment",
                          "required": [
                            "id",
                            "mimeType",
                            "fileName",
                            "url",
                            "createdAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Global ID of the attachment",
                              "example": 12345
                            },
                            "mimeType": {
                              "type": "string",
                              "description": "MIME type of the file",
                              "example": "image/png"
                            },
                            "fileName": {
                              "type": "string",
                              "description": "Attachment's file name",
                              "example": "image.png"
                            },
                            "url": {
                              "type": "string",
                              "description": "Url of the file",
                              "example": "http://example.com/image.png"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the attachment was uploaded",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "width": {
                              "type": "number",
                              "description": "Width if the file is an image",
                              "nullable": true,
                              "example": 220
                            },
                            "height": {
                              "type": "number",
                              "description": "Height if the file is an image",
                              "nullable": true,
                              "example": 100
                            }
                          },
                          "nullable": true
                        },
                        "items": {
                          "type": "array",
                          "description": "List of items in the Purchase Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "quantityOrdered"
                            ],
                            "properties": {
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the Purchase Order item was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "price": {
                                "type": "number",
                                "example": 25000,
                                "nullable": true,
                                "description": "Total price of items in cents"
                              },
                              "partNumber": {
                                "type": "string",
                                "nullable": true
                              },
                              "name": {
                                "type": "string",
                                "nullable": true
                              },
                              "updaterId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the last user who updated the Purchase Order item"
                              },
                              "creatorId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the Purchase Order item creator"
                              },
                              "partId": {
                                "type": "number",
                                "example": 43,
                                "description": "ID of the part this item is related to",
                                "nullable": true
                              },
                              "id": {
                                "type": "number",
                                "example": 23,
                                "description": "ID of the item"
                              },
                              "quantityOrdered": {
                                "type": "number",
                                "example": 4,
                                "description": "Represent the amount of units for this item that were ordered in the purchase order."
                              },
                              "quantityReceived": {
                                "type": "number",
                                "example": 3,
                                "nullable": true,
                                "description": "Represents the total amount of this specific item that has been received to date."
                              },
                              "unitCost": {
                                "type": "number",
                                "example": 125000,
                                "nullable": true,
                                "description": "Price of a single item in cents"
                              },
                              "lineExtraFields": {
                                "type": "object",
                                "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "example": {
                                  "Ordered Date": "2023-01-01"
                                }
                              },
                              "partExtraFields": {
                                "type": "object",
                                "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "example": {
                                  "Part Number": "321"
                                }
                              },
                              "organizationId": {
                                "type": "number",
                                "description": "Global ID of the organization",
                                "example": 321
                              },
                              "purchaseOrderId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 891,
                                "description": "Global ID of the Purchase Order linked with that Purchase Order item"
                              }
                            }
                          }
                        },
                        "costs": {
                          "type": "array",
                          "description": "List of costs in the Purchase Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "type",
                              "amount"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 123,
                                "description": "ID of the cost"
                              },
                              "organizationId": {
                                "type": "number",
                                "description": "Global ID of the organization",
                                "example": 321
                              },
                              "creatorId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the Purchase Order item creator"
                              },
                              "purchaseOrderId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 891,
                                "description": "Global ID of the Purchase Order linked with that Purchase Order cost"
                              },
                              "name": {
                                "type": "string",
                                "example": "Sales Tax",
                                "description": "Description of the cost"
                              },
                              "type": {
                                "type": "string",
                                "example": "AMOUNT_TAXABLE",
                                "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                              },
                              "amount": {
                                "type": "number",
                                "example": 125000
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the Purchase Order cost was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_PURCHASE_ORDER",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_VENDOR": {
        "post": {
          "summary": "New Vendor",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "vendorId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "vendorId": {
                      "type": "number",
                      "description": "Global ID of the Vendor",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_VENDOR",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_WORK_ORDER": {
        "post": {
          "summary": "New Work Order",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workOrderId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "workOrderId": {
                      "type": "number",
                      "description": "Global ID of the Work Order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newWorkOrder": {
                      "type": "object",
                      "description": "Properties of the updated work order",
                      "properties": {
                        "assetId": {
                          "nullable": true,
                          "type": "integer"
                        },
                        "assigneeIds": {
                          "type": "array",
                          "description": "List of user ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "categories": {
                          "type": "array",
                          "description": "Newly added categories on the work order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the category",
                                "example": 123
                              },
                              "name": {
                                "type": "string",
                                "description": "Label of the category",
                                "example": "Safety"
                              },
                              "description": {
                                "type": "string",
                                "example": "Used for everything related to Safety",
                                "description": "Description field for additional information."
                              }
                            }
                          }
                        },
                        "description": {
                          "nullable": true,
                          "type": "string",
                          "example": "A work order sample description"
                        },
                        "dueDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order is due",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "estimatedTime": {
                          "type": "integer",
                          "nullable": true,
                          "description": "The estimated time taken in seconds to complete the work order",
                          "example": 3600
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Third Party Id\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Third Party Id": "aa674f49-dac6-4f15-9fdd-061d2b5caf30"
                          }
                        },
                        "locationId": {
                          "nullable": true,
                          "type": "integer",
                          "description": "Global ID of the location assigned to the work order"
                        },
                        "parts": {
                          "type": "array",
                          "description": "Parts attached to the Work Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "quantityUsed",
                              "copyOnRecurring"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the part"
                              },
                              "quantityUsed": {
                                "type": "integer",
                                "description": "Quantity used in the work order.",
                                "example": 2
                              },
                              "unitCost": {
                                "nullable": true,
                                "type": "integer",
                                "description": "Cost in cents. For example, for $1.20, put 120",
                                "example": 120
                              },
                              "copyOnRecurring": {
                                "type": "string",
                                "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                "default": "Default",
                                "enum": [
                                  "NoCopy",
                                  "Copy",
                                  "Default"
                                ]
                              }
                            }
                          }
                        },
                        "priority": {
                          "type": "string",
                          "example": "MEDIUM",
                          "enum": [
                            "NONE",
                            "LOW",
                            "MEDIUM",
                            "HIGH"
                          ]
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "teamIds": {
                          "type": "array",
                          "description": "List of team ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "vendorIds": {
                          "type": "array",
                          "description": "Vendor IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_WORK_ORDER",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "NEW_WORK_REQUEST": {
        "post": {
          "summary": "New Request",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workRequestId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "workRequestId": {
                      "type": "number",
                      "description": "Global ID of the Request",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "operationId": "NEW_WORK_REQUEST",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "PART_QUANTITY_CHANGE": {
        "post": {
          "summary": "Part Quantity Changed",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "partId",
                    "orgId",
                    "quantityDiff"
                  ],
                  "properties": {
                    "partId": {
                      "type": "number",
                      "description": "Global ID of the part",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "quantityDiff": {
                      "type": "number",
                      "description": "Number of units added to the part, negative values represents units removed from the part",
                      "example": 3
                    },
                    "oldQuantity": {
                      "type": "number",
                      "description": "Total number of units on the part before the transaction (if available)",
                      "example": 54
                    },
                    "newQuantity": {
                      "type": "number",
                      "description": "Total number of units on the part after the transaction (if available)",
                      "example": 57
                    },
                    "userId": {
                      "type": "number",
                      "description": "Global ID of the user that made a change",
                      "example": 1337
                    },
                    "triggeredFrom": {
                      "type": "string",
                      "description": "Origin of the part quantity change",
                      "enum": [
                        "PURCHASE_ORDER",
                        "WORK_ORDER",
                        "MANUAL_RESTOCK",
                        "PART_TRANSFER"
                      ],
                      "example": "PURCHASE_ORDER"
                    }
                  }
                }
              }
            }
          },
          "operationId": "PART_QUANTITY_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "PURCHASE_ORDER_CHANGE": {
        "post": {
          "summary": "Purchase Order Change",
          "security": [],
          "description": "The only properties triggering the webhook when changed, are the following:ATTACHMENTS, BILLING_ADDRESS, COSTS, DUE_DATE, EXTRA_FIELDS, ITEMS, NOTE, OVERRIDE_NUMBER, SHIPPING_ADDRESS, STATUS, VENDOR, VENDOR_CONTACTS",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "purchaseOrderId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "purchaseOrderId": {
                      "type": "number",
                      "description": "Global ID of the purchase order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newPurchaseOrder": {
                      "type": "object",
                      "description": "Properties of the updated purchase order",
                      "properties": {
                        "approvalDate": {
                          "type": "string",
                          "example": "2022-01-01T00:00:00.000Z",
                          "description": "Date the Purchase Order was approved",
                          "nullable": true
                        },
                        "approverId": {
                          "type": "number",
                          "example": 135,
                          "description": "ID of the user who approved the Purchase Order",
                          "nullable": true
                        },
                        "attachments": {
                          "type": "array",
                          "title": "attachment",
                          "description": "List of attachments linked to the Purchase Order",
                          "items": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            }
                          }
                        },
                        "autoGeneratedNumber": {
                          "type": "number",
                          "example": 987,
                          "nullable": true,
                          "description": "Autogenerated Purchase Order number"
                        },
                        "billingAddress": {
                          "type": "object",
                          "description": "Billing address in the Purchase Order",
                          "required": [
                            "city",
                            "country",
                            "postalCode",
                            "state",
                            "street"
                          ],
                          "properties": {
                            "city": {
                              "type": "string",
                              "example": "Montreal"
                            },
                            "country": {
                              "type": "string",
                              "example": "Canada"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "H4B 5G0"
                            },
                            "state": {
                              "type": "string",
                              "example": "Quebec"
                            },
                            "street": {
                              "type": "string",
                              "example": "1909 Avenue des Canadiens-de-Montréal"
                            },
                            "label": {
                              "type": "string",
                              "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                              "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                              "nullable": true
                            }
                          },
                          "nullable": true
                        },
                        "creatorId": {
                          "type": "number",
                          "example": 432,
                          "description": "ID of the user that created this Purchase Order"
                        },
                        "dueDate": {
                          "type": "string",
                          "example": "2022-01-01T00:00:00.000Z",
                          "description": "Due date of Purchase Order",
                          "nullable": true
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Ordered Date": "2023-01-01"
                          }
                        },
                        "note": {
                          "type": "string",
                          "nullable": true,
                          "description": "Notes left for Purchase Orders"
                        },
                        "overrideNumber": {
                          "type": "string",
                          "example": "A123",
                          "nullable": true,
                          "description": "Custom number/identifier for Purchase Order"
                        },
                        "reviewNote": {
                          "type": "string",
                          "nullable": true,
                          "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                        },
                        "shippingAddress": {
                          "type": "object",
                          "description": "Shipping address in the Purchase Order",
                          "required": [
                            "city",
                            "country",
                            "postalCode",
                            "state",
                            "street"
                          ],
                          "properties": {
                            "city": {
                              "type": "string",
                              "example": "Montreal"
                            },
                            "country": {
                              "type": "string",
                              "example": "Canada"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "H4B 5G0"
                            },
                            "state": {
                              "type": "string",
                              "example": "Quebec"
                            },
                            "street": {
                              "type": "string",
                              "example": "1909 Avenue des Canadiens-de-Montréal"
                            },
                            "label": {
                              "type": "string",
                              "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                              "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                              "nullable": true
                            }
                          },
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "example": "APPROVED",
                          "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED",
                          "nullable": true
                        },
                        "thumbnail": {
                          "type": "object",
                          "title": "attachment",
                          "required": [
                            "id",
                            "mimeType",
                            "fileName",
                            "url",
                            "createdAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Global ID of the attachment",
                              "example": 12345
                            },
                            "mimeType": {
                              "type": "string",
                              "description": "MIME type of the file",
                              "example": "image/png"
                            },
                            "fileName": {
                              "type": "string",
                              "description": "Attachment's file name",
                              "example": "image.png"
                            },
                            "url": {
                              "type": "string",
                              "description": "Url of the file",
                              "example": "http://example.com/image.png"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the attachment was uploaded",
                              "example": "2022-01-01T00:00:00.000Z"
                            },
                            "width": {
                              "type": "number",
                              "description": "Width if the file is an image",
                              "nullable": true,
                              "example": 220
                            },
                            "height": {
                              "type": "number",
                              "description": "Height if the file is an image",
                              "nullable": true,
                              "example": 100
                            }
                          },
                          "nullable": true
                        },
                        "updatedAt": {
                          "type": "string",
                          "example": "2022-01-01T00:00:00.000Z",
                          "description": "Date the Purchase Order was last updated",
                          "nullable": true
                        },
                        "vendorContactIds": {
                          "type": "array",
                          "description": "List of vendor contact IDs in the Purchase Order",
                          "items": {
                            "type": "number",
                            "example": 12
                          }
                        },
                        "vendorId": {
                          "type": "number",
                          "example": 432,
                          "description": "ID of vendor that this Purchase Order is associated with",
                          "nullable": true
                        },
                        "items": {
                          "type": "array",
                          "description": "List of items in the Purchase Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "quantityOrdered"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 23,
                                "description": "ID of the item"
                              },
                              "quantityOrdered": {
                                "type": "number",
                                "example": 4,
                                "description": "Represent the amount of units for this item that were ordered in the purchase order."
                              },
                              "name": {
                                "type": "string",
                                "nullable": true
                              },
                              "lineExtraFields": {
                                "type": "object",
                                "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "example": {
                                  "Ordered Date": "2023-01-01"
                                }
                              },
                              "partExtraFields": {
                                "type": "object",
                                "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "example": {
                                  "Part Number": "321"
                                }
                              },
                              "partId": {
                                "type": "number",
                                "example": 43,
                                "description": "ID of the part this item is related to",
                                "nullable": true
                              },
                              "partNumber": {
                                "type": "string",
                                "nullable": true
                              },
                              "price": {
                                "type": "number",
                                "example": 25000,
                                "nullable": true,
                                "description": "Total price of items in cents"
                              },
                              "quantityFulfilled": {
                                "type": "number",
                                "description": "Represents the current amount of this item that was fulfilled when the webhook was triggered.",
                                "example": 3,
                                "nullable": true
                              },
                              "quantityReceived": {
                                "type": "number",
                                "example": 3,
                                "nullable": true,
                                "description": "Represents the total amount of this specific item that has been received to date."
                              },
                              "unitCost": {
                                "type": "number",
                                "example": 125000,
                                "nullable": true,
                                "description": "Price of a single item in cents"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the Purchase Order item was last updated.",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updaterId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the last user who updated the Purchase Order item"
                              },
                              "deletedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time",
                                "description": "Date at which the Purchase Order item was deleted",
                                "example": "2022-01-01T00:00:00.000Z"
                              }
                            }
                          }
                        },
                        "costs": {
                          "type": "array",
                          "description": "List of costs in the Purchase Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "type",
                              "amount"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 123,
                                "description": "ID of the cost"
                              },
                              "name": {
                                "type": "string",
                                "example": "Sales Tax",
                                "description": "Description of the cost"
                              },
                              "type": {
                                "type": "string",
                                "example": "AMOUNT_TAXABLE",
                                "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                              },
                              "amount": {
                                "type": "number",
                                "example": 125000
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the Purchase Order cost was created",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the Purchase Order cost was last updated.",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "deletedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time",
                                "description": "Date at which the Purchase Order cost was deleted",
                                "example": "2022-01-01T00:00:00.000Z"
                              },
                              "creatorId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the Purchase Order item creator"
                              },
                              "updaterId": {
                                "type": "integer",
                                "nullable": true,
                                "example": 851,
                                "description": "ID of the last user who updated the Purchase Order cost"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "PURCHASE_ORDER_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "PART_CHANGE": {
        "post": {
          "summary": "Part Change",
          "security": [],
          "description": "The only properties triggering the webhook when changed, are the following: AREA, ASSETS, AVAILABLE_QUANTITY, BARCODE, DESCRIPTION, EXTRA_FIELDS, LOCATION, MINIMUM_QUANTITY, NAME, PART_TYPES, TEAMS, UNIT_COST, VENDORS",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "partId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "partId": {
                      "type": "number",
                      "description": "Global ID of the part",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newPart": {
                      "type": "object",
                      "description": "Properties of the updated part",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 963,
                          "description": "Global ID of the part"
                        },
                        "name": {
                          "type": "string",
                          "example": "Locknut - 1/8"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true,
                          "example": ""
                        },
                        "area": {
                          "type": "string",
                          "example": "tool room",
                          "nullable": true
                        },
                        "unitCost": {
                          "type": "integer",
                          "description": "Cost in cents. For example, for $1.20, put 120.",
                          "example": 120,
                          "nullable": true
                        },
                        "availableQuantity": {
                          "type": "integer",
                          "description": "Quantity currently in stock",
                          "example": 10
                        },
                        "minimumQuantity": {
                          "type": "integer",
                          "description": "Minimum quantity before you should restock",
                          "example": 5
                        },
                        "barcode": {
                          "type": "string",
                          "nullable": true,
                          "example": "bWFpbnRhaW54Cg==",
                          "description": "String encoded barcode"
                        },
                        "locationId": {
                          "type": "integer",
                          "nullable": true,
                          "example": 852,
                          "description": "ID of the location where the part is located"
                        },
                        "partTypes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of part types"
                        },
                        "assetIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [12, 4561],
                          "description": "List of asset IDs"
                        },
                        "teamIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [1, 4],
                          "description": "List of team IDs in charge of the part"
                        },
                        "vendors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vendorId": {
                                "type": "integer",
                                "example": "1",
                                "description": "Id of the vendor"
                              },
                              "partNumber": {
                                "type": "string",
                                "example": "XC230",
                                "description": "Part number given to the part by this vendor"
                              }
                            }
                          }
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Part Number": "000000000"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "PART_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "PART_DELETE": {
        "post": {
          "summary": "Part Delete",
          "security": [],
          "description": "Triggered when a part gets deleted.",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "partId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "partId": {
                      "type": "number",
                      "description": "Global ID of the part",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "deletedPart": {
                      "type": "object",
                      "description": "Properties of the deleted part",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 963,
                          "description": "Global ID of the part"
                        },
                        "name": {
                          "type": "string",
                          "example": "Locknut - 1/8"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true,
                          "example": ""
                        },
                        "area": {
                          "type": "string",
                          "example": "tool room",
                          "nullable": true
                        },
                        "unitCost": {
                          "type": "integer",
                          "description": "Cost in cents. For example, for $1.20, put 120.",
                          "example": 120,
                          "nullable": true
                        },
                        "availableQuantity": {
                          "type": "integer",
                          "description": "Quantity currently in stock",
                          "example": 10
                        },
                        "minimumQuantity": {
                          "type": "integer",
                          "description": "Minimum quantity before you should restock",
                          "example": 5
                        },
                        "barcode": {
                          "type": "string",
                          "nullable": true,
                          "example": "bWFpbnRhaW54Cg==",
                          "description": "String encoded barcode"
                        },
                        "locationId": {
                          "type": "integer",
                          "nullable": true,
                          "example": 852,
                          "description": "ID of the location where the part is located"
                        },
                        "partTypes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of part types"
                        },
                        "assetIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [12, 4561],
                          "description": "List of asset IDs"
                        },
                        "teamIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [1, 4],
                          "description": "List of team IDs in charge of the part"
                        },
                        "vendors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vendorId": {
                                "type": "integer",
                                "example": "1",
                                "description": "Id of the vendor"
                              },
                              "partNumber": {
                                "type": "string",
                                "example": "XC230",
                                "description": "Part number given to the part by this vendor"
                              }
                            }
                          }
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Part Number": "000000000"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "PART_DELETE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "PURCHASE_ORDER_STATUS_CHANGE": {
        "post": {
          "summary": "Purchase Order Status Change",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "purchaseOrderId",
                    "orgId",
                    "oldStatus",
                    "newStatus",
                    "occurredAt"
                  ],
                  "properties": {
                    "purchaseOrderId": {
                      "type": "number",
                      "description": "Global ID of the purchase order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "vendorId": {
                      "type": "number",
                      "description": "ID of the vendor",
                      "example": 321
                    },
                    "oldStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "APPROVED",
                        "CANCELED",
                        "COMPLETED",
                        "DECLINED",
                        "PARTIALLY_FULFILLED",
                        "PENDING",
                        "REQUESTED"
                      ],
                      "description": "Previous status of the purchase order"
                    },
                    "newStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "APPROVED",
                        "CANCELED",
                        "COMPLETED",
                        "DECLINED",
                        "PARTIALLY_FULFILLED",
                        "PENDING",
                        "REQUESTED"
                      ],
                      "description": "New status of the purchase order"
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "purchaseOrder": {
                      "type": "object",
                      "required": [
                        "id",
                        "items"
                      ],
                      "properties": {
                        "id": {
                          "type": "number",
                          "example": 135,
                          "description": "Global ID of the Purchase Order"
                        },
                        "note": {
                          "type": "string",
                          "nullable": true,
                          "description": "Notes left for Purchase Orders"
                        },
                        "reviewNote": {
                          "type": "string",
                          "nullable": true,
                          "description": "Notes to be left for changes to be made when sending a Purchase Order for revision"
                        },
                        "status": {
                          "type": "string",
                          "example": "APPROVED",
                          "enum": [
                            "APPROVED",
                            "CANCELED",
                            "COMPLETED",
                            "DECLINED",
                            "PARTIALLY_FULFILLED",
                            "PENDING",
                            "REQUESTED"
                          ],
                          "description": "Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED"
                        },
                        "dueDate": {
                          "type": "string",
                          "example": "2020-07-22T14:01:00Z",
                          "description": "Due date of Purchase Order",
                          "nullable": true
                        },
                        "vendorId": {
                          "type": "number",
                          "example": 432,
                          "description": "ID of vendor that this Purchase Order is associated with"
                        },
                        "overrideNumber": {
                          "type": "string",
                          "example": "A123",
                          "nullable": true,
                          "description": "Custom number/identifier for Purchase Order"
                        },
                        "items": {
                          "type": "array",
                          "description": "List of items in the Purchase Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "quantityOrdered"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 23,
                                "description": "ID of the item"
                              },
                              "partId": {
                                "type": "number",
                                "example": 43,
                                "description": "ID of the part this item is related to",
                                "nullable": true
                              },
                              "description": {
                                "type": "string",
                                "description": "The description related to the part.",
                                "example": "A yellow screwdriver"
                              },
                              "name": {
                                "type": "string",
                                "nullable": true
                              },
                              "partNumber": {
                                "type": "string",
                                "nullable": true
                              },
                              "price": {
                                "type": "number",
                                "example": 25000,
                                "description": "Total price of items in cents",
                                "nullable": true
                              },
                              "quantityOrdered": {
                                "type": "number",
                                "example": 4
                              },
                              "quantityReceived": {
                                "type": "number",
                                "example": 3,
                                "nullable": true
                              },
                              "unitCost": {
                                "type": "number",
                                "example": 125000,
                                "description": "Price of a single item in cents"
                              },
                              "extraFields": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "description": "Custom Fields on the entity. Deprecated: Use `lineExtraFields` and `partExtraFields` instead as it was previously incorrectly populated with `partExtraFields`.",
                                "deprecated": true,
                                "nullable": true
                              },
                              "lineExtraFields": {
                                "type": "object",
                                "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Ordered Date\")",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "example": {
                                  "Ordered Date": "2023-01-01"
                                }
                              },
                              "partExtraFields": {
                                "type": "object",
                                "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Part Number\")",
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "example": {
                                  "Part Number": "312"
                                }
                              }
                            }
                          }
                        },
                        "costs": {
                          "type": "array",
                          "description": "List of costs in the Purchase Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "name",
                              "type",
                              "amount"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "example": 123,
                                "description": "ID of the cost"
                              },
                              "name": {
                                "type": "string",
                                "example": "Sales Tax",
                                "description": "Description of the cost"
                              },
                              "type": {
                                "type": "string",
                                "example": "AMOUNT_TAXABLE",
                                "enum": [
                                  "AMOUNT_NON_TAXABLE",
                                  "AMOUNT_TAXABLE",
                                  "PERCENT_NON_TAXABLE",
                                  "PERCENT_TAXABLE"
                                ],
                                "description": "Type of cost in either cents or percent. Accepted types in cents are AMOUNT_TAXABLE and AMOUNT_NON_TAXABLE. For percentage use PERCENT_TAXABLE"
                              },
                              "amount": {
                                "type": "number",
                                "example": 125000
                              }
                            }
                          }
                        },
                        "thumbnail": {
                          "type": "object",
                          "title": "attachment",
                          "required": [
                            "id",
                            "mimeType",
                            "fileName",
                            "url",
                            "createdAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Global ID of the attachment",
                              "example": 12345
                            },
                            "mimeType": {
                              "type": "string",
                              "description": "MIME type of the file",
                              "example": "image/png"
                            },
                            "fileName": {
                              "type": "string",
                              "description": "Attachment's file name",
                              "example": "image.png"
                            },
                            "url": {
                              "type": "string",
                              "description": "Url of the file",
                              "example": "http://example.com/image.png"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Date & time at which the attachment was uploaded",
                              "example": "2020-05-19T21:08:37Z"
                            },
                            "width": {
                              "type": "number",
                              "description": "Width if the file is an image",
                              "nullable": true,
                              "example": 220
                            },
                            "height": {
                              "type": "number",
                              "description": "Height if the file is an image",
                              "nullable": true,
                              "example": 100
                            }
                          },
                          "nullable": true
                        },
                        "attachments": {
                          "type": "array",
                          "title": "attachment",
                          "description": "List of attachments linked to the Purchase Order",
                          "items": {
                            "type": "object",
                            "title": "attachment",
                            "required": [
                              "id",
                              "mimeType",
                              "fileName",
                              "url",
                              "createdAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the attachment",
                                "example": 12345
                              },
                              "mimeType": {
                                "type": "string",
                                "description": "MIME type of the file",
                                "example": "image/png"
                              },
                              "fileName": {
                                "type": "string",
                                "description": "Attachment's file name",
                                "example": "image.png"
                              },
                              "url": {
                                "type": "string",
                                "description": "Url of the file",
                                "example": "http://example.com/image.png"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Date & time at which the attachment was uploaded",
                                "example": "2020-05-19T21:08:37Z"
                              },
                              "width": {
                                "type": "number",
                                "description": "Width if the file is an image",
                                "nullable": true,
                                "example": 220
                              },
                              "height": {
                                "type": "number",
                                "description": "Height if the file is an image",
                                "nullable": true,
                                "example": 100
                              }
                            }
                          }
                        },
                        "vendorContactIds": {
                          "type": "array",
                          "description": "List of vendor contact IDs in the Purchase Order",
                          "items": {
                            "type": "number",
                            "example": 12
                          }
                        },
                        "shippingAddress": {
                          "type": "object",
                          "description": "Shipping address in the Purchase Order",
                          "required": [
                            "city",
                            "country",
                            "postalCode",
                            "state",
                            "street"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 12,
                              "description": "ID of the address"
                            },
                            "city": {
                              "type": "string",
                              "example": "Montreal"
                            },
                            "country": {
                              "type": "string",
                              "example": "Canada"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "H4B 5G0"
                            },
                            "state": {
                              "type": "string",
                              "example": "Quebec"
                            },
                            "street": {
                              "type": "string",
                              "example": "1909 Avenue des Canadiens-de-Montréal"
                            },
                            "label": {
                              "type": "string",
                              "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                              "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                              "nullable": true
                            }
                          }
                        },
                        "billingAddress": {
                          "type": "object",
                          "description": "Billing address in the Purchase Order",
                          "required": [
                            "city",
                            "country",
                            "postalCode",
                            "state",
                            "street"
                          ],
                          "properties": {
                            "id": {
                              "type": "number",
                              "example": 12,
                              "description": "ID of the address"
                            },
                            "city": {
                              "type": "string",
                              "example": "Montreal"
                            },
                            "country": {
                              "type": "string",
                              "example": "Canada"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "H4B 5G0"
                            },
                            "state": {
                              "type": "string",
                              "example": "Quebec"
                            },
                            "street": {
                              "type": "string",
                              "example": "1909 Avenue des Canadiens-de-Montréal"
                            },
                            "label": {
                              "type": "string",
                              "description": "A string to specify how the address will be displayed - Defaults to Street, City, Province/State, Postal Code, Country",
                              "example": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA ",
                              "nullable": true
                            }
                          }
                        },
                        "shippingContactInfo": {
                          "type": "string",
                          "example": "555-555-5555",
                          "description": "Contact information"
                        },
                        "shippingContactName": {
                          "type": "string",
                          "example": "Bruce Billis",
                          "description": "Name"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "PURCHASE_ORDER_STATUS_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "WORK_ORDER_CHANGE": {
        "post": {
          "summary": "Work Order Change",
          "security": [],
          "description": "The only properties triggering the webhook when changed, are the following: ASSET, ASSIGNEES, DESCRIPTION, DUE_DATE, LOCATION, PARTS, PRIORITY, START_DATE, TEAMS, TITLE, VENDORS, COSTS,CATEGORIES ",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workOrderId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "workOrderId": {
                      "type": "number",
                      "description": "Global ID of the work order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newWorkOrder": {
                      "type": "object",
                      "description": "Properties of the updated work order",
                      "properties": {
                        "assetId": {
                          "nullable": true,
                          "type": "integer"
                        },
                        "assigneeIds": {
                          "type": "array",
                          "description": "List of user ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "categories": {
                          "type": "array",
                          "description": "Newly added categories on the work order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the category",
                                "example": 123
                              },
                              "name": {
                                "type": "string",
                                "description": "Label of the category",
                                "example": "Safety"
                              },
                              "description": {
                                "type": "string",
                                "example": "Used for everything related to Safety",
                                "description": "Description field for additional information."
                              }
                            }
                          }
                        },
                        "description": {
                          "nullable": true,
                          "type": "string",
                          "example": "A work order sample description"
                        },
                        "dueDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order is due",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "estimatedTime": {
                          "type": "integer",
                          "nullable": true,
                          "description": "The estimated time taken in seconds to complete the work order",
                          "example": 3600
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Third Party Id\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Third Party Id": "aa674f49-dac6-4f15-9fdd-061d2b5caf30"
                          }
                        },
                        "locationId": {
                          "nullable": true,
                          "type": "integer",
                          "description": "Global ID of the location assigned to the work order"
                        },
                        "parts": {
                          "type": "array",
                          "description": "Parts attached to the Work Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "quantityUsed",
                              "copyOnRecurring"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the part"
                              },
                              "quantityUsed": {
                                "type": "integer",
                                "description": "Quantity used in the work order.",
                                "example": 2
                              },
                              "unitCost": {
                                "nullable": true,
                                "type": "integer",
                                "description": "Cost in cents. For example, for $1.20, put 120",
                                "example": 120
                              },
                              "copyOnRecurring": {
                                "type": "string",
                                "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                "default": "Default",
                                "enum": [
                                  "NoCopy",
                                  "Copy",
                                  "Default"
                                ]
                              }
                            }
                          }
                        },
                        "priority": {
                          "type": "string",
                          "example": "MEDIUM",
                          "enum": [
                            "NONE",
                            "LOW",
                            "MEDIUM",
                            "HIGH"
                          ]
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "teamIds": {
                          "type": "array",
                          "description": "List of team ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "vendorIds": {
                          "type": "array",
                          "description": "Vendor IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        },
                        "costs": {
                          "type": "object",
                          "required": [
                            "total",
                            "rows"
                          ],
                          "properties": {
                            "total": {
                              "description": "Total cost in cents of the Work order",
                              "type": "number"
                            },
                            "rows": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "Type of the entry",
                                    "enum": [
                                      "EXPENSE",
                                      "PART",
                                      "TIME"
                                    ]
                                  },
                                  "costPerUnit": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "Cost per part in cents or cents per hour"
                                  },
                                  "description": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Description of the expense or part description "
                                  },
                                  "quantity": {
                                    "type": "number",
                                    "description": "Number of parts or number of hours"
                                  },
                                  "rowTotal": {
                                    "type": "number",
                                    "description": "Total cost in cents"
                                  },
                                  "durationTotal": {
                                    "type": "number",
                                    "description": "Total duration in seconds"
                                  },
                                  "userId": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "ID of the user who logged the time entry"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "WORK_ORDER_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "WORK_ORDER_DELETE": {
        "post": {
          "summary": "Work Order Delete",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workOrderId",
                    "orgId",
                    "occurredAt"
                  ],
                  "properties": {
                    "workOrderId": {
                      "type": "number",
                      "description": "Global ID of the work order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the work was deleted",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "WorkOrder": {
                      "type": "object",
                      "description": "Properties of the updated work order",
                      "properties": {
                        "assetId": {
                          "nullable": true,
                          "type": "integer"
                        },
                        "assigneeIds": {
                          "type": "array",
                          "description": "List of user ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "categories": {
                          "type": "array",
                          "description": "Newly added categories on the work order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the category",
                                "example": 123
                              },
                              "name": {
                                "type": "string",
                                "description": "Label of the category",
                                "example": "Safety"
                              },
                              "description": {
                                "type": "string",
                                "example": "Used for everything related to Safety",
                                "description": "Description field for additional information."
                              }
                            }
                          }
                        },
                        "description": {
                          "nullable": true,
                          "type": "string",
                          "example": "A work order sample description"
                        },
                        "dueDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order is due",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "estimatedTime": {
                          "type": "integer",
                          "nullable": true,
                          "description": "The estimated time taken in seconds to complete the work order",
                          "example": 3600
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Third Party Id\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Third Party Id": "aa674f49-dac6-4f15-9fdd-061d2b5caf30"
                          }
                        },
                        "locationId": {
                          "nullable": true,
                          "type": "integer",
                          "description": "Global ID of the location assigned to the work order"
                        },
                        "parts": {
                          "type": "array",
                          "description": "Parts attached to the Work Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "quantityUsed",
                              "copyOnRecurring"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the part"
                              },
                              "quantityUsed": {
                                "type": "integer",
                                "description": "Quantity used in the work order.",
                                "example": 2
                              },
                              "unitCost": {
                                "nullable": true,
                                "type": "integer",
                                "description": "Cost in cents. For example, for $1.20, put 120",
                                "example": 120
                              },
                              "copyOnRecurring": {
                                "type": "string",
                                "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                "default": "Default",
                                "enum": [
                                  "NoCopy",
                                  "Copy",
                                  "Default"
                                ]
                              }
                            }
                          }
                        },
                        "priority": {
                          "type": "string",
                          "example": "MEDIUM",
                          "enum": [
                            "NONE",
                            "LOW",
                            "MEDIUM",
                            "HIGH"
                          ]
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "teamIds": {
                          "type": "array",
                          "description": "List of team ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "vendorIds": {
                          "type": "array",
                          "description": "Vendor IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "WORK_ORDER_DELETE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "WORK_ORDER_OVERDUE": {
        "post": {
          "summary": "Work Order Overdue",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workOrderId",
                    "orgId",
                    "dueDate"
                  ],
                  "properties": {
                    "workOrderId": {
                      "type": "number",
                      "description": "Global ID of the work order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "dueDate": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the work order was due",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "operationId": "WORK_ORDER_OVERDUE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "WORK_ORDER_STATUS_CHANGE": {
        "post": {
          "summary": "Work Order Status Change",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workOrderId",
                    "orgId",
                    "occurredAt",
                    "oldStatus",
                    "newStatus"
                  ],
                  "properties": {
                    "workOrderId": {
                      "type": "number",
                      "description": "Global ID of the work order",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "oldStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "OPEN",
                        "IN_PROGRESS",
                        "ON_HOLD",
                        "DONE"
                      ],
                      "description": "Previous status of the work order"
                    },
                    "oldSubStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "CANCELED",
                        "SKIPPED"
                      ],
                      "description": "Previous sub status of the work order"
                    },
                    "newStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "OPEN",
                        "IN_PROGRESS",
                        "ON_HOLD",
                        "DONE"
                      ],
                      "description": "New status of the work order"
                    },
                    "newSubStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "CANCELED",
                        "SKIPPED"
                      ],
                      "description": "New sub status of the work order"
                    },
                    "progress": {
                      "type": "object",
                      "required": [
                        "doneCount",
                        "inProgressCount",
                        "onHoldCount"
                      ],
                      "properties": {
                        "inProgressCount": {
                          "type": "number",
                          "description": "Number of times the work order status was set to progress",
                          "example": 2
                        },
                        "onHoldCount": {
                          "type": "number",
                          "description": "Number of times the work order was put on hold",
                          "example": 1
                        },
                        "doneCount": {
                          "type": "number",
                          "description": "Number of times the work order status was set to Done",
                          "example": 0
                        }
                      }
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    },
                    "newWorkOrder": {
                      "type": "object",
                      "description": "Properties of the updated work order",
                      "properties": {
                        "assetId": {
                          "nullable": true,
                          "type": "integer"
                        },
                        "assigneeIds": {
                          "type": "array",
                          "description": "List of user ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "categories": {
                          "type": "array",
                          "description": "Newly added categories on the work order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Global ID of the category",
                                "example": 123
                              },
                              "name": {
                                "type": "string",
                                "description": "Label of the category",
                                "example": "Safety"
                              },
                              "description": {
                                "type": "string",
                                "example": "Used for everything related to Safety",
                                "description": "Description field for additional information."
                              }
                            }
                          }
                        },
                        "description": {
                          "nullable": true,
                          "type": "string",
                          "example": "A work order sample description"
                        },
                        "dueDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order is due",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "estimatedTime": {
                          "type": "integer",
                          "nullable": true,
                          "description": "The estimated time taken in seconds to complete the work order",
                          "example": 3600
                        },
                        "extraFields": {
                          "type": "object",
                          "description": "Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: \"Third Party Id\")",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Third Party Id": "aa674f49-dac6-4f15-9fdd-061d2b5caf30"
                          }
                        },
                        "locationId": {
                          "nullable": true,
                          "type": "integer",
                          "description": "Global ID of the location assigned to the work order"
                        },
                        "parts": {
                          "type": "array",
                          "description": "Parts attached to the Work Order",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "quantityUsed",
                              "copyOnRecurring"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 963,
                                "description": "Global ID of the part"
                              },
                              "quantityUsed": {
                                "type": "integer",
                                "description": "Quantity used in the work order.",
                                "example": 2
                              },
                              "unitCost": {
                                "nullable": true,
                                "type": "integer",
                                "description": "Cost in cents. For example, for $1.20, put 120",
                                "example": 120
                              },
                              "copyOnRecurring": {
                                "type": "string",
                                "description": "Indicates if the parts will be copied to the next work order in the chain (if applicable).",
                                "default": "Default",
                                "enum": [
                                  "NoCopy",
                                  "Copy",
                                  "Default"
                                ]
                              }
                            }
                          }
                        },
                        "priority": {
                          "type": "string",
                          "example": "MEDIUM",
                          "enum": [
                            "NONE",
                            "LOW",
                            "MEDIUM",
                            "HIGH"
                          ]
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "Date & time at which the work order will show up in the inbox\u003C/br\u003EOnly valid when \u003Cb\u003EdueDate\u003C/b\u003E is set",
                          "example": "2022-01-01T00:00:00.000Z"
                        },
                        "teamIds": {
                          "type": "array",
                          "description": "List of team ids assigned to the work order",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "vendorIds": {
                          "type": "array",
                          "description": "Vendor IDs",
                          "items": {
                            "type": "number",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "operationId": "WORK_ORDER_STATUS_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      },
      "WORK_REQUEST_STATUS_CHANGE": {
        "post": {
          "summary": "Work Request Status Change",
          "security": [],
          "description": "",
          "tags": [
            "Subscriptions & Webhooks"
          ],
          "requestBody": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "requestId",
                    "orgId",
                    "occurredAt",
                    "oldStatus",
                    "newStatus"
                  ],
                  "properties": {
                    "requestId": {
                      "type": "number",
                      "description": "Global ID of the work request",
                      "example": 123456
                    },
                    "orgId": {
                      "type": "number",
                      "description": "Global ID of the organization",
                      "example": 321
                    },
                    "oldStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "APPROVED",
                        "DONE",
                        "REJECTED",
                        "PENDING"
                      ],
                      "description": "Previous status of the work request"
                    },
                    "newStatus": {
                      "title": "Status",
                      "type": "string",
                      "enum": [
                        "APPROVED",
                        "DONE",
                        "REJECTED"
                      ],
                      "description": "New status of the work request"
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date & time at which the trigger occurred",
                      "example": "2022-01-01T00:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "operationId": "WORK_REQUEST_STATUS_CHANGE",
          "responses": {
            "200": {
              "description": "Return a 200 status to indicate that the data was received successfully"
            }
          }
        }
      }
    }
  }